[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155775#4652686 , @AlexVlx wrote: > In D155775#4652683 , @thakis wrote: > >> This seems to break tests on Mac and windows, see eg >> http://45.33.8.238/macm1/70415/step_7.txt >> >>

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 ___ cfe-commits mailing list

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:75 + "cannot find HIP Standard Parallelism Acceleration library; provide it via " + "'--stdpar-path'">; +def err_drv_no_hipstdpar_thrust_lib : Error< needs to update

[PATCH] D143305: [clang] Fix -Xarch_ for -mllvm and alike

2023-09-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl abandoned this revision. yaxunl added a comment. Abandon this patch unless we need it in the future. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143305/new/ https://reviews.llvm.org/D143305 ___ cfe-commits mailing list

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Please address Ronan's comments. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769

[PATCH] D159206: [Clang] Propagate target-features if compatible when using mlink-builtin-bitcode

2023-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2005 +static void +overrideFunctionFeaturesWithTargetFeatures(llvm::AttrBuilder , + const llvm::Function , can you add a comment about how the

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl closed this revision. yaxunl added a comment. Phabricator no longer allows me to update the patch. Created PR in github https://github.com/llvm/llvm-project/pull/65606 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158247/new/

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl reopened this revision. yaxunl added a comment. This revision is now accepted and ready to land. The patch was reverted since it caused regressions on Windows for HIP. A reduced test case is: typedef void (__stdcall* funcTy)(); void invoke(funcTy f); static void __stdcall

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-29 Thread Yaxun Liu 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 rGde0df639724b: [CUDA][HIP] Fix overloading resolution in global variable initializer (authored by yaxunl). Herald added a project: clang.

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

2023-08-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks Comment at: clang/test/CodeGenCUDA/amdgpu-code-object-version-linking.cu:12 +// RUN: llvm-link %t_0 %t_5 -o -| llvm-dis -o - | FileCheck -check-prefix=LINKED5 %s + +#include "Inputs/cuda.h"

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158247/new/ https://reviews.llvm.org/D158247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D158367: [AMDGPU] Add target feature gws to clang

2023-08-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb8a9c50f2294: [AMDGPU] Add target feature gws to clang (authored by yaxunl). Herald added projects: clang, Flang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158367: [AMDGPU] Add target feature gws to clang

2023-08-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 553463. yaxunl retitled this revision from "[AMDGPU] Add target feature gds/gws to clang" to "[AMDGPU] Add target feature gws to clang". yaxunl added a comment. Herald added a reviewer: kiranchandramohan. remove gds feature since it is not used CHANGES

[PATCH] D145648: [clang][Driver] recognize `-ffp-contract=fast-honor-pragmas`

2023-08-24 Thread Yaxun Liu 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 rGe94c171ddb03: [clang][Driver] recognize `-ffp-contract=fast-honor-pragmas` (authored by yaxunl). Herald added a project: clang. Repository: rG

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

2023-08-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158778/new/ https://reviews.llvm.org/D158778

[PATCH] D158695: [clang] Fix missing contract flag in sqrt intrinsic

2023-08-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 553250. yaxunl added a comment. fix test for strict fp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158695/new/ https://reviews.llvm.org/D158695 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/fp-contract-fast-pragma.cpp Index:

[PATCH] D158695: [clang] Fix missing contract flag in sqrt intrinsic

2023-08-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 553141. yaxunl marked 3 inline comments as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158695/new/ https://reviews.llvm.org/D158695 Files: clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D158695: [clang] Fix missing contract flag in sqrt intrinsic

2023-08-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:501 if (CGF.Builder.getIsFPConstrained()) { CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E); Function *F =

[PATCH] D158695: [clang] Fix missing contract flag in sqrt intrinsic

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: arsenm, rjmccall. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: wdng. Fix: https://github.com/llvm/llvm-project/issues/64653 https://reviews.llvm.org/D158695 Files:

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

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-code-object-version-linking.cu:12 +// RUN: llvm-link %t_0 %t_5 -o -| llvm-dis -o - | FileCheck -check-prefix=LINKED5 %s + +#include "Inputs/cuda.h" need to test using clang -cc1 with -O3

[PATCH] D155826: [HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155826/new/ https://reviews.llvm.org/D155826 ___ cfe-commits mailing list

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157452/new/ https://reviews.llvm.org/D157452 ___ cfe-commits mailing list

[PATCH] D158582: [AMDGPU] Prepend --no-undefined option for linker instead of append

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158582/new/ https://reviews.llvm.org/D158582 ___ cfe-commits mailing list

[PATCH] D158582: [AMDGPU] Prepend --no-undefined option for linker instead of append

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/Driver/amdgpu-toolchain-opencl.cl:34 +// RUN: %clang -### --target=amdgcn-amd-amdhsa-opencl -Xlinker --unresolved-symbols=ignore-all -x cl -mcpu=fiji -nogpulib %s 2>&1 | FileCheck -check-prefix=CHK-LINK_UR %s +//

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. seems some irrelevant change got into this patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:232 +execution seamlessly falls back to the host CPU. It is legal to specify multiple +``--offload-arcj``s. All the flags we introduce, as well as a thorough view of +various restrictions and their implications

[PATCH] D155826: [HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:590 + Builder.defineMacro("__HIPSTDPAR__"); + if (!LangOpts.CUDAIsDevice) +Builder.defineMacro("__HIPSTDPAR_INTERPOSE_ALLOC__"); We usually prefer defining the

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

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. 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 need to use -Xoffload-linker. There are multiple options affecting the handling of

[PATCH] D158367: [AMDGPU] Add target feature gds/gws to clang

2023-08-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: llvm/lib/TargetParser/TargetParser.cpp:289 Features["image-insts"] = true; + Features["gds"] = true; + Features["gws"] = true; arsenm wrote: > Gds feature is unused I am thinking to keep it in case we

[PATCH] D158367: [AMDGPU] Add target feature gds/gws to clang

2023-08-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: b-sumner, arsenm, foad. Herald added subscribers: StephenFan, kerbowa, hiraditya, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: wdng. Herald added a

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 551705. yaxunl marked 3 inline comments as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158247/new/ https://reviews.llvm.org/D158247 Files: clang/include/clang/Sema/Sema.h

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Sema/Sema.h:4753 + /// Otherwise, use \p D to determiine the host/device target. bool CheckCallingConvAttr(const ParsedAttr , CallingConv , +

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall, rsmith. Herald added subscribers: mattd, carlosgalvezp, kerbowa, jvesely. Herald added a reviewer: aaron.ballman. Herald added a project: All. yaxunl requested review of this revision. Currently, clang does not resolve certain

[PATCH] D155833: [Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-08-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155833/new/ https://reviews.llvm.org/D155833 ___ cfe-commits mailing list

[PATCH] D155833: [Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-08-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/SemaStdPar/device-can-call-host.cpp:1 +// RUN: %clang %s --stdpar --stdpar-path=%S/Inputs \ +// RUN: --stdpar-thrust-path=%S/Inputs --stdpar-prim-path=%S/Inputs \ can we use %clang_cc1 and omit the stdpar

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2422 +static void EmitStdParUnsupportedAsm(CodeGenFunction *CGF, const AsmStmt ) { + constexpr auto Name = "ASM__stdpar_unsupported"; + maybe prefix with `__` to avoid potential name

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. It is a little concerning how far the global address will spread further. Compared to handling user-defined global variables, we keep the global address to its definition in the IR and any use of it will use the generic pointer addrcasted from its definition. This

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

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157438/new/ https://reviews.llvm.org/D157438

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

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl 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] D154300: [CUDA][HIP] Fix template argument deduction

2023-08-08 Thread Yaxun Liu 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 rGea72a4e6547f: [CUDA][HIP] Fix template argument deduction (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM from HIP side. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D156795: [CUDA][HIP] Fix overloading resolution of delete operator

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG247cc265e74e: [CUDA][HIP] Fix overloading resolution of delete operator (authored by yaxunl). Herald added a project: clang. Changed prior to commit:

[PATCH] D154300: [CUDA][HIP] Fix template argument deduction

2023-08-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 547901. yaxunl marked an inline comment as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154300/new/ https://reviews.llvm.org/D154300 Files: clang/lib/Sema/SemaOverload.cpp

[PATCH] D154300: [CUDA][HIP] Fix template argument deduction

2023-08-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:12758-12764 +std::optional MorePreferableByCUDA = +CheckCUDAPreference(FD, Result); +// If FD has different CUDA preference than Result.

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

2023-08-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I would suggest separating the clang/llvm part into a separate review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139730/new/ https://reviews.llvm.org/D139730 ___ cfe-commits

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

2023-08-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. need a lit test for the codegen of the clang builtin for cov 4/5/none and a lit test to show the branching code generated with cov none can be optimized away when linked with cov4 or cov5. Comment at: clang/lib/CodeGen/Targets/AMDGPU.cpp:383 +

[PATCH] D157243: [HIP] Make test rocm-detect.hip more stable

2023-08-06 Thread Yaxun Liu 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 rGef888bc67c72: [HIP] Make test rocm-detect.hip more stable (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github

[PATCH] D157243: [HIP] Make test rocm-detect.hip more stable

2023-08-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: MaskRay, jhuber6. Herald added subscribers: kerbowa, jvesely. Herald added a project: All. yaxunl requested review of this revision. some downstream clang is configured to add -rpath to HIP runtime for ld. Also clang may use code object

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

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl 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 of

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

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG932c63550ad5: [HIP] link HIP runtime library without --hip-link (authored by yaxunl). Herald added a

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

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156928#4562023 , @yaxunl wrote: > In D156928#4561890 , > @JonChesterfield wrote: > >> In D156928#4561849 , @arsenm wrote: >> >>> In

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

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156928#4561890 , @JonChesterfield wrote: > In D156928#4561849 , @arsenm wrote: > >> In D156928#4561811 , >> @JonChesterfield wrote: >> >>>

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

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rGf037b895b7e9: [CUDA][HIP] Reorganize options for documentation (authored by yaxunl). Herald added a

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

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Options.td:155 +def offload_Group : OptionGroup<"">, Group, + DocName<"Common Offloading flags">; + MaskRay wrote: > The existing

[PATCH] D156935: [HIP] Fix test rocm-detect.hip

2023-08-02 Thread Yaxun Liu 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 rG590d7e266426: [HIP] Fix test rocm-detect.hip (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D156935: [HIP] Fix test rocm-detect.hip

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay, jhuber6. Herald added a project: All. yaxunl requested review of this revision. Two run lines fail due to missing device libs for gfx902, which are fixed by using gfx1010 which has device lib. The other two spack tests have to

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

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. `-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 still use it by using it with `-Xclang`. Repository: rG LLVM Github Monorepo

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

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156930/new/ https://reviews.llvm.org/D156930 ___ cfe-commits mailing list

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

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156363#4554693 , @jhuber6 wrote: > In D156363#4554687 , @yaxunl wrote: > >> In D156363#4554435 , @jhuber6 >> wrote: >> >>> Clang ::

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

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156363#4554435 , @jhuber6 wrote: > 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

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

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay, jhuber6. Herald added subscribers: mattd, carlosgalvezp, Naghasan, Anastasia. Herald added a reviewer: sscalpone. Herald added a project: All. yaxunl requested review of this revision. Herald added a reviewer: jdoerfert. Herald

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

2023-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156816#4551307 , @jhuber6 wrote: > In D156816#4551299 , @arsenm wrote: > >> I don't really see the point of doing this. These introduce ambiguous >> terminology. The reason you need

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

2023-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Are these attributes supposed to be used in other languages? Some of their names are meaningful only in OpenCL and could be confusing/ambiguous for other languages, e.g "global" and "local". Comment at: clang/include/clang/Basic/Attr.td:1348 +

[PATCH] D145345: [HIP] Fix regression about `__fp16` args and return value

2023-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f12dcac79f3: [HIP] Fix regression about `__fp16` args and return value (authored by yaxunl). Herald added a project: clang. Changed prior to commit:

[PATCH] D156795: [CUDA][HIP] Fix overloading resolution of delete operator

2023-08-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: mattd. Herald added a project: All. yaxunl requested review of this revision. Currently clang does not consider host/device preference when resolving delete operator in the file scope, which causes device

[PATCH] D155213: [Driver] Add `-f[no-]offload-uniform-block`

2023-07-27 Thread Yaxun Liu 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 rGac725310433a: [Driver] Add `-f[no-]offload-uniform-block` (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github

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

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. It is good to be consistent with GCC. Most amdgpu and HIP tests fail due to missing -nogpuinc or -nogpulib. I can help update them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:71 +In the above command, the ``--hip-link`` flag instructs Clang to link the HIP runtime library. However, +the use of this flag is unnecessary if a HIP input file is

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544812. yaxunl marked an inline comment as done. yaxunl added a reviewer: Anastasia. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155213/new/ https://reviews.llvm.org/D155213 Files:

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2391 if (TargetDecl->hasAttr()) { if (getLangOpts().OpenCLVersion <= 120) { scchan wrote: > The block here needs to be aware of this new

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

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544750. yaxunl marked an inline comment as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156426/new/ https://reviews.llvm.org/D156426 Files: clang/docs/HIPSupport.rst

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

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Driver.h:712 + /// Whether there are HIP input files. + bool hasHIPInputs() const { return HasHIPInputs; } + jhuber6 wrote: > Shouldn't we have access

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

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156426#4538646 , @jhuber6 wrote: > 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

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

2023-07-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, scchan, MaskRay, jhuber6. Herald added a project: All. yaxunl requested review of this revision. When doing combined compilation/link for HIP source files, clang should link the HIP runtime library automatically without `--hip-link`.

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544491. yaxunl edited the summary of this revision. yaxunl added a comment. make the option generic for offloading languages CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155213/new/ https://reviews.llvm.org/D155213 Files:

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

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

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. `__dynamic_cast` is part of standard C++ library. If we ever implement it for GPU, chances are we will use libc++abi with the same signature as other targets, i.e., the 2nd and 3rd arguments are generic pointers. I feel it is safer to do an address space cast when

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping I renamed the option as `-fno-offload-uniform-block`. I switched to `offload` instead of `gpu` because I think in the long run offloading toolchains are not limited to GPUs, therefore sooner or later we will feel `-fgpu-` options are awkward. I did not use

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544345. yaxunl retitled this revision from "[HIP] Add `-fno-hip-uniform-block`" to "[HIP] Add `-fno-offload-uniform-block`". yaxunl edited the summary of this revision. yaxunl added a comment. rename the option CHANGES SINCE LAST ACTION

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7228 + } else { +Args.ClaimAllArgs(options::OPT_fgpu_approx_transcendentals); +Args.ClaimAllArgs(options::OPT_fno_gpu_approx_transcendentals); MaskRay wrote: > You can use

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked 4 inline comments as done. Closed by commit rGe17882430e5c: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals` (authored by yaxunl). Herald added

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl closed this revision. yaxunl added a comment. committed by 19d3b37196553372e963bd70718bba1b0bfc94ee CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rG795e934e15b7: [HIP] Start document HIP support by clang (authored by yaxunl). Herald added a project: clang. Changed prior to commit:

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:30 + +Clang provides partial HIP support on Intel GPUs using the CHIP-Star project ``_. CHIP-Star implements the HIP runtime over

[PATCH] D154790: [HIP] Use native math functions for `-fcuda-approx-transcendentals`

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping It passes internal CI. Also tested with Blender main branch with -ffast-math and no regressions were found. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154790/new/ https://reviews.llvm.org/D154790 ___

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543671. yaxunl added a comment. fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/lang-std.cpp Index: clang/test/Preprocessor/lang-std.cpp

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543670. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/lang-std.cpp Index: clang/test/Preprocessor/lang-std.cpp

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543652. yaxunl marked an inline comment as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154123/new/ https://reviews.llvm.org/D154123 Files: clang/docs/HIPSupport.rst Index:

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:65 + + clang++ --offload-arch=gfx906 -xhip sample.cpp -o sample + arsenm wrote: > scchan wrote: > > missing --hip-link > What does hip-link do? Why is

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543640. yaxunl marked an inline comment as done. yaxunl added a reviewer: dyung. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 Files:

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/Preprocessor/lang-std.cpp:1 +// UNSUPPORTED: target={{.*-(ps4|ps5)}} /// Test default standards. dyung wrote: > This should be unneeded now, we recently updated the PS

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4528137 , @yaxunl wrote: > In D155539#4528094 , @probinson > wrote: > >> In D155539#4524543 , @yaxunl wrote: >> >>> In D155539#4524189

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: probinson. Herald added a project: All. yaxunl requested review of this revision. Recover the checking for the default language standard for C++. https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/lang-std.cpp Index:

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4528094 , @probinson wrote: > In D155539#4524543 , @yaxunl wrote: > >> In D155539#4524189 , @probinson >> wrote: >> >>> This change to

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154123/new/ https://reviews.llvm.org/D154123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4524189 , @probinson wrote: > This change to lang-std.cpp causes it not to verify _which_ language standard > is the default. It only verifies that cuda and hip don't _change_ it. > If you run FileCheck on one of those

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155982/new/ https://reviews.llvm.org/D155982 ___ cfe-commits mailing list

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:13-15 +#if __has_include("hip/hip_version.h") +#include "hip/hip_version.h" +#endif // __has_include("hip/hip_version.h") pls condition this with ``` #if

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319 +// relevant. +__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) { + return ((_Float16)1.0f) / x; arsenm wrote: > arsenm wrote: > > yaxunl wrote: > > >

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319 +// relevant. +__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) { + return ((_Float16)1.0f) / x; Can we add the deprecated attribute to urge people not

  1   2   3   4   5   6   7   8   9   10   >