8
8
// Exclude PVC not to run same test cases twice (via the *_pvc.cpp variant).
9
9
// REQUIRES: gpu && !gpu-intel-pvc
10
10
// UNSUPPORTED: cuda || hip
11
- // RUN: %clangxx -fsycl %s -o %t.out
11
+ // RUN: %clangxx -fsycl-device-code-split=per_kernel -fsycl %s -o %t.out
12
12
// RUN: %GPU_RUN_PLACEHOLDER %t.out
13
13
14
14
// Tests various binary operations applied to simd objects.
@@ -266,11 +266,13 @@ int main(void) {
266
266
auto arith_ops = esimd_test::ArithBinaryOpsNoDiv;
267
267
passed &= test<unsigned char , int , 1 , BinOp, VSf, IDf>(arith_ops, q);
268
268
passed &= test<char , float , 7 , BinOp, VEf, IDf>(arith_ops, q, 0 .000001f );
269
- passed &= test<short , double , 7 , BinOp, VEf, IDf>(arith_ops, q, 1e-15 );
269
+ if (dev.has (aspect::fp64))
270
+ passed &= test<short , double , 7 , BinOp, VEf, IDf>(arith_ops, q, 1e-15 );
270
271
passed &= test<float , float , 32 , BinOp, VEf, IDf>(arith_ops, q, 0 .000001f );
271
272
passed &= test<half, char , 1 , BinOp, verify_n, IDf>(arith_ops, q, 1 );
272
273
passed &= test<half, unsigned int , 32 , BinOp, VSf, IDf>(arith_ops, q, 1 );
273
- passed &= test<double , half, 7 , BinOp, VSf, IDf>(arith_ops, q);
274
+ if (dev.has (aspect::fp64))
275
+ passed &= test<double , half, 7 , BinOp, VSf, IDf>(arith_ops, q);
274
276
passed &= test<short , uint64_t , 7 , BinOp, VSf, IDf>(arith_ops, q);
275
277
#ifdef USE_BF16
276
278
passed &= test<bfloat16, int , 8 , BinOp, VSf, IDf>(arith_ops, q);
@@ -282,13 +284,15 @@ int main(void) {
282
284
passed &= test<unsigned char , int , 1 , BinOp, VSf, IDf>(div_op, q);
283
285
passed &= test<char , float , 7 , BinOp, VEf, IDf>(div_op, q, 0 .000001f );
284
286
#ifndef WA_BUG
285
- passed &= test<short , double , 7 , BinOp, VSf, IDf>(div_op, q);
287
+ if (dev.has (aspect::fp64))
288
+ passed &= test<short , double , 7 , BinOp, VSf, IDf>(div_op, q);
286
289
#endif // WA_BUG
287
290
passed &= test<float , float , 32 , BinOp, VEf, IDf>(div_op, q, 0 .000001f );
288
291
passed &= test<half, char , 1 , BinOp, verify_n, IDf>(div_op, q, 1 );
289
292
passed &= test<half, unsigned int , 32 , BinOp, VSf, IDf>(div_op, q, 1 );
290
293
#ifndef WA_BUG
291
- passed &= test<double , half, 7 , BinOp, VSf, IDf>(div_op, q);
294
+ if (dev.has (aspect::fp64))
295
+ passed &= test<double , half, 7 , BinOp, VSf, IDf>(div_op, q);
292
296
#endif // WA_BUG
293
297
passed &= test<short , uint64_t , 7 , BinOp, VSf, IDf>(div_op, q);
294
298
#ifdef USE_BF16
@@ -327,11 +331,13 @@ int main(void) {
327
331
auto cmp_ops = esimd_test::CmpOps;
328
332
passed &= test<unsigned char , int , 1 , CmpOp, VSf, IDf>(cmp_ops, q);
329
333
passed &= test<char , float , 7 , CmpOp, VSf, IDf>(cmp_ops, q);
330
- passed &= test<short , double , 7 , CmpOp, VSf, IDf>(cmp_ops, q);
334
+ if (dev.has (aspect::fp64))
335
+ passed &= test<short , double , 7 , CmpOp, VSf, IDf>(cmp_ops, q);
331
336
passed &= test<float , float , 32 , CmpOp, VSf, IDf>(cmp_ops, q);
332
337
passed &= test<half, char , 1 , CmpOp, VSf, IDf>(cmp_ops, q, 1 );
333
338
passed &= test<half, unsigned int , 32 , CmpOp, VSf, IDf>(cmp_ops, q, 1 );
334
- passed &= test<double , half, 7 , CmpOp, VSf, IDf>(cmp_ops, q);
339
+ if (dev.has (aspect::fp64))
340
+ passed &= test<double , half, 7 , CmpOp, VSf, IDf>(cmp_ops, q);
335
341
passed &= test<short , uint64_t , 7 , CmpOp, VSf, IDf>(cmp_ops, q);
336
342
#ifdef USE_BF16
337
343
passed &= test<bfloat16, int , 32 , CmpOp, VSf, IDf>(cmp_ops, q);
0 commit comments