Skip to content

Commit 9897296

Browse files
committed
feat(bezeir): add spt gen
1 parent 0c38bf0 commit 9897296

2 files changed

Lines changed: 204 additions & 4 deletions

File tree

bezier_sycl.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"github.com/fumiama/gozel/ze"
77
)
88

9-
//go:generate clang++ -fsycl -fsycl-device-only -fsycl-targets=spirv64 -Xclang -emit-llvm-bc bezier_sycl.cpp -o device_bezier_kern.bc
10-
//go:generate sycl-post-link -symbols -split=auto -o device_bezier_kern.table device_bezier_kern.bc
11-
//go:generate llvm-spirv -o bezier_sycl.spv device_bezier_kern_0.bc
12-
//go:generate clang++ -target spirv64-unknown-unknown -S -emit-llvm -x ir device_bezier_kern_0.bc -o bezier_sycl.ll
9+
//go:generate clang++ -fsycl -fsycl-device-only -fno-sycl-instrument-device-code -fsycl-targets=spirv64 -Xclang -emit-llvm-bc bezier_sycl.cpp -o device_bezier_kern.bc
10+
//go:generate sycl-post-link -symbols -split=auto -emit-param-info -properties -o device_bezier_kern.table device_bezier_kern.bc
11+
//go:generate llvm-spirv --sycl-opt -o bezier_sycl.spv device_bezier_kern_0.bc
12+
//go:generate clang++ -target spirv64-unknown-unknown -S -emit-llvm -x ir device_bezier_kern_0.bc -o main.ll
13+
//go:generate llvm-spirv -to-text bezier_sycl.spv -o bezier_sycl.spt
1314

1415
//go:embed bezier_sycl.spv
1516
var bezierspv []byte

bezier_sycl.spt

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
119734787 66560 393230 135 0
2+
2 Capability Addresses
3+
2 Capability Linkage
4+
2 Capability Kernel
5+
2 Capability Float64
6+
2 Capability Int64
7+
2 Capability GenericPointer
8+
2 Capability Int8
9+
5 ExtInstImport 1 "OpenCL.std"
10+
3 MemoryModel 2 2
11+
10 EntryPoint 6 111 "__sycl_kernel_quadratic" 5
12+
9 EntryPoint 6 122 "__sycl_kernel_cubic" 5
13+
3 ExecutionMode 111 31
14+
3 ExecutionMode 122 31
15+
3 Source 4 100000
16+
11 Name 5 "__spirv_BuiltInGlobalInvocationId"
17+
6 Name 8 "struct.point"
18+
8 Name 11 "__sycl_kernel_quadratic"
19+
7 Name 52 "__sycl_kernel_cubic"
20+
4 Name 67 "cubic"
21+
22+
13 Decorate 5 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
23+
3 Decorate 5 Constant
24+
4 Decorate 5 BuiltIn 28
25+
4 Decorate 5 Alignment 32
26+
10 Decorate 11 LinkageAttributes "__sycl_kernel_quadratic" Export
27+
4 Decorate 19 FuncParamAttr 5
28+
4 Decorate 19 Alignment 8
29+
9 Decorate 52 LinkageAttributes "__sycl_kernel_cubic" Export
30+
4 Decorate 62 Alignment 8
31+
4 Decorate 119 FuncParamAttr 5
32+
4 Decorate 119 Alignment 8
33+
4 Decorate 132 Alignment 8
34+
4 TypeInt 2 64 0
35+
4 TypeInt 45 8 0
36+
5 Constant 2 24 2147483648 0
37+
5 Constant 2 48 8 0
38+
4 TypeVector 3 2 3
39+
4 TypePointer 4 5 3
40+
2 TypeVoid 6
41+
3 TypeFloat 7 64
42+
4 TypeStruct 8 7 7
43+
44+
4 TypePointer 9 5 8
45+
11 TypeFunction 10 6 7 7 7 7 7 7 7 9
46+
4 TypePointer 21 5 2
47+
2 TypeBool 25
48+
4 TypePointer 40 5 7
49+
4 TypePointer 46 5 45
50+
13 TypeFunction 51 6 7 7 7 7 7 7 7 7 7 9
51+
4 TypePointer 64 8 8
52+
13 TypeFunction 66 6 7 7 7 7 7 7 7 7 7 64
53+
4 TypePointer 101 8 7
54+
4 TypePointer 107 8 45
55+
4 Variable 4 5 5
56+
5 Constant 7 29 0 1072693248
57+
5 Constant 7 32 0 1073741824
58+
5 Constant 7 88 0 1074266112
59+
60+
61+
62+
5 Function 6 11 0 10
63+
3 FunctionParameter 7 12
64+
3 FunctionParameter 7 13
65+
3 FunctionParameter 7 14
66+
3 FunctionParameter 7 15
67+
3 FunctionParameter 7 16
68+
3 FunctionParameter 7 17
69+
3 FunctionParameter 7 18
70+
3 FunctionParameter 9 19
71+
72+
2 Label 20
73+
4 Bitcast 21 22 5
74+
6 Load 2 23 22 2 32
75+
5 ULessThan 25 26 23 24
76+
4 ConvertUToF 7 27 23
77+
5 FDiv 7 28 27 18
78+
5 FSub 7 30 29 28
79+
5 FMul 7 31 30 30
80+
5 FMul 7 33 30 32
81+
5 FMul 7 34 33 28
82+
5 FMul 7 35 28 28
83+
5 FMul 7 36 34 14
84+
8 ExtInst 7 37 1 mad 31 12 36
85+
8 ExtInst 7 38 1 mad 35 16 37
86+
5 InBoundsPtrAccessChain 9 39 19 23
87+
4 Bitcast 40 41 39
88+
5 Store 41 38 2 8
89+
5 FMul 7 42 34 15
90+
8 ExtInst 7 43 1 mad 31 13 42
91+
8 ExtInst 7 44 1 mad 35 17 43
92+
4 Bitcast 46 47 39
93+
5 InBoundsPtrAccessChain 46 49 47 48
94+
4 Bitcast 40 50 49
95+
5 Store 50 44 2 8
96+
1 Return
97+
98+
1 FunctionEnd
99+
100+
5 Function 6 52 0 51
101+
3 FunctionParameter 7 53
102+
3 FunctionParameter 7 54
103+
3 FunctionParameter 7 55
104+
3 FunctionParameter 7 56
105+
3 FunctionParameter 7 57
106+
3 FunctionParameter 7 58
107+
3 FunctionParameter 7 59
108+
3 FunctionParameter 7 60
109+
3 FunctionParameter 7 61
110+
3 FunctionParameter 9 62
111+
112+
2 Label 63
113+
4 PtrCastToGeneric 64 65 62
114+
14 FunctionCall 6 78 67 53 54 55 56 57 58 59 60 61 65
115+
1 Return
116+
117+
1 FunctionEnd
118+
119+
5 Function 6 67 0 66
120+
3 FunctionParameter 7 68
121+
3 FunctionParameter 7 69
122+
3 FunctionParameter 7 70
123+
3 FunctionParameter 7 71
124+
3 FunctionParameter 7 72
125+
3 FunctionParameter 7 73
126+
3 FunctionParameter 7 74
127+
3 FunctionParameter 7 75
128+
3 FunctionParameter 7 76
129+
3 FunctionParameter 64 77
130+
131+
2 Label 79
132+
4 Bitcast 21 80 5
133+
6 Load 2 81 80 2 32
134+
5 ULessThan 25 82 81 24
135+
4 ConvertUToF 7 83 81
136+
5 FDiv 7 84 83 76
137+
5 FSub 7 85 29 84
138+
5 FMul 7 86 85 85
139+
5 FMul 7 87 86 85
140+
5 FMul 7 89 85 88
141+
5 FMul 7 90 89 85
142+
5 FMul 7 91 90 84
143+
5 FMul 7 92 89 84
144+
5 FMul 7 93 92 84
145+
5 FMul 7 94 84 84
146+
5 FMul 7 95 94 84
147+
5 FMul 7 96 91 70
148+
8 ExtInst 7 97 1 mad 87 68 96
149+
8 ExtInst 7 98 1 mad 93 72 97
150+
8 ExtInst 7 99 1 mad 95 74 98
151+
5 InBoundsPtrAccessChain 64 100 77 81
152+
4 Bitcast 101 102 100
153+
5 Store 102 99 2 8
154+
5 FMul 7 103 91 71
155+
8 ExtInst 7 104 1 mad 87 69 103
156+
8 ExtInst 7 105 1 mad 93 73 104
157+
8 ExtInst 7 106 1 mad 95 75 105
158+
4 Bitcast 107 108 100
159+
5 InBoundsPtrAccessChain 107 109 108 48
160+
4 Bitcast 101 110 109
161+
5 Store 110 106 2 8
162+
1 Return
163+
164+
1 FunctionEnd
165+
166+
5 Function 6 111 0 10
167+
3 FunctionParameter 7 112
168+
3 FunctionParameter 7 113
169+
3 FunctionParameter 7 114
170+
3 FunctionParameter 7 115
171+
3 FunctionParameter 7 116
172+
3 FunctionParameter 7 117
173+
3 FunctionParameter 7 118
174+
3 FunctionParameter 9 119
175+
176+
2 Label 120
177+
12 FunctionCall 6 121 11 112 113 114 115 116 117 118 119
178+
1 Return
179+
180+
1 FunctionEnd
181+
182+
5 Function 6 122 0 51
183+
3 FunctionParameter 7 123
184+
3 FunctionParameter 7 124
185+
3 FunctionParameter 7 125
186+
3 FunctionParameter 7 126
187+
3 FunctionParameter 7 127
188+
3 FunctionParameter 7 128
189+
3 FunctionParameter 7 129
190+
3 FunctionParameter 7 130
191+
3 FunctionParameter 7 131
192+
3 FunctionParameter 9 132
193+
194+
2 Label 133
195+
14 FunctionCall 6 134 52 123 124 125 126 127 128 129 130 131 132
196+
1 Return
197+
198+
1 FunctionEnd
199+

0 commit comments

Comments
 (0)