[PATCH] D159256: [NFC][Clang] Remove redundant function definitions

2023-08-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. In D159256#4630915 , @jmmartinez wrote: > In D159256#4630876 , @jhuber6 wrote: > >> In D159256#4630410

[PATCH] D159256: [NFC][Clang] Remove redundant function definitions

2023-08-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D159256#4630410 , @jmmartinez wrote: > @jhuber6 I was wondering if there is a reason you kept 3 versions of > `mergeDefaultFunctionDefinitionAttributes` in > https://reviews.llvm.org/D152391 ? I believe it's because one

[PATCH] D159118: [libc] Implement the 'clock()' function on the GPU

2023-08-30 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG30307a7bb795: [libc] Implement the clock() function on the GPU (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D159118?vs=554797=554831#toc Repository: rG LLVM Github

[PATCH] D159118: [libc] Implement the 'clock()' function on the GPU

2023-08-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 554797. jhuber6 added a comment. Move the header portion into a common utility header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159118/new/ https://reviews.llvm.org/D159118 Files:

[PATCH] D158778: [CUDA] Propagate __float128 support from the host.

2023-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D158778#4625892 , @tra wrote: > In D158778#4624408 , @ABataev wrote: > >> Just checks removal should be fine > > Looks like OpenMP handles long double and __float128 differently -- it

[PATCH] D159118: [libc] Implement the 'clock()' function on the GPU

2023-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 554434. jhuber6 added a comment. Address nits and add static check for size of `clock_t` type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159118/new/ https://reviews.llvm.org/D159118 Files:

[PATCH] D159118: [libc] Implement the 'clock()' function on the GPU

2023-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: arsenm, tra, JonChesterfield, jdoerfert, sivachandra, lntue, michaelrj. Herald added subscribers: libc-commits, tpr. Herald added projects: libc-project, All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits,

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a subscriber: sivachandra. jhuber6 added a comment. In D112921#4624580 , @wangpc wrote: > It seems that the linker can't find sized deallocation (no support in the > environment or AMDGPU libraries?). We should have some implementations

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This caused some linking errors with the GPU libc test suite, see https://lab.llvm.org/staging/#/builders/247/builds/5659. clang++: error: ld.lld command failed with exit code 1 (use -v to see invocation) [331/473] Linking CXX executable

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The libcxx tests are always broken randomly in my experience. I wouldn't worry about it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/ https://reviews.llvm.org/D153924

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. I think it's fine now given that it's passing tests. Others feel free to comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139730/new/

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Just a few more nits. I think it's looking fine but I haven't tested it. Anyone else? Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:406 + // pass on -mllvm options to the clang + for (const opt::Arg *Arg :

[PATCH] D157738: [OpenMP] Emit offloading entries for indirect target variables

2023-08-24 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9da61aed751e: [OpenMP] Emit offloading entries for indirect target variables (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h:49 -static_assert(sizeof(AMDGPUImplicitArgsTy) == 56, - "Unexpected size of implicit arguments"); +enum IMPLICITARGS : uint32_t { + COV4_SIZE = 56,

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h:49 -static_assert(sizeof(AMDGPUImplicitArgsTy) == 56, - "Unexpected size of implicit arguments"); +enum IMPLICITARGS : uint32_t { + COV4_SIZE = 56,

[PATCH] D158582: [AMDGPU] Respect unresolved symbol option if forwarded to linker

2023-08-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D158582#4610023 , @yaxunl wrote: > The `-Wl` and `-Xlinker` options are intended for the host linker and we > intentionally do not pass them to the device linker. > > If users want to pass options to the device linker, they

[PATCH] D158582: [AMDGPU] Respect unresolved symbol option if forwarded to linker

2023-08-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Remember to clang format. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:564-575 + // If the user has manually passed -Wl,--unresolved-symbols=* as a linker + // option, we should not add --no-undefined + bool UnresolvedOpt = false; + for (auto

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:11 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fexceptions %s -emit-llvm -S -verify=with -Wopenmp-target-exception -o - &> /dev/null +// RUN: %clang_cc1

[PATCH] D158298: [OpenMP] Always pass the optimization level to the linker wrapper

2023-08-18 Thread Joseph Huber 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 rG4ab4e40fa294: [OpenMP] Always pass the optimization level to the linker wrapper (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D158298: [OpenMP] Always pass the optimization level to the linker wrapper

2023-08-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ye-luo. Herald added subscribers: kerbowa, guansong, tpr, yaxunl, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr,

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Some nits. I'm assuming we're getting the code object in the backend now? We'll need to make sure that `-Wl,--amdhsa-code-object-version` is passed to the clang invocation inside of the `clang-linker-wrapper` to handle `-save-temps` mode. Comment

[PATCH] D158131: HIP: Directly use f32 sqrt intrinsic

2023-08-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. I'm hoping to write some brute force tests for the `fp32` math functions in `libc` soonish. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158131/new/

[PATCH] D157738: [OpenMP] Emit offloading entries for indirect target variables

2023-08-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 550140. jhuber6 added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157738/new/ https://reviews.llvm.org/D157738 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D157738: [OpenMP] Emit offloading entries for indirect target variables

2023-08-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1996-1997 +llvm::GlobalValue *GV) { + std::optional ActiveAttr = +

[PATCH] D157738: [OpenMP] Emit offloading entries for indirect target variables

2023-08-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D157738#4586465 , @JonChesterfield wrote: >> calling device functions via their associated host pointer > > What does this mean? Defining a function foo such that the host and each > individual target each have their own

[PATCH] D157738: [OpenMP] Emit offloading entries for indirect target variables

2023-08-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, ye-luo, ABataev, RaviNarayanaswamy. Herald added subscribers: guansong, hiraditya, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits,

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4574190 , @arsenm wrote: > Probably should just wrap uses in macros for now In clang? Or just have users deal with `opencl_` on everything and rename it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber 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 rG61709bbae37a: [OpenMP] Ensure wrapper headers are included on both host and device (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191 // the resource directory at clang/lib/Headers/llvm_libc_wrappers. -if (C.getActiveOffloadKinds() == Action::OFK_None) { +if ((getToolChain().getTriple().isNVPTX() || +

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191 // the resource directory at clang/lib/Headers/llvm_libc_wrappers. -if (C.getActiveOffloadKinds() == Action::OFK_None) { +if ((getToolChain().getTriple().isNVPTX() || +

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, JonChesterfield, yaxunl, sivachandra. Herald added a subscriber: guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1,

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-08-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156014#4567363 , @steven_wu wrote: > This breaks macOS bot: > https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/36900/testReport/junit/Clang/SemaCUDA/alias_cu/ I should've fixed that already. Is it

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-08-07 Thread Joseph Huber 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 rG0ba9aec38faa: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-08-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 547871. jhuber6 added a comment. Update to check the SDK version. Permit this if there is not passed in SDK version so that freestanding targets can still target CUDA and assume it's supported. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-08-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156014/new/ https://reviews.llvm.org/D156014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17138 +///and use its value for COV_4 or COV_5 approach. It is used for +///compiling device libraries in ABI-agnostic way. +/// Comment at:

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156928#4562239 , @JonChesterfield wrote: > Or, the front end could define those objects directly, without importing IR > files that define the objects with the content clang used to choose the > object file. E.g. instead

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D139730#4561573 , @arsenm wrote: > In D139730#4561540 , @jhuber6 wrote: > >> Could you explain briefly what the approach here is? I'm confused as to >> what's actually changed and how

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h:36 -// The implicit arguments of AMDGPU kernels. -struct AMDGPUImplicitArgsTy { - uint64_t OffsetX; - uint64_t OffsetY; - uint64_t OffsetZ; - uint64_t HostcallPtr; -

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Could you explain briefly what the approach here is? I'm confused as to what's actually changed and how we're handling this difference. I thought if this was just the definition of some builtin function we could just rely on the backend to figure it out. Why do we need

[PATCH] D156936: [Clang] Increase default architecture from sm_35 to sm_52

2023-08-02 Thread Joseph Huber 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 rGab202aa7004a: [Clang] Increase default architecture from sm_35 to sm_52 (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D156936: [Clang] Increase default architecture from sm_35 to sm_52

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, jdoerfert, yaxunl, jlebar. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We previously defaulted to `sm_35` for the purpose of unspecified

[PATCH] D156930: [Clang] Fix Offloading related tests after D156363

2023-08-02 Thread Joseph Huber 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 rGbc080221b3a2: [Clang] Fix Offloading related tests after D156363 (authored by jhuber6). Changed prior to commit:

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156928#4555121 , @yaxunl wrote: > `-mcode-object-version=none` was intentionally designed to work with `clang > -cc1` only, since it does not work with clang driver if users link with > device library. Device library can

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/TargetOptions.h:90 +COV_Default = 400, +COV_MAX = 500 }; Typically we just put a `COV_LAST` to indicate that it's over the accepted enumerations. Comment at:

[PATCH] D156930: [Clang] Fix Offloading related tests after D156363

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: MaskRay, yaxunl, JonChesterfield, tra, jdoerfert, ronlieb, jplehr. Herald added subscribers: mattd, asavonic, ormris, kerbowa, steven_wu, hiraditya, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156363#4554913 , @yaxunl wrote: > Thanks. I will wait for your patch. You can leave the tricky ones to me if > you would like. e.g. the rocm-detect.hip You can go ahead and fix that one then. Repository: rG LLVM Github

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156363#4554790 , @ro wrote: > In D156363#4553043 , @ro wrote: > >> It seems the latest commit of this patch has (re-)introduced two failures on >> the Solaris/amd64 buildbot >>

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156363#4554687 , @yaxunl wrote: > In D156363#4554435 , @jhuber6 wrote: > >> Clang :: Driver/amdgpu-hip-system-arch.c >> Clang :: Driver/cuda-bad-arch.cu >> Clang ::

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Pretty sure most of this is `hip` returning an error if it can't find `ROCm`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156363/new/ https://reviews.llvm.org/D156363 ___

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Clang :: Driver/amdgpu-hip-system-arch.c Clang :: Driver/cuda-bad-arch.cu Clang :: Driver/hip-autolink.hip Clang :: Driver/hip-binding.hip Clang :: Driver/hip-cuid-hash.hip Clang :: Driver/hip-cuid.hip Clang :: Driver/hip-default-gpu-arch.hip Clang ::

[PATCH] D156886: [CUDA][HIP] Reorganize options for documentation

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. I think this is good, there's been some confusion around which ones goes to what. Comment at: clang/include/clang/Driver/Options.td:1021 +def offload_host_device :

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Also seems to have impacted one of the AMDGPU bots but not the other, not sure why https://lab.llvm.org/staging/#/builders/247/builds/4145. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156363/new/

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4551500 , @jdoerfert wrote: > Macros seems to be good enough. If we really need clang attributes, we need > new docs, and naming convention etc. Yeah an alternative would be a new set of attributes, then we make the

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4551409 , @Anastasia wrote: > Why not to just use target address space and define it to some macro with > desirable spelling? > > I don't think renaming OpenCL address space to something else makes sense. It > might

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4551338 , @yaxunl wrote: >> FFI isn't the reason you'd use these, it's for generic access to the actual >> backend. E.g. an `addrspace(3)` global is local memory, if it's external >> it's dynamic. Having these named

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156816#4551299 , @arsenm wrote: > I don't really see the point of doing this. These introduce ambiguous > terminology. The reason you need the attributes is basically for FFI to > opencl code, so might as well make the

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 546149. jhuber6 added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156816/new/ https://reviews.llvm.org/D156816 Files: clang/include/clang/Basic/Attr.td

[PATCH] D156816: [Clang] Make generic aliases to OpenCL address spaces

2023-08-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: ebevhan, arsenm, JonChesterfield, jdoerfert, tianshilei1992, tra, yaxunl, rjmccall. Herald added subscribers: jeroen.dobbelaere, Naghasan, ldrumm, arichardson, Anastasia. Herald added a reviewer: aaron.ballman. Herald added a project: All.

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber 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 rG141c4e7a9403: [OpenMP] Do not always emit unused extern variables (authored by jhuber6). Herald added a project: OpenMP. Herald added a subscriber:

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/declare_target_codegen.cpp:264 -// CHECK-DAG: !{i32 1, !"aaa", i32 0, i32 {{[0-9]+}}} -// CHECK-DAG: !{i32 1, !"ccc", i32 0, i32 {{[0-9]+}}} // CHECK-DAG: !{{{.+}}virtual_foo tianshilei1992 wrote: >

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 545168. jhuber6 added a comment. Add OpenMP runtime test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156368/new/ https://reviews.llvm.org/D156368 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. I'd wager a lot of the tests that return non-zero aren't even intentional, so it's probably good to enforce this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156363/new/

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LG, thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156426/new/ https://reviews.llvm.org/D156426 ___ cfe-commits mailing list

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Driver.h:712 + /// Whether there are HIP input files. + bool hasHIPInputs() const { return HasHIPInputs; } + Shouldn't we have access to the compilation? I figured we could check

[PATCH] D156426: [HIP] link HIP runtime library without --hip-link

2023-07-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. So this is equivalent to `nvcc` implicitly calling `-lcudart`? I've had thoughts about the `clang-linker-wrapper` adding known runtime flags to the link job if it's not found. E.g. if we find a CUDA image we pass `-lcudart`. CHANGES SINCE LAST ACTION

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, tianshilei1992, ye-luo, RaviNarayanaswamy, ABataev. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers:

[PATCH] D156366: HIP: Use __builtin_sqrt instead of routing through ocml sqrt for f64

2023-07-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. Thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156366/new/ https://reviews.llvm.org/D156366 ___ cfe-commits mailing list

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-07-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1995 } - if (S.Context.getTargetInfo().getTriple().isNVPTX()) { -S.Diag(AL.getLoc(), diag::err_alias_not_supported_on_nvptx); jhuber6 wrote: > tra wrote: > > tra wrote: > > >

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-07-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1995 } - if (S.Context.getTargetInfo().getTriple().isNVPTX()) { -S.Diag(AL.getLoc(), diag::err_alias_not_supported_on_nvptx); tra wrote: > tra wrote: > > Allowing or not

[PATCH] D156014: [Clang][NVPTX] Permit use of the alias attribute for NVPTX targets

2023-07-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, arsenm, jlebar, kushanam, aaron.ballman, yaxunl, jdoerfert. Herald added subscribers: mattd, gchakrabarti, asavonic, jeroen.dobbelaere. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers:

[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

2023-07-21 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf4381d464457: [NVPTX] Add initial support for .alias in PTX (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155211/new/

[PATCH] D155727: [OpenMP][Docs] Add some things to the OpenMP support

2023-07-19 Thread Joseph Huber 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 rGa37d74722254: [OpenMP][Docs] Add some things to the OpenMP support (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D155727: [OpenMP][Docs] Add some things to the OpenMP support

2023-07-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, kevinsala, jplehr. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1.

[PATCH] D155606: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain

2023-07-18 Thread Joseph Huber 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 rGd2ac0069a21b: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D155606: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain

2023-07-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 541594. jhuber6 added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155606/new/ https://reviews.llvm.org/D155606 Files: clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Cuda.cpp

[PATCH] D155606: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain

2023-07-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 541562. jhuber6 added a comment. Fix wrong comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155606/new/ https://reviews.llvm.org/D155606 Files: clang/lib/Driver/Driver.cpp

[PATCH] D155606: [Clang] Only emit CUDA version warnings when creating the CUDA toolchain

2023-07-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, jdoerfert, tianshilei1992, JonChesterfield. Herald added a subscriber: mattd. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, wangpc, jplehr, sstefan1, MaskRay.

[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

2023-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 540062. jhuber6 added a comment. Remove changes in `clang` that I forgot to remove to keep this restricted to the codegen. Afterwards we can remove the sema in clang and test it there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

2023-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, arsenm, jlebar, kushanam. Herald added subscribers: mattd, gchakrabarti, asavonic, jeroen.dobbelaere, hiraditya. Herald added a reviewer: aaron.ballman. Herald added a project: All. jhuber6 requested review of this revision. Herald

[PATCH] D154850: [libc] Remove GPU string functions incompatible with C++

2023-07-10 Thread Joseph Huber 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 rGb454e7aa7ceb: [libc] Remove GPU string functions incompatible with C++ (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D154850: [libc] Remove GPU string functions incompatible with C++

2023-07-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, sivachandra, lntue, michaelrj, ronlieb. Herald added projects: libc-project, All. Herald added a subscriber: libc-commits. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-07-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D153725#4485039 , @arsenm wrote: > And the libomptarget build is in fact doing that, but it shouldn't have to. > What it's doing actually seems really unreasonable. It's only building the > locally found targets when it

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-07-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D153725#4484966 , @arsenm wrote: > In D153725#4484754 , > @JonChesterfield wrote: > >> - if you open the driver too many times at once it fails to open, so running >> a parallel

[PATCH] D154591: [OpenMP][OMPIRBuilder] Rename IsEmbedded and IsTargetCodegen flags

2023-07-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Yeah that happens sometimes, if it's working on your system it's safe to assume it's fine. Worst case scenario you can always revert, it's not a big deal. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154591/new/

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153725/new/ https://reviews.llvm.org/D153725 ___ cfe-commits mailing list

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/amdgpu-arch/AMDGPUArch.cpp:48-52 + if (!printGPUsByHSA()) +return 0; +#endif + return printGPUsByHSA(); Are we missing something here ? They look the same. CHANGES SINCE LAST ACTION

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/amdgpu-arch/AMDGPUArch.cpp:50 +#else + return printGPUsByHSA(); +#endif arsenm wrote: > The HIP path should work on linux too. I generally think we should build as > much code as possible on all hosts, so

[PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

2023-07-06 Thread Joseph Huber 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 rGa4a26374aa11: [libc] Add support for creating wrapper headers for offloading in clang (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D154591: [OpenMP][OMPIRBuilder] Rename IsEmbedded and IsTargetCodegen flags

2023-07-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. Noisy change but shouldn't really affect much. Names area little overloaded here so it's good to be more specific. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

2023-07-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 537787. jhuber6 added a comment. Changing this to only apply to OpenMP for now. It breaks CUDA / HIP builds because they already have forward declarations of things like `malloc` or `memcpy` on the GPU that conflict. We'll need to clean those up later.

[PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

2023-07-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: libc/include/CMakeLists.txt:8 +if(LIBC_TARGET_ARCHITECTURE_IS_GPU) + include(GetClangResourceDir) +endif() sivachandra wrote: > Where does this come from? It's a global CMake module that LLVM provides in

[PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

2023-07-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 537535. jhuber6 added a comment. Fix guard on the headers for offloading languages Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154036/new/ https://reviews.llvm.org/D154036 Files:

[PATCH] D154378: [LinkerWrapper] Set the GPU LTO job to be freestanding

2023-07-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, yaxunl, tianshilei1992. Herald added a subscriber: inglorion. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The LTO

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/amdgpu-arch/AMDGPUArch.cpp:47 - // Attempt to load the HSA runtime. - if (llvm::Error Err = loadHSA()) { -logAllUnhandledErrors(std::move(Err), llvm::errs()); -return 1; - } - - hsa_status_t Status =

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/amdgpu-arch/AMDGPUArch.cpp:47 - // Attempt to load the HSA runtime. - if (llvm::Error Err = loadHSA()) { -logAllUnhandledErrors(std::move(Err), llvm::errs()); -return 1; - } - - hsa_status_t Status =

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Also w.r.t. target-id, I'm wondering what a good solution would be. Right now the main usage of `amdgpu-arch` is both to detect the `-mcpu / -march` in CMake and to fill in the architecture via `--offload-arch=native` or `-fopenmp-target=amdgcn-amd-amdhsa`. We may want

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/amdgpu-arch/AMDGPUArch.cpp:47 - // Attempt to load the HSA runtime. - if (llvm::Error Err = loadHSA()) { -logAllUnhandledErrors(std::move(Err), llvm::errs()); -return 1; - } - - hsa_status_t Status =

[PATCH] D153725: [clang] Make amdgpu-arch tool work on Windows

2023-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D153725#4463589 , @arsenm wrote: > Unrelated but can we get this to start reporting xnack and ecc? A lot of CMake relies on this just being an ordered list of architectures, so we'd probably need to make that an opt-in

[PATCH] D154145: [HIP] Fix -mllvm option for device lld linker

2023-06-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/HIPAMD.cpp:164 +StringRef ArgVal = Arg->getValue(1); +if (ArgVal.startswith("-mllvm=")) { + ArgVal = ArgVal.substr(strlen("-mllvm=")); arsenm wrote: > StringRef Prefix("-mllvm=")

  1   2   3   4   5   6   7   8   9   10   >