Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 1019a8d

Browse files
committed
Use ext_oneapi_bfloat16 aspect where appropriate.
Signed-off-by: JackAKirk <[email protected]>
1 parent 2211aac commit 1019a8d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

SYCL/BFloat16/bfloat16_builtins.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,7 @@ bool check(float a, float b) {
218218
int main() {
219219
queue q;
220220

221-
auto computeCapability =
222-
std::stof(q.get_device().get_info<sycl::info::device::backend_version>());
223-
// TODO check for "ext_oneapi_bfloat16" aspect instead once aspect is
224-
// supported. Since this test only covers CUDA the current check is
225-
// functionally equivalent to "ext_oneapi_bfloat16".
226-
if (computeCapability >= 8.0) {
221+
if (q.get_device().has(aspect::ext_oneapi_bfloat16)) {
227222
std::vector<float> a(N), b(N), c(N);
228223
int err = 0;
229224

0 commit comments

Comments
 (0)