File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
source/detail/kernel_compiler Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,12 @@ bool OpenCLC_Supports_Extension(
340
340
" trouble parsing query returned from CL_DEVICE_EXTENSIONS_WITH_VERSION "
341
341
" - extension not followed by colon (:)" );
342
342
}
343
+
344
+ // Note that VersionPtr is an optional parameter in
345
+ // ext_oneapi_supports_cl_extension().
346
+ if (!VersionPtr)
347
+ return true ;
348
+
343
349
colon++; // move it forward
344
350
345
351
size_t space = ExtensionByVersionLog.find (' ' , colon); // could be npos
@@ -360,7 +366,6 @@ bool OpenCLC_Supports_Extension(
360
366
VersionPtr->major = std::stoi (versionVec[0 ]);
361
367
VersionPtr->minor = std::stoi (versionVec[1 ]);
362
368
VersionPtr->patch = std::stoi (versionVec[2 ]);
363
-
364
369
return true ;
365
370
}
366
371
Original file line number Diff line number Diff line change @@ -41,6 +41,26 @@ int main() {
41
41
" version not updated" );
42
42
}
43
43
44
+ // test without version pointer
45
+ bool has_bf16_conversion =
46
+ d.ext_oneapi_supports_cl_extension (" cl_intel_bf16_conversion" );
47
+ std::cout << " has_bf16_conversion: " << has_bf16_conversion << std::endl;
48
+ bool has_subgroup_matrix_multiply_accumulate =
49
+ d.ext_oneapi_supports_cl_extension (
50
+ " cl_intel_subgroup_matrix_multiply_accumulate" );
51
+ std::cout << " has_subgroup_matrix_multiply_accumulate: "
52
+ << has_subgroup_matrix_multiply_accumulate << std::endl;
53
+ bool has_subgroup_matrix_multiply_accumulate_tensor_float32 =
54
+ d.ext_oneapi_supports_cl_extension (
55
+ " cl_intel_subgroup_matrix_multiply_accumulate_tensor_float32" );
56
+ std::cout << " has_subgroup_matrix_multiply_accumulate_tensor_float32: "
57
+ << has_subgroup_matrix_multiply_accumulate_tensor_float32
58
+ << std::endl;
59
+ bool has_subgroup_2d_block_io =
60
+ d.ext_oneapi_supports_cl_extension (" cl_intel_subgroup_2d_block_io" );
61
+ std::cout << " has_subgroup_2d_block_io: " << has_subgroup_2d_block_io
62
+ << std::endl;
63
+
44
64
// no supported devices support EMBEDDED_PROFILE at this time.
45
65
assert (d.ext_oneapi_cl_profile () == " FULL_PROFILE" &&
46
66
" unexpected cl_profile" );
You can’t perform that action at this time.
0 commit comments