@@ -64,11 +64,18 @@ class Hpctoolkit(AutotoolsPackage):
64
64
description = 'Needed when MPICXX builds static binaries '
65
65
'for the compute nodes.' )
66
66
67
+ variant ('cuda' , default = False ,
68
+ description = 'Support CUDA on NVIDIA GPUs (2020.03.01 or later).' )
69
+
67
70
variant ('level_zero' , default = False ,
68
71
description = 'Support Level Zero on Intel GPUs (2022.04.15 or later).' )
69
72
70
- variant ('cuda' , default = False ,
71
- description = 'Support CUDA on NVIDIA GPUs (2020.03.01 or later).' )
73
+ variant ('gtpin' , default = False ,
74
+ description = 'Support instrumenting Intel GPU kernels with Intel GT-Pin '
75
+ '(2022.05.15 or later, and requires level_zero).' )
76
+
77
+ variant ('opencl' , default = False ,
78
+ description = 'Support OpenCL' )
72
79
73
80
variant ('rocm' , default = False ,
74
81
description = 'Support ROCM on AMD GPUs (2022.04.15 or later).' )
@@ -107,6 +114,10 @@ class Hpctoolkit(AutotoolsPackage):
107
114
108
115
depends_on ('cuda' , when = '+cuda' )
109
116
depends_on ('oneapi-level-zero' , when = '+level_zero' )
117
+ depends_on ('oneapi-igc' , when = '+gtpin' )
118
+ depends_on ('intel-gtpin' , when = '+gtpin' )
119
+ depends_on ('opencl-c-headers' , when = '+opencl' )
120
+
110
121
depends_on ('intel-xed+pic' , when = 'target=x86_64:' )
111
122
depends_on ('memkind' , type = ('build' , 'run' ), when = '@2021.05.01:' )
112
123
depends_on ('papi' , when = '+papi' )
@@ -131,6 +142,9 @@ class Hpctoolkit(AutotoolsPackage):
131
142
conflicts ('+cuda' , when = '@:2019' ,
132
143
msg = 'cuda requires 2020.03.01 or later' )
133
144
145
+ conflicts ('+gtpin' , when = '~level_zero' ,
146
+ msg = 'gtpin requires level_zero' )
147
+
134
148
conflicts ('+rocm' , when = '@:2022.03' ,
135
149
msg = 'rocm requires 2022.04.15 or later' )
136
150
@@ -168,24 +182,19 @@ def configure_args(self):
168
182
]
169
183
170
184
if spec .satisfies ('@:master' ):
171
- args .append ('--with-binutils=%s' % spec ['binutils' ].prefix )
172
- args .append ('--with-libdwarf=%s' % spec ['libdwarf' ].prefix )
173
-
174
- if '+cuda' in spec :
175
- args .append ('--with-cuda=%s' % spec ['cuda' ].prefix )
176
-
177
- if '+level_zero' in spec :
178
- args .append ('--with-level0=%s' % spec ['oneapi-level-zero' ].prefix )
185
+ args .extend ([
186
+ '--with-binutils=%s' % spec ['binutils' ].prefix ,
187
+ '--with-libdwarf=%s' % spec ['libdwarf' ].prefix ,
188
+ ])
189
+ else :
190
+ args .append ('--with-libiberty=%s' % spec ['libiberty' ].prefix )
179
191
180
192
if spec .satisfies ('@:2020.09' ):
181
193
args .append ('--with-gotcha=%s' % spec ['gotcha' ].prefix )
182
194
183
195
if spec .target .family == 'x86_64' :
184
196
args .append ('--with-xed=%s' % spec ['intel-xed' ].prefix )
185
197
186
- if spec .satisfies ('@develop' ):
187
- args .append ('--with-libiberty=%s' % spec ['libiberty' ].prefix )
188
-
189
198
if spec .satisfies ('@:2022.03' ):
190
199
args .append ('--with-mbedtls=%s' % spec ['mbedtls' ].prefix )
191
200
@@ -197,6 +206,21 @@ def configure_args(self):
197
206
else :
198
207
args .append ('--with-perfmon=%s' % spec ['libpfm4' ].prefix )
199
208
209
+ if '+cuda' in spec :
210
+ args .append ('--with-cuda=%s' % spec ['cuda' ].prefix )
211
+
212
+ if '+level_zero' in spec :
213
+ args .append ('--with-level0=%s' % spec ['oneapi-level-zero' ].prefix )
214
+
215
+ if '+opencl' in spec :
216
+ args .append ('--with-opencl=%s' % spec ['opencl-c-headers' ].prefix )
217
+
218
+ if '+gtpin' in spec :
219
+ args .extend ([
220
+ '--with-gtpin=%s' % spec ['intel-gtpin' ].prefix ,
221
+ '--with-igc=%s' % spec ['oneapi-igc' ].prefix ,
222
+ ])
223
+
200
224
if spec .satisfies ('+rocm' ):
201
225
args .extend ([
202
226
'--with-rocm-hip=%s' % spec ['hip' ].prefix ,
0 commit comments