diff options
author | Artem Belevich <tra@google.com> | 2019-04-25 22:28:09 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2019-04-25 22:28:09 +0000 |
commit | 5fe85a003f6b6ba3c2b83c319d1c160ca7af7c7c (patch) | |
tree | 50365a275ecd4099aa476aca85492dd47702fb30 /clang/lib/Basic/Targets | |
parent | 16737538f4fc4757ae5226e95b177155ed8e13ad (diff) | |
download | bcm5719-llvm-5fe85a003f6b6ba3c2b83c319d1c160ca7af7c7c.tar.gz bcm5719-llvm-5fe85a003f6b6ba3c2b83c319d1c160ca7af7c7c.zip |
[CUDA] Implemented _[bi]mma* builtins.
These builtins provide access to the new integer and
sub-integer variants of MMA (matrix multiply-accumulate) instructions
provided by CUDA-10.x on sm_75 (AKA Turing) GPUs.
Also added a feature for PTX 6.4. While Clang/LLVM does not generate
any PTX instructions that need it, we still need to pass it through to
ptxas in order to be able to compile code that uses the new 'mma'
instruction as inline assembly (e.g used by NVIDIA's CUTLASS library
https://github.com/NVIDIA/cutlass/blob/master/cutlass/arch/mma.h#L101)
Differential Revision: https://reviews.llvm.org/D60279
llvm-svn: 359248
Diffstat (limited to 'clang/lib/Basic/Targets')
-rw-r--r-- | clang/lib/Basic/Targets/NVPTX.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/NVPTX.cpp b/clang/lib/Basic/Targets/NVPTX.cpp index 0eb70767aa9..ee4eb898a10 100644 --- a/clang/lib/Basic/Targets/NVPTX.cpp +++ b/clang/lib/Basic/Targets/NVPTX.cpp @@ -44,6 +44,8 @@ NVPTXTargetInfo::NVPTXTargetInfo(const llvm::Triple &Triple, if (!Feature.startswith("+ptx")) continue; PTXVersion = llvm::StringSwitch<unsigned>(Feature) + .Case("+ptx64", 64) + .Case("+ptx63", 63) .Case("+ptx61", 61) .Case("+ptx60", 60) .Case("+ptx50", 50) |