[PATCH] D63277: Don't set "comdat" attribute for CUDA device stub functions.

2019-06-13 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov created this revision. kpyzhov added a reviewer: rjmccall. kpyzhov added projects: clang, AMDGPU. Herald added a subscriber: cfe-commits. When compiling the HOST part of CUDA programs, clang replaces device kernels with so-called "stub" functions that contains a few calls to the Runtime

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4294 setNonAliasAttributes(GD, Fn); SetLLVMFunctionAttributesForDefinition(D, Fn); if (const ConstructorAttr *CA = D->getAttr()) tra wrote: > Perhaps this should be pushed

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov updated this revision to Diff 205655. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63277/new/ https://reviews.llvm.org/D63277 Files: clang/lib/CodeGen/CodeGenModule.cpp Index: clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. In D63277#1550870 , @rjmccall wrote: > This optimization is disabled for functions not in COMDAT sections? Is that > documented somewhere? It is documented here:

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-28 Thread Konstantin Pyzhov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6d614a82a423: Summary: This CL adds clang declarations of built-in functions for AMDGPU MFMA… (authored by kpyzhov). Herald added a subscriber: kerbowa. Changed prior to commit:

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-28 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. Thanks for reporting this. Somehow I managed to push empty test files. I'll push the fix soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72723/new/ https://reviews.llvm.org/D72723

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-28 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. I've pushed the fix already. Is something still broken? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72723/new/ https://reviews.llvm.org/D72723 ___ cfe-commits mailing list

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-15 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. In D72723#1821917 , @arsenm wrote: > Having two subtarget features for the same feature is an issue ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72723/new/ https://reviews.llvm.org/D72723

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-15 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov updated this revision to Diff 238263. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72723/new/ https://reviews.llvm.org/D72723 Files: clang/include/clang/Basic/BuiltinsAMDGPU.def clang/lib/Basic/Targets/AMDGPU.cpp clang/test/CodeGenOpenCL/builtins-amdgcn-mfma.cl

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-15 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov updated this revision to Diff 238259. kpyzhov added a reviewer: arsenm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72723/new/ https://reviews.llvm.org/D72723 Files: clang/include/clang/Basic/BuiltinsAMDGPU.def

[PATCH] D72723: Built-in functions for AMDGPU MFMA instructions.

2020-01-14 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov created this revision. kpyzhov added a reviewer: yaxunl. kpyzhov added a project: AMDGPU. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl, arsenm. Herald added projects: clang, LLVM. Added declarations of MFMA

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2021-12-07 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. In D115283#3177615 , @dfukalov wrote: > Needs a test. Yes, good point, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115283/new/ https://reviews.llvm.org/D115283

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2021-12-07 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov created this revision. kpyzhov added a reviewer: yaxunl. kpyzhov added a project: AMDGPU. Herald added subscribers: t-tye, tpr, dstuttard, kzhuravl. kpyzhov requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. Repository: rG LLVM

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2021-12-07 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov updated this revision to Diff 392577. Herald added subscribers: kerbowa, nhaehnle, jvesely. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115283/new/ https://reviews.llvm.org/D115283 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2021-12-08 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added inline comments. Comment at: clang/test/CodeGenHIP/amdgpu_hostcall.cpp:2-6 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -DFN_HOSTCALL \ +// RUN: -o - %s | FileCheck --enable-var-scope %s + +// RUN: %clang_cc1 -triple

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2021-12-08 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. In D115283#3179651 , @yaxunl wrote: > One drawback of this approach is that it does not work for LLVM modules > generated from assembly or programmatically e.g. Tensorflow XLA. > > Another drawback is that if

[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

2021-12-08 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. In D115283#3180836 , @yaxunl wrote: > If we only need to check whether `__ockl_hostcall_internal` exists in the > final module in LLVM codegen to determine whether we need the hostcall > metadata, probably we don't even need a