guansong (Guansong Zhang)
User

Projects

User does not belong to any projects.

User Details

User Since
May 14 2014, 8:22 AM (205 w, 5 d)

Recent Activity

Fri, Apr 20

guansong committed rOMP330477: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
[OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag
Fri, Apr 20, 1:45 PM
guansong committed rL330477: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
[OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag
Fri, Apr 20, 1:44 PM
guansong closed D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
Fri, Apr 20, 1:44 PM · Unknown Object (Project)

Thu, Apr 19

guansong added a comment to D45528: [OpenMP] Remove compilation warning when using clang to compile bc files..

I checked again on the format you suggested. To use it, you need #include <inttypes.h> For example the macro was defined like this in my version of the inttypes.h

# if __WORDSIZE == 64
#  define __PRI64_PREFIX        "l"
#  define __PRIPTR_PREFIX       "l"
# else
#  define __PRI64_PREFIX       "ll"
#  define __PRIPTR_PREFIX
# endif

# define PRId8 "d"
# define PRId16 "d"
# define PRId32 "d"
# define PRId64 __PRI64_PREFIX "d"

But the header causes a compilation issue for cuda clang. I am not sure how to solve that problem.

Thu, Apr 19, 12:49 PM · Unknown Object (Project)
guansong added a comment to D45528: [OpenMP] Remove compilation warning when using clang to compile bc files..

I checked again on the format you suggested. To use it, you need #include <inttypes.h> For example the macro was defined like this in my version of the inttypes.h

Thu, Apr 19, 12:20 PM · Unknown Object (Project)

Sun, Apr 15

guansong added a comment to D45528: [OpenMP] Remove compilation warning when using clang to compile bc files..

update as suggested (except PRId64)

Isn't PRId64 working?

I did not find any usage of it on the device side. Not confident on using it. We can remove the warning first, and improve the format later?

It's not giving a warning because in CUDA long long int happens to be 64 bits long, so you can use %lld to print an int64_t. This is not guaranteed to be true on every platform, therefore the portable way to print an int64_t is using the PRId64 macro. That's what we do in the base library.

Sun, Apr 15, 10:26 AM · Unknown Object (Project)

Fri, Apr 13

guansong added a comment to D45528: [OpenMP] Remove compilation warning when using clang to compile bc files..

update as suggested (except PRId64)

Isn't PRId64 working?

Fri, Apr 13, 2:49 PM · Unknown Object (Project)
guansong updated the diff for D45528: [OpenMP] Remove compilation warning when using clang to compile bc files..

update as suggested (except PRId64)

Fri, Apr 13, 11:54 AM · Unknown Object (Project)

Thu, Apr 12

guansong abandoned D45220: [OpenMP] Search llvm package to find bc file compiler and linker if not specified by a user.
Thu, Apr 12, 2:17 PM · Unknown Object (Project)
guansong added a comment to D45220: [OpenMP] Search llvm package to find bc file compiler and linker if not specified by a user.

Ok, let me abandon this one and think on this again.

Thu, Apr 12, 2:13 PM · Unknown Object (Project)

Wed, Apr 11

guansong updated the diff for D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.

update according to suggestion, thanks.

Wed, Apr 11, 1:55 PM · Unknown Object (Project)
guansong added inline comments to D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
Wed, Apr 11, 11:05 AM · Unknown Object (Project)
guansong added inline comments to D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
Wed, Apr 11, 11:00 AM · Unknown Object (Project)
guansong retitled D45528: [OpenMP] Remove compilation warning when using clang to compile bc files. from Remove compilation warning when using clang to compile bc files. to [OpenMP] Remove compilation warning when using clang to compile bc files..
Wed, Apr 11, 10:28 AM · Unknown Object (Project)
guansong retitled D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag from Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag to [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
Wed, Apr 11, 10:28 AM · Unknown Object (Project)
guansong created D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag.
Wed, Apr 11, 10:28 AM · Unknown Object (Project)
guansong created D45528: [OpenMP] Remove compilation warning when using clang to compile bc files..
Wed, Apr 11, 10:21 AM · Unknown Object (Project)

Tue, Apr 10

guansong committed rOMP329713: [OpenMP] Remove extra warning when we build.
[OpenMP] Remove extra warning when we build
Tue, Apr 10, 8:32 AM
guansong committed rL329713: [OpenMP] Remove extra warning when we build.
[OpenMP] Remove extra warning when we build
Tue, Apr 10, 8:31 AM
guansong closed D45415: [OpenMP] Remove extra warning when we build.
Tue, Apr 10, 8:31 AM · Unknown Object (Project)

Mon, Apr 9

guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

! In D44992#1061781, @guansong wrote:
I have revert the change, let's continue to discuss how to enable bc file path better.

You are still not subscribed to openmp-commits, so again no commit email! For reference, the commit is rL329576 (and you shouldn't quote git commit hashes, there is a script in LLVM to revert SVN changes from git-svn.)

I was trying to use my office email to subscribe the mailing list, it may not be approved yet. How can I check on that? Currently I only get openmp-commits message from my gmail.

For reverting, I revert the patch from git, and commit it use git svn dcommit. I guess you are referring the following comment in the log

This reverts commit 6849e31c36d712d97433bca9af39b7a09c8c1207.

generated during the process. What is the proper script to use?

There is utils/git-svn/git-svnrevert in the main LLVM repository.

I can see the advantage of dynamic testing. But to test everything dynamically maybe tedious. For bc file handling, I consider this is more of a project need to embed LLVM itself, using find_package is more suitable. http://llvm.org/docs/CMake.html#embedding

proper link: http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project

We probably don't need to test all flags on their own, we could group the basic flags together. And I still don't get which variable you want to use from that CMake integration?

Unless the grouped flags get accepted or rejected together by the compiler, we won't know which flag caused the failure. For the moment, I intend to use LLVM_VERSION_MAJOR and LLVM_INSTALL_PREFIX/LLVM_BUILD_BINARY_DIR only. But I can see more if we further explore the bc files.

I'd group the current set of flags and add a second check for -fcuda-rdc. I'm saying this a third time: There should be no hardcoding of versions!

Mon, Apr 9, 12:56 PM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

! In D44992#1061781, @guansong wrote:
I have revert the change, let's continue to discuss how to enable bc file path better.

You are still not subscribed to openmp-commits, so again no commit email! For reference, the commit is rL329576 (and you shouldn't quote git commit hashes, there is a script in LLVM to revert SVN changes from git-svn.)

Mon, Apr 9, 11:25 AM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

I can see the advantage of dynamic testing. But to test everything dynamically maybe tedious. For bc file handling, I consider this is more of a project need to embed LLVM itself, using find_package is more suitable. http://llvm.org/docs/CMake.html#embedding

Mon, Apr 9, 9:11 AM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

I can see the advantage of dynamic testing. But to test everything dynamically maybe tedious. For bc file handling, I consider this is more of a project need to embed LLVM itself, using find_package is more suitable. http://llvm.org/docs/CMake.html#embedding

Mon, Apr 9, 8:53 AM · Unknown Object (Project)
guansong committed rOMP329576: Revert "[OpenMP] enable bc file compilation using the latest clang".
Revert "[OpenMP] enable bc file compilation using the latest clang"
Mon, Apr 9, 8:20 AM
guansong committed rL329576: Revert "[OpenMP] enable bc file compilation using the latest clang".
Revert "[OpenMP] enable bc file compilation using the latest clang"
Mon, Apr 9, 7:49 AM

Sun, Apr 8

guansong created D45415: [OpenMP] Remove extra warning when we build.
Sun, Apr 8, 9:46 AM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

Currently we only enable the bc file path when we specified on the cmake command line with these flags -DLIBOMPTARGET_NVPTX_CUDA_COMPILER and -DLIBOMPTARGET_NVPTX_SELECTED_BC_LINKER.

We already enable it as soon as the user says -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB and we find the Clang compiler suitable. This change breaks the build with Clang 3.9.1 and I will revert it early next week to fix this regression.

Sun, Apr 8, 9:20 AM · Unknown Object (Project)
guansong added a comment to D45220: [OpenMP] Search llvm package to find bc file compiler and linker if not specified by a user.

I see. I was trying to set the bc file utilities using find_pacakge(llvm...) instead of using COMPILER_ID and common it to an upper level as we search things like elf and ffi.

Sun, Apr 8, 8:18 AM · Unknown Object (Project)

Thu, Apr 5

guansong added a comment to D45220: [OpenMP] Search llvm package to find bc file compiler and linker if not specified by a user.

That is fine. I don't think this conflicts with what you said?

Thu, Apr 5, 12:57 PM · Unknown Object (Project)
guansong added a comment to D45220: [OpenMP] Search llvm package to find bc file compiler and linker if not specified by a user.

This is only for compiler and linker used for building bclib. It is not the default build compiler.

Thu, Apr 5, 12:37 PM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

I don't think this is a regression through, as it is broken right now unless one uses an older (less 4.0) clang.

... which is enough to satisfy the definition of a regression. Yes, Clang also regressed but that's no excuse to regress the runtime library. Please revert this change or let me know if you can't and I'll do it.

I can add this flag conditionally as you suggested, how about something like this? where we check llvm version?

# Set flags for Clang cuda compilation.  Only Clang is supported because there is
# no other compiler capable of generating bitcode from cuda sources.
if (LLVM_VERSION_MAJOR GREATER 6)
  set(CUDA_FLAGS
    -emit-llvm
    -fcuda-rdc
    -O1
    -Xclang -target-feature
    -Xclang +${CUDA_PTX_VERSION}
    --cuda-device-only
    -DOMPTARGET_NVPTX_TEST=0 -DOMPTARGET_NVPTX_DEBUG=0
    )
else()
  set(CUDA_FLAGS
    -emit-llvm
    -O1
    -Xclang -target-feature
    -Xclang +${CUDA_PTX_VERSION}
    --cuda-device-only
    -DOMPTARGET_NVPTX_TEST=0 -DOMPTARGET_NVPTX_DEBUG=0
    )
endif()

No, it needs to be a compiler check. LLVM_VERSION won't be set if building openmp standalone.

Thu, Apr 5, 12:29 PM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

I don't think this is a regression through, as it is broken right now unless one uses an older (less 4.0) clang.

... which is enough to satisfy the definition of a regression. Yes, Clang also regressed but that's no excuse to regress the runtime library. Please revert this change or let me know if you can't and I'll do it.

Thu, Apr 5, 11:48 AM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

So , will the deviceRTLs/nvptx change? Instead of extern __shared__, what will it use for those data structures?

I don't question the flag, as I said libomptarget-nvptx was the main reason to implement that functionality. What's bad about this is adding this flag unconditionally, the build system needs to properly detect if the compiler supports it.

If you can't work on that right now, I hereby request this change to be reverted as it results in a build regression.

Thu, Apr 5, 7:35 AM · Unknown Object (Project)

Tue, Apr 3

guansong created D45220: [OpenMP] Search llvm package to find bc file compiler and linker if not specified by a user.
Tue, Apr 3, 11:38 AM · Unknown Object (Project)
guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

I see. We compared the change in (4.0?) and after, realized the extern shared is turned off. We reenabled (basically allow it to pass parsing) and everything is expected.

Tue, Apr 3, 11:19 AM · Unknown Object (Project)
guansong committed rL329072: [OpenMP] enable bc file compilation using the latest clang.
[OpenMP] enable bc file compilation using the latest clang
Tue, Apr 3, 8:04 AM
guansong committed rOMP329072: [OpenMP] enable bc file compilation using the latest clang.
[OpenMP] enable bc file compilation using the latest clang
Tue, Apr 3, 8:04 AM
guansong closed D44992: [OpenMP] enable bc file compilation using the latest clang.
Tue, Apr 3, 8:04 AM · Unknown Object (Project)

Mon, Apr 2

guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

My search got the same conclusion as Greg did, I don't think -fcuda-rdc will change the IR code, except allowing multiple compilation units as specified in the options.td

Mon, Apr 2, 9:23 AM · Unknown Object (Project)

Sun, Apr 1

guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

this fix I had is similar to 751ae2ab8, which is exactly for this.

Sun, Apr 1, 10:36 AM · Unknown Object (Project)

Wed, Mar 28

guansong added a comment to D44992: [OpenMP] enable bc file compilation using the latest clang.

I mean using -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=1 on cmake command line, to build the bc libraries. Did you use that flag?

Wed, Mar 28, 3:27 PM · Unknown Object (Project)
guansong created D44992: [OpenMP] enable bc file compilation using the latest clang.
Wed, Mar 28, 11:44 AM · Unknown Object (Project)

Jan 12 2018

guansong added inline comments to D14254: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget device RTLs..
Jan 12 2018, 9:37 AM · Unknown Object (Project)

Dec 11 2017

guansong added inline comments to D14254: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget device RTLs..
Dec 11 2017, 9:33 PM · Unknown Object (Project)

Dec 8 2017

guansong added a comment to D14254: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget device RTLs..

Here is a general comment, we should follow Alex's suggestion to make a generic GPU device and extend that to NVPTX and AMDGCN. My current idea is:

Dec 8 2017, 1:32 PM · Unknown Object (Project)
guansong added a comment to D38978: [OpenMP] Enable the lowering of implicitly shared variables in OpenMP GPU-offloaded target regions to the GPU shared memory.

Here is a question, do we require that the alloca size to be compile time constant?

Dec 8 2017, 9:58 AM

Dec 7 2017

guansong added a comment to D40977: [OpenMP] NVPTX: Set default/minimum compute capability to sm_35.

LGTM.

Dec 7 2017, 12:15 PM · Unknown Object (Project)

Jul 19 2017

guansong added a project to D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading: Unknown Object (Project).
Jul 19 2017, 7:30 AM · Unknown Object (Project)

Jun 7 2017

guansong added a comment to D33227: [OpenMP] libomptarget: move debugging dumps under control of environment variable OMP_TARGET_DEBUG.

Just to share what I have locally. I have OFFLOAD_DEBUG=1 for the plugin side debug messages, and DEVICE_DEBUG=1 for the deviceRTL side messages.

So are you suggesting that each plugin has its own env variable to turn debug output on/off?

Jun 7 2017, 2:03 PM · Unknown Object (Project)
guansong added a comment to D33227: [OpenMP] libomptarget: move debugging dumps under control of environment variable OMP_TARGET_DEBUG.

Just to share what I have locally. I have OFFLOAD_DEBUG=1 for the plugin side debug messages, and DEVICE_DEBUG=1 for the deviceRTL side messages.

Jun 7 2017, 10:46 AM · Unknown Object (Project)

Mar 15 2017

guansong committed rL297896: fix build break by removing the target on command line.
fix build break by removing the target on command line
Mar 15 2017, 2:58 PM
guansong committed rL297890: enable -save-temps with -finclude-defult-header.
enable -save-temps with -finclude-defult-header
Mar 15 2017, 2:11 PM
guansong closed D30743: enable -save-temps with -finclude-defult-header by committing rL297890: enable -save-temps with -finclude-defult-header.
Mar 15 2017, 2:11 PM

Mar 14 2017

guansong updated the diff for D30743: enable -save-temps with -finclude-defult-header.

Thanks, update as suggested.

Mar 14 2017, 7:21 AM

Mar 13 2017

guansong updated the diff for D30743: enable -save-temps with -finclude-defult-header.
Mar 13 2017, 11:54 AM

Mar 10 2017

guansong updated the diff for D30784: Create a git ignore file for openmp runtime.

As suggested, mv the dir to the empty dir down below

Mar 10 2017, 12:11 PM

Mar 9 2017

guansong updated the diff for D30750: Rename PT_NOTE namespace name used in AMDGPUPTNote.h.

Use ElfNote instead of AMD_PT_NOTE as suggested.

Mar 9 2017, 12:26 PM
guansong created D30784: Create a git ignore file for openmp runtime.
Mar 9 2017, 9:33 AM

Mar 8 2017

guansong created D30750: Rename PT_NOTE namespace name used in AMDGPUPTNote.h.
Mar 8 2017, 10:53 AM
guansong added a reviewer for D30743: enable -save-temps with -finclude-defult-header: Anastasia.
Mar 8 2017, 10:13 AM
guansong updated the diff for D30743: enable -save-temps with -finclude-defult-header.

add a test

Mar 8 2017, 10:11 AM
guansong added a reviewer for D30743: enable -save-temps with -finclude-defult-header: yaxunl.
Mar 8 2017, 9:06 AM
guansong created D30743: enable -save-temps with -finclude-defult-header.
Mar 8 2017, 9:05 AM

Jul 5 2016

guansong updated subscribers of D21840: [Driver][CUDA][OpenMP] Reimplement tool selection in the driver..
Jul 5 2016, 10:45 AM
guansong updated subscribers of D18172: [CUDA][OpenMP] Add a generic offload action builder.
Jul 5 2016, 10:44 AM
guansong updated subscribers of D18171: [CUDA][OpenMP] Create generic offload action.
Jul 5 2016, 10:44 AM

Jun 14 2016

guansong updated subscribers of D20682: Expose target-specific pre-linking passes in TargetMachine.
Jun 14 2016, 11:45 AM

Jun 8 2016

guansong updated subscribers of D13909: clang-offload-bundler - offload files bundling/unbundling tool.
Jun 8 2016, 9:33 AM
guansong updated subscribers of D18170: [CUDA][OpenMP] Create generic offload toolchains.
Jun 8 2016, 7:08 AM

Apr 6 2016

guansong updated subscribers of D18110: [OpenMP] Fix SEMA bug in the capture of global variables in template functions..
Apr 6 2016, 2:13 PM

Feb 17 2016

guansong added a comment to D17323: [OpenMP]Update to clang 3.8 ReleaseNotes.rst.

Should we mention that the runtime can be built "in-tree" as well? This simplifies users experience to access OpenMP support.

Feb 17 2016, 8:28 AM
guansong updated subscribers of D17323: [OpenMP]Update to clang 3.8 ReleaseNotes.rst.
Feb 17 2016, 8:15 AM
guansong updated subscribers of D9888: [OPENMP] Driver support for OpenMP offloading.
Feb 17 2016, 8:07 AM

Feb 3 2016

guansong updated subscribers of D12614: [OpenMP] Offloading descriptor registration and device codegen..
Feb 3 2016, 6:22 AM
guansong updated subscribers of D14031: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget..
Feb 3 2016, 6:21 AM

May 28 2014

guansong updated subscribers of D3776: [OPENMP] Initial support of 'reduction' clause.

I found the patch does not work with the latest trunk. Could you please rebase, or provide a version number the patch is based on?
BTW, I am using git mirror, it will be appropriated to show me how to locate the base. Are we using git log? I did not find any tags...

May 28 2014, 8:01 AM