1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[CUDA] Added rudimentary support for CUDA-9 and sm_70.

For now CUDA-9 is not included in the list of CUDA versions clang
searches for, so the path to CUDA-9 must be explicitly passed
via --cuda-path=.

On LLVM side NVPTX added sm_70 GPU type which bumps required
PTX version to 6.0, but otherwise is equivalent to sm_62 at the moment.

Differential Revision: https://reviews.llvm.org/D37576

llvm-svn: 312734
This commit is contained in:
Artem Belevich 2017-09-07 18:14:32 +00:00
parent c7e2e6d999
commit 136e458b75
2 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,8 @@ def SM61 : SubtargetFeature<"sm_61", "SmVersion", "61",
"Target SM 6.1">;
def SM62 : SubtargetFeature<"sm_62", "SmVersion", "62",
"Target SM 6.2">;
def SM70 : SubtargetFeature<"sm_70", "SmVersion", "70",
"Target SM 7.0">;
def SATOM : SubtargetFeature<"satom", "HasAtomScope", "true",
"Atomic operations with scope">;
@ -67,6 +69,8 @@ def PTX43 : SubtargetFeature<"ptx43", "PTXVersion", "43",
"Use PTX version 4.3">;
def PTX50 : SubtargetFeature<"ptx50", "PTXVersion", "50",
"Use PTX version 5.0">;
def PTX60 : SubtargetFeature<"ptx60", "PTXVersion", "60",
"Use PTX version 6.0">;
//===----------------------------------------------------------------------===//
// NVPTX supported processors.
@ -87,6 +91,7 @@ def : Proc<"sm_53", [SM53, PTX42]>;
def : Proc<"sm_60", [SM60, PTX50, SATOM]>;
def : Proc<"sm_61", [SM61, PTX50, SATOM]>;
def : Proc<"sm_62", [SM62, PTX50, SATOM]>;
def : Proc<"sm_70", [SM70, PTX60, SATOM]>;
def NVPTXInstrInfo : InstrInfo {
}

View File

@ -0,0 +1,5 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_70 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_70 | FileCheck %s
; CHECK: .version 6.0
; CHECK: .target sm_70