1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mcpu=sm_90 -mattr=+ptx90 | FileCheck %s
target triple = "nvptx64-nvidia-cuda"
; Test "blocksareclusters" attribute with full "reqntid" and "cluster_dim"
; attributes.
define ptx_kernel void @kernel1(ptr %input, ptr %output) #0 #1 #2 {
; CHECK-LABEL: kernel1(
; CHECK: .reqntid 1024, 1, 1
; CHECK-NEXT: .reqnctapercluster 2, 2, 2
; CHECK-NEXT: .blocksareclusters
; CHECK-NEXT: {
; CHECK-EMPTY:
; CHECK-EMPTY:
; CHECK-NEXT: // %bb.0:
; CHECK-NEXT: ret;
ret void
}
; Test "blocksareclusters" attribute with single dimension "reqntid" and
; "cluster_dim" attributes.
define ptx_kernel void @kernel2(ptr %input, ptr %output) #0 #3 #4 {
; CHECK-LABEL: kernel2(
; CHECK: .reqntid 1024
; CHECK-NEXT: .reqnctapercluster 2
; CHECK-NEXT: .blocksareclusters // @kernel2
; CHECK-NEXT: {
; CHECK-EMPTY:
; CHECK-EMPTY:
; CHECK-NEXT: // %bb.0:
; CHECK-NEXT: ret;
ret void
}
; Test "blocksareclusters" attribute with two dimensions(not z dimension)
; "reqntid" and "cluster_dim" attributes.
define ptx_kernel void @kernel3(ptr %input, ptr %output) #0 #5 #6 {
; CHECK-LABEL: kernel3(
; CHECK: .reqntid 512, 2
; CHECK-NEXT: .reqnctapercluster 2, 2
; CHECK-NEXT: .blocksareclusters // @kernel3
; CHECK-NEXT: {
; CHECK-EMPTY:
; CHECK-EMPTY:
; CHECK-NEXT: // %bb.0:
; CHECK-NEXT: ret;
ret void
}
attributes #0 = { "nvvm.blocksareclusters" }
attributes #1 = { "nvvm.reqntid"="1024,1,1" }
attributes #2 = { "nvvm.cluster_dim"="2,2,2" }
attributes #3 = { "nvvm.reqntid"="1024" }
attributes #4 = { "nvvm.cluster_dim"="2" }
attributes #5 = { "nvvm.reqntid"="512,2" }
attributes #6 = { "nvvm.cluster_dim"="2,2" }
|