Skip to content

Commit 316107f

Browse files
authored
[NVPTX] Add sm_88 and sm_110* arch support (#156857)
This change adds support of sm_88, sm_110, sm_110a, and sm_110f. These are added with PTX ISA version 9.0.
1 parent 46f2b35 commit 316107f

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

llvm/lib/Target/NVPTX/NVPTX.td

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ class FeaturePTX<int version>:
8080
// + Compare within the family by comparing FullSMVersion, given both belongs to
8181
// the same family.
8282
// + Detect 'a' variants by checking FullSMVersion & 1.
83-
foreach sm = [20, 21, 30, 32, 35, 37, 50, 52, 53,
84-
60, 61, 62, 70, 72, 75, 80, 86, 87,
85-
89, 90, 100, 101, 103, 120, 121] in {
83+
foreach sm = [20, 21, 30, 32, 35, 37, 50, 52, 53, 60,
84+
61, 62, 70, 72, 75, 80, 86, 87, 88, 89,
85+
90, 100, 101, 103, 110, 120, 121] in {
8686
// Base SM version (e.g. FullSMVersion for sm_100 is 1000)
8787
def SM#sm : FeatureSM<""#sm, !mul(sm, 10)>;
8888

@@ -127,6 +127,7 @@ def : Proc<"sm_75", [SM75, PTX63]>;
127127
def : Proc<"sm_80", [SM80, PTX70]>;
128128
def : Proc<"sm_86", [SM86, PTX71]>;
129129
def : Proc<"sm_87", [SM87, PTX74]>;
130+
def : Proc<"sm_88", [SM88, PTX90]>;
130131
def : Proc<"sm_89", [SM89, PTX78]>;
131132
def : Proc<"sm_90", [SM90, PTX78]>;
132133
def : Proc<"sm_90a", [SM90a, PTX80]>;
@@ -139,6 +140,9 @@ def : Proc<"sm_101f", [SM101f, PTX88]>;
139140
def : Proc<"sm_103", [SM103, PTX88]>;
140141
def : Proc<"sm_103a", [SM103a, PTX88]>;
141142
def : Proc<"sm_103f", [SM103f, PTX88]>;
143+
def : Proc<"sm_110", [SM110, PTX90]>;
144+
def : Proc<"sm_110a", [SM110a, PTX90]>;
145+
def : Proc<"sm_110f", [SM110f, PTX90]>;
142146
def : Proc<"sm_120", [SM120, PTX87]>;
143147
def : Proc<"sm_120a", [SM120a, PTX87]>;
144148
def : Proc<"sm_120f", [SM120f, PTX88]>;

llvm/test/CodeGen/NVPTX/sm-version.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_75 | FileCheck %s --check-prefix=SM75
1515
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_80 | FileCheck %s --check-prefix=SM80
1616
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_86 | FileCheck %s --check-prefix=SM86
17+
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_88 | FileCheck %s --check-prefix=SM88
1718
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_90 | FileCheck %s --check-prefix=SM90
1819
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_90a | FileCheck %s --check-prefix=SM90a
1920
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_100 | FileCheck %s --check-prefix=SM100
@@ -25,6 +26,9 @@
2526
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_103 | FileCheck %s --check-prefix=SM103
2627
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_103a | FileCheck %s --check-prefix=SM103a
2728
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_103f | FileCheck %s --check-prefix=SM103f
29+
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_110 | FileCheck %s --check-prefix=SM110
30+
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_110a | FileCheck %s --check-prefix=SM110a
31+
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_110f | FileCheck %s --check-prefix=SM110f
2832
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_120 | FileCheck %s --check-prefix=SM120
2933
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_120a | FileCheck %s --check-prefix=SM120a
3034
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_120f | FileCheck %s --check-prefix=SM120f
@@ -48,6 +52,7 @@
4852
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_75 | FileCheck %s --check-prefix=SM75
4953
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_80 | FileCheck %s --check-prefix=SM80
5054
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_86 | FileCheck %s --check-prefix=SM86
55+
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_88 | FileCheck %s --check-prefix=SM88
5156
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_90 | FileCheck %s --check-prefix=SM90
5257
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_90a | FileCheck %s --check-prefix=SM90a
5358
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_100 | FileCheck %s --check-prefix=SM100
@@ -59,6 +64,9 @@
5964
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_103 | FileCheck %s --check-prefix=SM103
6065
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_103a | FileCheck %s --check-prefix=SM103a
6166
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_103f | FileCheck %s --check-prefix=SM103f
67+
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_110 | FileCheck %s --check-prefix=SM110
68+
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_110a | FileCheck %s --check-prefix=SM110a
69+
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_110f | FileCheck %s --check-prefix=SM110f
6270
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_120 | FileCheck %s --check-prefix=SM120
6371
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_120a | FileCheck %s --check-prefix=SM120a
6472
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_120f | FileCheck %s --check-prefix=SM120f
@@ -82,6 +90,7 @@
8290
; SM75: .version 6.3
8391
; SM80: .version 7.0
8492
; SM86: .version 7.1
93+
; SM88: .version 9.0
8594
; SM90: .version 7.8
8695
; SM90a: .version 8.0
8796
; SM100: .version 8.6
@@ -93,6 +102,9 @@
93102
; SM103: .version 8.8
94103
; SM103a: .version 8.8
95104
; SM103f: .version 8.8
105+
; SM110: .version 9.0
106+
; SM110a: .version 9.0
107+
; SM110f: .version 9.0
96108
; SM120: .version 8.7
97109
; SM120a: .version 8.7
98110
; SM120f: .version 8.8
@@ -116,6 +128,7 @@
116128
; SM75: .target sm_75
117129
; SM80: .target sm_80
118130
; SM86: .target sm_86
131+
; SM88: .target sm_88
119132
; SM90: .target sm_90
120133
; SM90a: .target sm_90a
121134
; SM100: .target sm_100
@@ -127,6 +140,9 @@
127140
; SM103: .target sm_103
128141
; SM103a: .target sm_103a
129142
; SM103f: .target sm_103f
143+
; SM110: .target sm_110
144+
; SM110a: .target sm_110a
145+
; SM110f: .target sm_110f
130146
; SM120: .target sm_120
131147
; SM120a: .target sm_120a
132148
; SM120f: .target sm_120f

0 commit comments

Comments
 (0)