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

Commit 354180c

Browse files
[SYCL] Fix failures on tests that use double datatype
1 parent 44697ec commit 354180c

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

SYCL/ESIMD/regression/dgetrf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: gpu
9+
// REQUIRES: gpu, aspect-fp64
1010
// UNSUPPORTED: cuda || hip
1111
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
1212
// RUN: %GPU_RUN_PLACEHOLDER %t.out 3 2 1

SYCL/ESIMD/regression/dgetrf_8x8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// REQUIRES: gpu
8+
// REQUIRES: gpu, aspect-fp64
99
// UNSUPPORTED: cuda || hip
1010
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
1111
// RUN: %GPU_RUN_PLACEHOLDER %t.out 1

SYCL/ESIMD/regression/dgetrf_ref.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: gpu
9+
// REQUIRES: gpu, aspect-fp64
1010
// UNSUPPORTED: cuda || hip
1111
// RUN: %clangxx -fsycl -DUSE_REF %s -I%S/.. -o %t.ref.out
1212
// RUN: %GPU_RUN_PLACEHOLDER %t.ref.out 3 2 1

SYCL/ESIMD/spec_const/spec_const_double.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// REQUIRES: gpu
8+
// REQUIRES: gpu, aspect-fp64
99
// RUN: %clangxx -fsycl -I%S/.. %s -o %t.out
1010
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1111
// UNSUPPORTED: cuda || hip

SYCL/KernelParams/union_kernel_param.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ union TestUnion {
1212
public:
1313
int myint;
1414
char mychar;
15-
double mydouble;
15+
float myfloat;
1616

17-
TestUnion() { mydouble = 0.0; };
17+
TestUnion() { myfloat = 0.0f; };
1818
};
1919

2020
int main(int argc, char **argv) {
2121
TestUnion x;
22-
x.mydouble = 5.0;
23-
double mydouble = 0.0;
22+
x.myfloat = 5.0f;
23+
float myfloat = 0.0f;
2424

2525
sycl::queue queue;
2626
{
27-
sycl::buffer<double, 1> buf(&mydouble, 1);
27+
sycl::buffer<float, 1> buf(&myfloat, 1);
2828
queue.submit([&](sycl::handler &cgh) {
2929
auto acc = buf.get_access<sycl::access::mode::read_write>(cgh);
30-
cgh.single_task<class test>([=]() { acc[0] = x.mydouble; });
30+
cgh.single_task<class test>([=]() { acc[0] = x.myfloat; });
3131
});
3232
}
3333

34-
if (mydouble != 5.0) {
35-
printf("FAILED\nmydouble = %d\n", mydouble);
34+
if (myfloat != 5.0f) {
35+
printf("FAILED\nmyfloat = %d\n", myfloat);
3636
return 1;
3737
}
3838
return 0;

SYCL/SubGroup/info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main() {
2424

2525
/* Basic sub-group functionality is supported as part of cl_khr_subgroups
2626
* extension or as core OpenCL 2.1 feature. */
27-
if (!core_sg_supported(Device)) {
27+
if (!core_sg_supported(Device) || !Device.has(aspect::fp64)) {
2828
std::cout << "Skipping test\n";
2929
return 0;
3030
}

0 commit comments

Comments
 (0)