[PATCH] D142133: [LinkerWrapper] Use `clang` to perform the device linking

2023-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, JonChesterfield, tianshilei1992, jdoerfert. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Right now in the linker wrapper we manual

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, tianshilei1992, JonChesterfield, jdoerfert. Herald added subscribers: kosarev, kerbowa, guansong, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, M

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. @yaxunl Do you know why AMD uses `-mcpu` but we use `-march` here? Would there be any downside to aliasing them in the AMDGPU toolchain? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142138/new/ https://reviews.llvm.org/D1

[PATCH] D142133: [LinkerWrapper] Use `clang` to perform the device linking

2023-01-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 rGbec49b1d803c: [LinkerWrapper] Use `clang` to perform the device linking (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D133539: [OpenMP] Replace OpenMP register requires constructor with a global array

2023-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10515 +default: + RequiresFlags.push_back(OMP_REQ_NONE); +} jdoerfert wrote: > Really? Not an error or unexpected state? Probab

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-20 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 rG255922be7f00: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference (authored by jhuber6). Repository: rG LLVM Github Monore

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Ping, is it possible to resolve this before the fork tomorrow? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141717/new/ https://reviews.llvm.org/D141717 ___ cfe-commits mailing

[PATCH] D142393: [OpenMP] Add 'amdgpu-flat-work-group-size' to OpenMP kernels

2023-01-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, arsenm, tra, yaxunl, jdoerfert. Herald added subscribers: kosarev, kerbowa, guansong, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-co

[PATCH] D142393: [OpenMP] Add 'amdgpu-flat-work-group-size' to OpenMP kernels

2023-01-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9552 F->addFnAttr("uniform-work-group-size", "true"); + if (IsOpenMPkernel) +F->addFnAttr("amdgpu-flat-work-group-size", arsenm wrote: > Probably shouldn’t check the language, j

[PATCH] D142393: [OpenMP] Add 'amdgpu-flat-work-group-size' to OpenMP kernels

2023-01-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9552 F->addFnAttr("uniform-work-group-size", "true"); + if (IsOpenMPkernel) +F->addFnAttr("amdgpu-flat-work-group-size", arsenm wrote: > jhuber6 wrote: > > arsenm wrote: > > > P

[PATCH] D127515: [Clang] Change host/device only compilation to a driver mode

2022-06-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, jdoerfert, JonChesterfield, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. We use the flags `--offload-host-only` and `--offl

[PATCH] D127515: [Clang] Change host/device only compilation to a driver mode

2022-06-13 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 rG1054a7318788: [Clang] Change host/device only compilation to a driver mode (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, yaxunl, tra. Herald added a subscriber: guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. Thanks for the review. Comment at: clang/lib/Driver/Driver.cpp:5420 +/*CreatePrefixForHost=*/isa(A) || +(!!A->getOffloadingHostActiveKinds() && !AtTopLevel)); if (isa(JA)) {

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 436493. jhuber6 added a comment. Addressing nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127673/new/ https://reviews.llvm.org/D127673 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/openmp-offl

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, tra, yaxunl, saiislam. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The target fe

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the comments, I'll try to address them. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8320 +TC->getDriver().isUsingLTO(/* IsOffload */ true) +? ",feature=" + llvm::join(FeatureArgs, ",feature=") +: "";

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 436607. jhuber6 added a comment. Adjust how we generate arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/ https://reviews.llvm.org/D127686 Files: clang/lib/Driver/ToolChains/Clang.cpp cl

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 436611. jhuber6 added a comment. Does this approach work? I'm just using the reverse iterator and only adding the argument if it hasn't been seen yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/

[PATCH] D127707: [Clang] Simplify unifying target features

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: yaxunl, jdoerfert, tra. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. This patch simplifies how we unify target features. Now we simply i

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-14 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 rG6a6484c666ed: [OpenMP] Fix offload packager not writing to temps correctly (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D127707: [Clang] Simplify unifying target features

2022-06-14 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 rGc4a2674e21c4: [Clang] Simplify unifying target features (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D127707?vs=436621

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tra, yaxunl. Herald added subscribers: mattd, gchakrabarti, asavonic, inglorion. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127901#3590402 , @tra wrote: > Playing devil's advocate, I've got to ask -- do we even want to support JIT? > > JIT brings more trouble than benefits. > > - substantial start-up time on nontrivial apps. Last time I tried launc

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Is anyone up to review this? I'm mostly looking for some feedback on the interfaces I've built. If no one has time to look into it I can probably just land without review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1272

[PATCH] D128206: [Clang] Allow multiple comma separated arguments to `--offload-arch=`

2022-06-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, jdoerfert, JonChesterfield, ye-luo. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. This patch updates the `--[no-]o

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 438758. jhuber6 added a comment. Adding a test to ensure we no longer write temporary files for unused inputs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127246/new/ https://reviews.llvm.org/D127246 Files:

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127246#3599826 , @JonChesterfield wrote: > I've read it but can't promise it's correct - the diff is large and has some > spurious noise in it which distracts significantly from the functional > changes. > > Would you be w

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG958a88505080: [LinkerWrapper] Rework the linker wrapper and use owning binaries (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127246/n

[PATCH] D128206: [Clang] Allow multiple comma separated arguments to `--offload-arch=`

2022-06-22 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 rG21e29b6ce734: [Clang] Allow multiple comma separated arguments to `--offload-arch=` (authored by jhuber6). Repository: rG LLVM Github Monorepo CH

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 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/D127686/new/ https://reviews.llvm.org/D127686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127901#3603006 , @tra wrote: > Then we do need a knob controlling whether we do want to embed PTX or not. > The default should be "off" IMO. > We currently have `--[no-]cuda-include-ptx=` we may reuse for that purpose. We co

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127901#3603467 , @tra wrote: > I'm not sure I follow. WDYM by "go inside the binary itself" ? I assume you > mean the per-GPU offload binaries inside per-TU .o. so that it could be used > when that GPU object gets linked int

[PATCH] D128441: [CUDA] Do not embed a fatbinary when using the new driver

2022-06-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, yaxunl. Herald added subscribers: mattd, carlosgalvezp. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. Previousl

[PATCH] D128441: [CUDA] Do not embed a fatbinary when using the new driver

2022-06-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 439384. jhuber6 added a comment. Remove comment that is no longer true now that `getInputFilename` always returns a `.cubin` variant for object types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128441/new/

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-23 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 rG6e6889288cdc: [Offloading] Embed the target features in the OffloadBinary (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D128441: [CUDA] Do not embed a fatbinary when using the new driver

2022-06-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128441#3605809 , @tra wrote: >> The linker wrapper cannot do anything with these embedded PTX files because >> we do not know how to link them, > > Neither, apparently does `nvlink`. It does have `--emip-ptx ` option, > but

[PATCH] D128441: [CUDA] Do not embed a fatbinary when using the new driver

2022-06-23 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 rG4d3c010f1d01: [CUDA] Do not embed a fatbinary when using the new driver (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: ABataev, JonChesterfield, jdoerfert, tianshilei1992. Herald added subscribers: guansong, hiraditya, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1.

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This currently fails about 180 Clang tests. Of those about half can be automatically updated. I tried to manually update the other 90 but gave up, attempting to auto generate those tests as well would most likely result in over half a million new lined added to LLVM, th

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 439851. jhuber6 added a comment. Simplify interface now that we use -1 to indicate a lack of teams. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128550/new/ https://reviews.llvm.org/D128550 Files: clang/lib

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 439853. jhuber6 added a comment. Update comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128550/new/ https://reviews.llvm.org/D128550 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp llvm/include/llvm/Fr

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6836 + + // If the CUID is not specified we try to generate a unique postfix. + if (getLangOpts().CUID.empty()) { tra wrote: > jhuber6 wrote: > > tra wrote: > > > > However, [CUID] i

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. A Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6836 + + // If the CUID is not specified we try to generate a unique postfix. + if (getLangOpts().CUID.empty()) { jhuber6 wrote: > tra wrote: > > jhuber6 wrote: > > > tra wrote: > > >

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125904#3535830 , @tra wrote: > I'm still itching to figure out a way to avoid CUID altogether and with the > new driver it may be possible. I would be 100% in favor of working around this if possible, it's proving to be one

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125904#3535905 , @jhuber6 wrote: > I can't think of a way to generate these new symbols, we'd need to somehow > have a list of all the static entries that need new symbols and then modify > the object file after its been mad

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Also, for the OpenMP case, we already pass the host-IR as a dependency for the device compilation. So it would be relatively easy for us to just generate these names on the host and then read them from the IR for the device. The problem is that CUDA / HIP doesn't use th

[PATCH] D124525: [OpenMP][ClangLinkerWrapper] Extending linker wrapper to embed metadata for multi-arch fat binaries

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Where is the code to change the target registration? We need a new initialization runtime call to use and change the old one to reallocate the `__tgt_device_image` array. Did you work around that some other way? Comment at: clang/tools/clang-linker-wr

[PATCH] D126398: [Clang] Introduce `-dl` option to perform offload device linking

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: MaskRay, jdoerfert, yaxunl, tra. Herald added a subscriber: StephenFan. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. The new driver use

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125904#3537872 , @tra wrote: > Is this patch in its current form blocking any of your other work? no-cuid > approach, even if we figure out how to do it, will likely take some time. Do > you need an interim solution until th

[PATCH] D126398: [Clang] Introduce `-dl` option to perform offload device linking

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D126398#3537942 , @tra wrote: > Naming, as usual, is hard. I would prefer a more explicit `--offload-link` > which would be in line with other --offload* options we have by now. > `-dl` is cryptic for uninitiated and is uncom

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125904#3537952 , @tra wrote: > How much work would it take to add cuid generation in the new driver, similar > to what the old driver does, using the same logic, however imperfect it is? > I'd be OK with that as a possibly p

[PATCH] D126398: [Clang] Introduce `-dlink` option to perform offload device linking

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 432060. jhuber6 added a comment. Changing to use `--offload-link` and use `-dlink` as an alias. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126398/new/ https://reviews.llvm.org/D126398 Files: clang/docs/Cl

[PATCH] D126398: [Clang] Introduce `-dlink` option to perform offload device linking

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Options.td:825-826 + HelpText<"Use the new offloading linker to perform the link job.">; +def device_link : Flag<["-"], "dlink">, Group, + Alias; def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput,

[PATCH] D126398: [Clang] Introduce `--offload-link` option to perform offload device linking

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 432071. jhuber6 added a comment. Removing `-dlink` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126398/new/ https://reviews.llvm.org/D126398 Files: clang/docs/ClangCommandLineReference.rst clang/include/c

[PATCH] D126398: [Clang] Introduce `--offload-link` option to perform offload device linking

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb7c8c4d8cf07: [Clang] Introduce `--offload-link` option to perform offload device linking (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125904#3538714 , @tra wrote: > It would be great to have some compile-time checks for that, if possible. > Otherwise it will only manifest at run-time and the end user will have no > clue what's going on. Not sure how we co

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 432146. jhuber6 added a comment. Add test for #line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125904/new/ https://reviews.llvm.org/D125904 Files: clang/lib/CodeGen/CGCUDANV.cpp clang/lib/CodeGen/CodeG

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-26 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 rG1bae02b77335: [Cuda] Use fallback method to mangle externalized decls if no CUID given (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D124525: [OpenMP][ClangLinkerWrapper] Extending linker wrapper to embed metadata for multi-arch fat binaries

2022-05-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/OffloadWrapper.cpp:229-232 +// store value of these variables (i.e. offload archs) into a custom +// section which will be used by "offload-arch -f". It won't be +// removed during binary stri

[PATCH] D124525: [OpenMP][ClangLinkerWrapper] Extending linker wrapper to embed metadata for multi-arch fat binaries

2022-05-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Also I probably should've discussed this earlier, but another potential solution is to use the binary format that we use to embed the object files for the images as well. This is m

[PATCH] D126812: [Binary] Promote OffloadBinary to inherit from Binary

2022-06-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, JonChesterfield, MaskRay. Herald added a reviewer: deadalnix. Herald added subscribers: ormris, StephenFan, hiraditya. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commi

[PATCH] D126812: [Binary] Promote OffloadBinary to inherit from Binary

2022-06-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 433504. jhuber6 added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126812/new/ https://reviews.llvm.org/D126812 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include/llvm-c/Object.h

[PATCH] D126812: [Binary] Promote OffloadBinary to inherit from Binary

2022-06-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the comments, I'll address them real quick. Comment at: llvm/include/llvm/Object/OffloadBinary.h:121 const Entry *TheEntry) - : Buffer(Buffer), TheHeader(TheHeader), TheEntry(TheEntry) { - + : Binary(Binary::ID_Offl

[PATCH] D126812: [Binary] Promote OffloadBinary to inherit from Binary

2022-06-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 433534. jhuber6 added a comment. Addressing comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126812/new/ https://reviews.llvm.org/D126812 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include/llvm-c

[PATCH] D126812: [Binary] Promote OffloadBinary to inherit from Binary

2022-06-01 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 rGafd2f7e99197: [Binary] Promote OffloadBinary to inherit from Binary (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D1268

[PATCH] D125165: [Clang] Introduce clang-offload-packager tool to bundle device files

2022-06-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125165#3557015 , @tra wrote: > @jhuber6 -- @MaskRay has found that `ninja install` is failing in a clean > build with: > > clang: error: unable to execute command: Executable > "clang-offload-packager" doesn't exist! > >

[PATCH] D125165: [Clang] Introduce clang-offload-packager tool to bundle device files

2022-06-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125165#3557015 , @tra wrote: > @jhuber6 -- @MaskRay has found that `ninja install` is failing in a clean > build with: > > clang: error: unable to execute command: Executable > "clang-offload-packager" doesn't exist! > >

[PATCH] D125165: [Clang] Introduce clang-offload-packager tool to bundle device files

2022-06-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125165#3557441 , @MaskRay wrote: > Add openmp to `LLVM_ENABLE_PROJECTS` to trigger the issue: > > cmake -GNinja -Sllvm -B/tmp/out/play -DCMAKE_BUILD_TYPE=Release > -DLLVM_ENABLE_PROJECTS='clang;openmp' > -DCMAKE_CXX_COMPIL

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, tra, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. The linker wrapper currently eag

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 435118. jhuber6 added a comment. There was a problem where the Triple and Arch data would be deallocated when the LTO pass took ownership of every single file. Add a UniqueStringSaver to make sure they are still accessible after linking. Repository: rG L

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 435122. jhuber6 added a comment. Add use of bitcode libraries so this works on AMD. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127246/new/ https://reviews.llvm.org/D127246 Files: clang/tools/clang-linker-

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 435124. jhuber6 added a comment. Sorry for this noise. This is a pretty large change but shouldn't affect any functionality and passes all the tests I know of, so this should be good to land. Let me know if you have any objections to how I've structured this

[PATCH] D127304: [LinkerWrapper] Embed OffloadBinaries for OpenMP offloading images

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

[PATCH] D127246: [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 435571. jhuber6 added a comment. Fixing bug when capturing a StringRef by reference in a callback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127246/new/ https://reviews.llvm.org/D127246 Files: clang/tool

[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. Heral

[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 clang/lib/Driver/ToolChains/

[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
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] 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. Her

[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] 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/ https://revie

[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: cfe

[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 `noreturn`

[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: > > > Allow

[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 cfe-commi

[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: cfe-commi

[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 https://reviews.

[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 `C.getActiv

[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 cfe-

[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/ https://reviews.ll

[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, cfe-commits,

[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 mach

[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 = + OMPDeclareTargetDeclAttr::getActiveA

[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 clang/lib/CodeGen/C

[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/ https://reviews.llvm.org/D1581

[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 at:

[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, sstef

[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 CHANGE

[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 -fop

<    5   6   7   8   9   10   11   12   13   14   >