[PATCH] D94745: [OpenMP][WIP] Build the deviceRTLs with OpenMP instead of target dependent language - NOT FOR REVIEW

2021-01-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 319154. tianshilei1992 added a comment. Final refinement before moving to review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94745/new/ https://reviews.llvm.org/D94745 Files: clang/lib/Driver/ToolCh

[PATCH] D94745: [OpenMP][WIP] Build the deviceRTLs with OpenMP instead of target dependent language - NOT FOR REVIEW

2021-01-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 319176. tianshilei1992 added a comment. Fixed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94745/new/ https://reviews.llvm.org/D94745 Files: clang/lib/Driver/ToolChains/Cuda.cpp clang/test

[PATCH] D94745: [OpenMP][WIP] Build the deviceRTLs with OpenMP instead of target dependent language - NOT FOR REVIEW

2021-01-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 319180. tianshilei1992 added a comment. Herald added a subscriber: jvesely. - Fixed CMake error on CMake 3.16 or lower version as `ZIP_LISTS` doesn't work; - Fixed (hopefully) compilation break on AMDGCN by gaurding `allocator.h` with macro. Reposito

[PATCH] D94745: [OpenMP][deviceRTLs] Build the deviceRTLs with OpenMP instead of target dependent language

2021-01-26 Thread Shilei Tian via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7c03f7d7d04c: [OpenMP][deviceRTLs] Build the deviceRTLs with OpenMP instead of target… (authored by tianshilei1992). Repository: rG LLVM Github Mo

[PATCH] D95764: [OpenMP] Do not propagate match extensions to nested contexts

2021-01-31 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. So I suppose D95765 can replace this patch, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95764/new/ https://reviews.llvm.org/D95764

[PATCH] D95764: [OpenMP] Do not propagate match extensions to nested contexts

2021-01-31 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D95764#2532877 , @jdoerfert wrote: > In D95764#2532875 , @tianshilei1992 > wrote: > >> So I suppose D95765 can replace this >> patch, right? > >

[PATCH] D94745: [OpenMP][deviceRTLs] Build the deviceRTLs with OpenMP instead of target dependent language

2021-02-03 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D94745#2539661 , @protze.joachim wrote: > In D94745#2539454 , @JonChesterfield > wrote: > >> I think there's a bug report about this. Sycl (iirc) introduced a change >> that cau

[PATCH] D95971: [OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`

2021-02-03 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, JonChesterfield, ye-luo. Herald added subscribers: guansong, yaxunl. Herald added a reviewer: jansvoboda11. tianshilei1992 requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstef

[PATCH] D95971: [OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`

2021-02-03 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 321235. tianshilei1992 added a comment. Added a test case in FE Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95971/new/ https://reviews.llvm.org/D95971 Files: clang/lib/Frontend/CompilerInvocation.cp

[PATCH] D95971: [OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`

2021-02-03 Thread Shilei Tian via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0f0ce3c12ede: [OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent` (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CH

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, jhuber6. Herald added subscribers: ormris, guansong, hiraditya, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, sstefan1. Herald added proj

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 373696. tianshilei1992 added a comment. Herald added a subscriber: mgorny. fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110029/new/ https://reviews.llvm.org/D110029 Files: clang/lib/Code

[PATCH] D110108: [OpenMP] Add clang option to change device RTL stack size

2021-09-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1057 + + Bld.restoreIP(OMPBuilder.createTargetInit(Bld, IsSPMD, requiresFullRuntime(), +StackSize)); Do we want to check somewh

[PATCH] D110108: [OpenMP] Add clang option to change device RTL stack size

2021-09-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1057 + + Bld.restoreIP(OMPBuilder.createTargetInit(Bld, IsSPMD, requiresFullRuntime(), +

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 373961. tianshilei1992 added a comment. fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110029/new/ https://reviews.llvm.org/D110029 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 2 inline comments as done. tianshilei1992 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPConstants.h:134 + SPMD = 0x2, +}; + jdoerfert wrote: > If you copy the LLVM_MARK_AS_BITMASK_ENUM stuff you can actually use th

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPConstants.h:132 +enum class OMPTargetExecutionModeMaskType : int8_t { + Generic = 0x1, + SPMD = 0x2, Do we want to set a `NON

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 374089. tianshilei1992 added a comment. It looks better to use `enum` in this case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110029/new/ https://reviews.llvm.org/D110029 Files: clang/lib/CodeGen/C

[PATCH] D110029: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGca999f719117: [OpenMP][Offloading] Use bitset to indicate execution mode instead of value (authored by tianshilei1992). Repository: rG LLVM Github

[PATCH] D110279: [WIP][OpenMP][Offloading] Change `bool IsSPMD` to `int8_t Mode` in `__kmpc_target_init` and `__kmpc_target_deinit`

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added subscribers: ormris, guansong, hiraditya, yaxunl. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a reviewer: jdoerfert. Herald added a reviewer: sstefan1. Herald added subscribers: llvm-commits, o

[PATCH] D110279: [WIP][OpenMP][Offloading] Change `bool IsSPMD` to `int8_t Mode` in `__kmpc_target_init` and `__kmpc_target_deinit`

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 374318. tianshilei1992 added a comment. fix issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110279/new/ https://reviews.llvm.org/D110279 Files: clang/test/OpenMP/declare_target_codegen_globalizat

[PATCH] D110279: [WIP][OpenMP][Offloading] Change `bool IsSPMD` to `int8_t Mode` in `__kmpc_target_init` and `__kmpc_target_deinit`

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 374323. tianshilei1992 added a comment. fix issues and add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110279/new/ https://reviews.llvm.org/D110279 Files: clang/test/OpenMP/declare_target

[PATCH] D110286: [WIP][Clang][OpenMP] Add new clang argument `-fopenmp-target-simd`

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added subscribers: dexonsmith, dang, guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Currently an OpenMP thread is ma

[PATCH] D110279: [OpenMP][Offloading] Change `bool IsSPMD` to `int8_t Mode` in `__kmpc_target_init` and `__kmpc_target_deinit`

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D110279#3016332 , @jdoerfert wrote: > This should not change anything, right? Please confirm running a non-trivial > example, like miniqmc or so, and then this is good to go. miniQMC report 26/26 Passed. Will land the

[PATCH] D110286: [WIP][Clang][OpenMP] Add new clang argument `-fopenmp-target-simd`

2021-09-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 374433. tianshilei1992 added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. it can emit right mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110286/new/ h

[PATCH] D110358: [WIP][OpenMP][DeviceRTL] Add the initial support for SIMD execution (NOT FOR REVIEW)

2021-09-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 375457. tianshilei1992 added a comment. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. When it is `target simd`: - outlined function can be emitted. - function call to `__kmpc_simd_51` can be emitted. Reposit

[PATCH] D96248: [OpenMP][AMDGPU] Add support for linking libomptarget bitcode

2021-02-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Generally LGTM. In D96248#2549339 , @JonChesterfield wrote: > The existing search logic looks in clang's lib and LIBRARY_PATH, I think we > should probably look in the runtime directory as well for running from the > bui

[PATCH] D96248: [OpenMP][AMDGPU] Add support for linking libomptarget bitcode

2021-02-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp:193 CC1Args.push_back("-emit-llvm-bc"); + + std::string BitcodeSuffix = "amdgcn-" + GpuArch.str(); JonChesterfield wrote: > tianshilei1992 wrote: > > JonChesterfiel

[PATCH] D96248: [OpenMP][AMDGPU] Add support for linking libomptarget bitcode

2021-02-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 requested changes to this revision. tianshilei1992 added a comment. This revision now requires changes to proceed. In D96248#2551503 , @JonChesterfield wrote: > @tianshilei1992 @jdoerfert can we agree on 'libomptarget-device-bc-path' > bei

[PATCH] D96519: [Clang][OpenMP] Fixed an issue that `target team` is emitted incorrectly

2021-02-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, JonChesterfield, ABataev, grokos. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patc

[PATCH] D96248: [OpenMP][AMDGPU] Add support for linking libomptarget bitcode

2021-02-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96248/new/ https://reviews.llvm.org/D96248 _

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1695 -std::string LibOmpTargetName = -"libomptarget-" + BitcodeSuffix.str() + ".bc"; - -for (StringRef LibraryPath : LibraryPaths) { - SmallString<128> LibOmpTarget

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:265 "No library '%0' found in the default clang lib directory or in LIBRARY_PATH. Please use --libomptarget-%1-bc-path to specify %1 bitcode library.">; +def warn_drv_omp_off

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:265 "No library '%0' found in the default clang lib directory or in LIBRARY_PATH. Please use --libomptarget-%1-bc-path to specify %1 bitcode library.">; +def warn_drv_omp_off

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Please also update the test. In D96877#2569861 , @JonChesterfield wrote: > Suggestion is to resolve libomptarget-nvptx-unknown.bc to a cp of the bitcode > libary built for the newest sm_xx and ptx version clang knows of.

[PATCH] D95765: [OpenMP] Introduce the `disable_selector_propagation` variant selector trait

2021-02-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95765/new/ https://reviews.llvm.org/D95765 _

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LGTM. Please also update the test(s) before commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96877/new/ https://reviews.llv

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9+ for OpenMP offloading on NVPTX target

2021-02-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, JonChesterfield, ABataev, grokos. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. In curren

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9+ for OpenMP offloading on NVPTX target

2021-02-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D97003#2573090 , @jdoerfert wrote: > Could you include the simplifications this allows in the openmp subfolder? If > it's too much put it in a child revision. I prefer to split them as most of changes are in OpenMP. R

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9+ for OpenMP offloading on NVPTX target

2021-02-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. According to D97012 , if we want to completely drop CUDA version, it should be CUDA 9.2. Do we want to change the minimum version to CUDA 9.2? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325133. tianshilei1992 added a comment. Update to CUDA 9.2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 Files: clang/include/clang/Basic/DiagnosticDriverKin

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-19 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325136. tianshilei1992 added a comment. Use CUDA 9.1 for failure test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 Files: clang/include/clang/Basic/Diagnost

[PATCH] D97120: [Clang][OpenMP] Update driver test case for OpenMP offload to use sm_35

2021-02-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, JonChesterfield. Herald added subscribers: guansong, yaxunl. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. `sm_35` is the minimum req

[PATCH] D97120: [Clang][OpenMP] Update driver test case for OpenMP offload to use sm_35

2021-02-20 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG33d660939d9a: [Clang][OpenMP] Update driver test case for OpenMP offload to use sm_35 (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325229. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clan

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325235. tianshilei1992 added a comment. fixed the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 Files: clang/include/clang/Basic/DiagnosticDriverKinds.t

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325261. tianshilei1992 added a comment. update test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 Files: clang/include/clang/Basic/DiagnosticDriverKinds

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325262. tianshilei1992 added a comment. optimize error handle process Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 Files: clang/include/clang/Basic/Diagnost

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. If there is no objection, I’ll merge it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97003/new/ https://reviews.llvm.org/D97003 ___ cfe-commits mailing list cfe-commits@

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I think we might not this patch. We’re gonna not support old version of CUDA anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96877/new/ https://reviews.llvm.org/D96877

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D96877#2578748 , @ye-luo wrote: > to me this is still desired + cmake creating libomptarget-nvptx-unknown.bc as > a solution for forward compatibility until a clean solution lands. We’ll have newer version LLVM like 12.

[PATCH] D96877: [libomptarget] Try a fallback devicertl if the preferred one is missing

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D96877#2578756 , @ye-luo wrote: > In D96877#2578752 , @tianshilei1992 > wrote: > >> In D96877#2578748 , @ye-luo wrote: >> >>> to me this i

[PATCH] D97003: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG76151acf893a: [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D97198: [OpenMP][Clang][NVPTX] Only build one bitcode library for each SM

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, JonChesterfield, ABataev, grokos, ye-luo. Herald added subscribers: guansong, yaxunl, mgorny. tianshilei1992 requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstefan1. Herald a

[PATCH] D97198: [OpenMP][Clang][NVPTX] Only build one bitcode library for each SM

2021-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 325492. tianshilei1992 added a comment. use `ptx61` instead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97198/new/ https://reviews.llvm.org/D97198 Files: clang/lib/Driver/ToolChains/Cuda.cpp clang

[PATCH] D96519: [Clang][OpenMP] Fixed an issue that `target team` is emitted incorrectly

2021-02-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 abandoned this revision. tianshilei1992 added a comment. This patch is abandoned and will propose a new patch to unify interface of `target` and `target teams`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96519/new/ https://review

[PATCH] D104904: [OpenMP][AMDGCN] Initial math headers support

2021-06-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Those changes in OpenMP headers LGTM, except `#define __device__`. Comment at: clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h:93 + +#define __device__ __attribute__((device)) + JonChesterfield wrote: > i thi

[PATCH] D104904: [OpenMP][AMDGCN] Initial math headers support

2021-06-30 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Headers/openmp_wrappers/math.h:41 #pragma omp begin declare variant match( \ device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) JonCh

[PATCH] D113421: [clang][openmp][NFC] Remove arch-specific CGOpenMPRuntimeGPU files

2021-11-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I remember at some point we want to just emit function call to get those information like thread id. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113421/new/ https://reviews.llvm.org/D113421 __

[PATCH] D113421: [clang][openmp][NFC] Remove arch-specific CGOpenMPRuntimeGPU files

2021-11-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113421/new/ https://reviews.llvm.org/D113421 ___ cfe-commits mailing list cfe-commi

[PATCH] D113126: [OpenMP][NFCI] Embed the source location string size in the ident_t

2021-11-10 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I'm not convinced. `std::strlen` can do the job. Can you explain more why need it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113126/new/ https://reviews.llvm.org/D113126

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2021-11-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:3082 + if (getTriple().getVendor() == llvm::Triple::OpenMP_VGPU) { +std::string BitcodeSuffix = "x86_64-vgpu"; +clang::driver::tools::addOpenMPDeviceRTL(getDriver(), DriverArgs, CC1Args

[PATCH] D113623: [OpenMP][FIX] Pass the num_threads value directly to parallel_51

2021-11-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. I think this should be the right direction. LGTM. @grokos WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113623/new/ https:

[PATCH] D98134: [WIP][RFC] Introduce callback argument encoding mode into callback metadata

2021-03-06 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. Herald added subscribers: dexonsmith, okura, kuter, hiraditya. Herald added a reviewer: aaron.ballman. tianshilei1992 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a reviewer: jdoerfert. Herald added a reviewer: sstefan1. H

[PATCH] D98134: [WIP][RFC] Introduce callback argument encoding mode into callback metadata

2021-03-06 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3679 S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) -<< AL << (unsigned)(EncodingIndices.size() - 1); +<< AL << (unsigned)(CalleeFnProtoType->getNumParams() + 2

[PATCH] D97198: [OpenMP][Clang][NVPTX] Only build one bitcode library for each SM

2021-03-07 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 328926. tianshilei1992 added a comment. rebase and ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97198/new/ https://reviews.llvm.org/D97198 Files: clang/lib/Driver/ToolChains/Cuda.cpp clang/tes

[PATCH] D97198: [OpenMP][Clang][NVPTX] Only build one bitcode library for each SM

2021-03-08 Thread Shilei Tian via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc41ae246ac67: [OpenMP][Clang][NVPTX] Only build one bitcode library for each SM (authored by tianshilei1992). Repository: rG LLVM Github Monorepo

[PATCH] D98134: [WIP][RFC] Introduce callback argument encoding mode into callback metadata

2021-03-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 329163. tianshilei1992 added a comment. update doc in clang Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98134/new/ https://reviews.llvm.org/D98134 Files: clang/include/clang/Basic/AttrDocs.td clan

[PATCH] D98134: [WIP][RFC] Introduce callback argument encoding mode into callback metadata

2021-03-08 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 329191. tianshilei1992 added a comment. update llvm doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98134/new/ https://reviews.llvm.org/D98134 Files: clang/include/clang/Basic/AttrDocs.td clang/in

[PATCH] D98134: [RFC] Introduce callback argument encoding mode into callback metadata

2021-03-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 329510. tianshilei1992 added a comment. put the encoding mode into `ParameterEncoding` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98134/new/ https://reviews.llvm.org/D98134 Files: clang/include/cla

[PATCH] D98134: [RFC] Introduce callback argument encoding mode into callback metadata

2021-03-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 330414. tianshilei1992 added a comment. add the support for stacked mode in `AbstractCallSite::getCallArgOperand` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98134/new/ https://reviews.llvm.org/D98134

[PATCH] D98134: [RFC][POC] Introduce callback argument encoding mode into callback metadata

2021-03-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. We probably don't need the index for `size_t size`. If the `ArgNo` is out of range, we simply return `nullptr`. Besides, CUDA function `cudaLaunchKernel` doesn't have an argument for size as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D98134: [RFC][POC] Introduce callback argument encoding mode into callback metadata

2021-03-12 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: llvm/lib/IR/AbstractCallSite.cpp:209 + +if (!GEP || !GEP->hasOneUse()) + return nullptr; If we don't use have a size, `GEP` will be `nullptr` here, and we can just return it. Repository: rG LLVM Gith

[PATCH] D98134: [RFC][POC] Introduce callback argument encoding mode into callback metadata

2021-03-13 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 330464. tianshilei1992 added a comment. remove the requirement of `size_t size` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98134/new/ https://reviews.llvm.org/D98134 Files: clang/include/clang/Basi

[PATCH] D102449: [WIP][Clang][OpenMP] Add the support for compare clause in atomic directive

2021-11-17 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I'll separate them later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102449/new/ https://reviews.llvm.org/D102449 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. That's quite the change! I think it's about time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114890/new/ https://reviews.llvm.org/D114890 ___ cfe-commits mailing list c

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D114890#3164885 , @JonChesterfield wrote: > D114891 enables this for the amdgpu tests. > > This patch will leave the nvptx tests running on the new runtime twice, and > not on the old

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D114890#3164994 , @JonChesterfield wrote: > In D114890#3164899 , > @tianshilei1992 wrote: > >> Do we still want to run tests for the old device runtime? > > Maybe? We definitel

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D114890#3165883 , @jhuber6 wrote: > In D114890#3165879 , @ronlieb wrote: > >> works for me, i think Greg is ok with it too, we chatted internally an hour >> or so ago > > Should

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 requested changes to this revision. tianshilei1992 added inline comments. This revision now requires changes to proceed. Comment at: openmp/libomptarget/src/api.cpp:208 + + TargetMemcpyArgsTy *Args = (TargetMemcpyArgsTy *)Task->shareds; + I didn't

[PATCH] D136363: [OpenMP] Remove `-Bsymbolic` flag for device linking in the GNU toolchain

2022-10-20 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136363/new/ https://reviews.llvm.org/D136363 _

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/src/private.h:101 typedef int kmp_int32; +typedef int64_t kmp_int64; typedef intptr_t kmp_intptr_t; Can we put all KMP related code into a separate header, but of course not called `kmp.h`?

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. > we used both kmp relevent data structure/types and APIs, so should I wrap all > those relevant code into several tool functions and put them into separate > header file? IMO we can put all KMP related code into one header and include it where needed. For the o

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D136103#3880651 , @jz10 wrote: > I checked through private.h, this header actually does the functionality > that contains all kmp and kmpc related data structures and APIs, so should > we still have to split a separate h

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. `openmp/libomptarget/test/api/` is where we usually tests those APIs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136103/new/ https://reviews.llvm.org/D136103 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/test/api/omp_target_memcpy_async1.c:1 +// Test case for omp_target_memcpy_async, oringally from GCC + There is no `RUN` line here so the test will not be triggered. Can you refer to other tes

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-24 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/test/api/omp_target_memcpy_async1.c:2 +// RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda +// REQUIRES: nvptx64-nvidia-cuda + Does it work on AMDGPU and other targets? Why does it

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Generally looks good to me. Can you check all resolved comments to make sure there is no open comments? Comment at: openmp/libomptarget/src/api.cpp:206 +// The helper function that calls omp_target_memcpy or omp_target_memcpy_rect +static int __

[PATCH] D136103: OpenMP asynchronous memory copy support

2022-10-26 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. Thanks! LG. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136103/new/ https://reviews.llvm.org/D136103 ___ cfe-commits mai

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I'm fine with the change. @JonChesterfield WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131639/new/ https://reviews.llvm.org/D131639 ___ cfe-commits mailing list cf

[PATCH] D135224: [Clang][OpenMP] Only check value if the expression is not instantiation dependent

2022-10-04 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 created this revision. tianshilei1992 added reviewers: jdoerfert, ABataev. Herald added subscribers: guansong, yaxunl. Herald added a project: All. tianshilei1992 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Curre

[PATCH] D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs

2022-12-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:63 + +printf("sm_%d%d\n", Major, Minor); + } Do we want to include device number here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs

2022-12-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140433/new/ https://reviews.llvm.org/D140433 ___

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 485375. tianshilei1992 marked 10 inline comments as done. tianshilei1992 added a comment. rebase and fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139287/new/ https://reviews.llvm.org/D13928

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:276-277 + + StringRef RawData(CGOutputBuffer.begin(), CGOutputBuffer.size()); + return MemoryBuffer::getMemBufferCopy(RawData); +} jhuber6 wrot

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 485406. tianshilei1992 added a comment. rebase and fix comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139287/new/ https://reviews.llvm.org/D139287 Files: openmp/libomptarget/CMakeLists.txt op

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments. Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:276-277 + + StringRef RawData(CGOutputBuffer.begin(), CGOutputBuffer.size()); + return MemoryBuffer::getMemBuff

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. tianshilei1992 marked an inline comment as done. Closed by commit rG58906e4901ec: [OpenMP] Introduce basic JIT support to OpenMP target offloading (authored by tianshil

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D139287#4018071 , @ronlieb wrote: > seems like this broke the amdgpu buildbot , plz resolve > https://lab.llvm.org/buildbot/#/builders/193/builds/24122 Reverted. Will fix it soon. Repository: rG LLVM Github Monorepo

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 485451. tianshilei1992 added a comment. fix compile error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139287/new/ https://reviews.llvm.org/D139287 Files: openmp/libomptarget/CMakeLists.txt openmp/

<    1   2   3   4   5   6   >