This repository was archived by the owner on Mar 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- // REQUIRES: gpu
9
+ // REQUIRES: gpu, aspect-fp64
10
10
// UNSUPPORTED: cuda || hip
11
11
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
12
12
// RUN: %GPU_RUN_PLACEHOLDER %t.out 3 2 1
Original file line number Diff line number Diff line change 5
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
- // REQUIRES: gpu
8
+ // REQUIRES: gpu, aspect-fp64
9
9
// UNSUPPORTED: cuda || hip
10
10
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
11
11
// RUN: %GPU_RUN_PLACEHOLDER %t.out 1
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- // REQUIRES: gpu
9
+ // REQUIRES: gpu, aspect-fp64
10
10
// UNSUPPORTED: cuda || hip
11
11
// RUN: %clangxx -fsycl -DUSE_REF %s -I%S/.. -o %t.ref.out
12
12
// RUN: %GPU_RUN_PLACEHOLDER %t.ref.out 3 2 1
Original file line number Diff line number Diff line change 5
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
- // REQUIRES: gpu
8
+ // REQUIRES: gpu, aspect-fp64
9
9
// RUN: %clangxx -fsycl -I%S/.. %s -o %t.out
10
10
// RUN: %GPU_RUN_PLACEHOLDER %t.out
11
11
// UNSUPPORTED: cuda || hip
Original file line number Diff line number Diff line change @@ -12,27 +12,27 @@ union TestUnion {
12
12
public:
13
13
int myint;
14
14
char mychar;
15
- double mydouble ;
15
+ float myfloat ;
16
16
17
- TestUnion () { mydouble = 0.0 ; };
17
+ TestUnion () { myfloat = 0 .0f ; };
18
18
};
19
19
20
20
int main (int argc, char **argv) {
21
21
TestUnion x;
22
- x.mydouble = 5.0 ;
23
- double mydouble = 0.0 ;
22
+ x.myfloat = 5 .0f ;
23
+ float myfloat = 0 .0f ;
24
24
25
25
sycl::queue queue;
26
26
{
27
- sycl::buffer<double , 1 > buf (&mydouble , 1 );
27
+ sycl::buffer<float , 1 > buf (&myfloat , 1 );
28
28
queue.submit ([&](sycl::handler &cgh) {
29
29
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 ; });
31
31
});
32
32
}
33
33
34
- if (mydouble != 5.0 ) {
35
- printf (" FAILED\n mydouble = %d\n " , mydouble );
34
+ if (myfloat != 5 .0f ) {
35
+ printf (" FAILED\n myfloat = %d\n " , myfloat );
36
36
return 1 ;
37
37
}
38
38
return 0 ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ int main() {
24
24
25
25
/* Basic sub-group functionality is supported as part of cl_khr_subgroups
26
26
* extension or as core OpenCL 2.1 feature. */
27
- if (!core_sg_supported (Device)) {
27
+ if (!core_sg_supported (Device) || !Device. has (aspect::fp64) ) {
28
28
std::cout << " Skipping test\n " ;
29
29
return 0 ;
30
30
}
You can’t perform that action at this time.
0 commit comments