Skip to content

Commit da8929e

Browse files
authored
[SYCL][CUDA] Eliminate incorrect assertions and enable cuda usm tests (#2557)
Cuda plugin basically had divide by 0 assertions that weren't necessary. Signed-off-by: James Brodman <james.brodman@intel.com>
1 parent 28ef967 commit da8929e

20 files changed

+3
-83
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4133,7 +4133,7 @@ pi_result cuda_piextUSMHostAlloc(void **result_ptr, pi_context context,
41334133
} catch (pi_result error) {
41344134
result = error;
41354135
}
4136-
assert(reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0);
4136+
41374137
return result;
41384138
}
41394139

@@ -4154,7 +4154,7 @@ pi_result cuda_piextUSMDeviceAlloc(void **result_ptr, pi_context context,
41544154
} catch (pi_result error) {
41554155
result = error;
41564156
}
4157-
assert(reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0);
4157+
41584158
return result;
41594159
}
41604160

@@ -4176,7 +4176,7 @@ pi_result cuda_piextUSMSharedAlloc(void **result_ptr, pi_context context,
41764176
} catch (pi_result error) {
41774177
result = error;
41784178
}
4179-
assert(reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0);
4179+
41804180
return result;
41814181
}
41824182

sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
83
// RUN: %ACC_RUN_PLACEHOLDER %t.out

sycl/test/inorder_queue/in_order_dmemll.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
44
//
5-
// XFAIL: cuda
65
//==----------- ordered_dmemll.cpp - Device Memory Linked List test --------==//
76
// It uses an ordered queue where explicit waiting is not necessary between
87
// kernels

sycl/test/usm/allocator_equal.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// piextUSM*Alloc functions for CUDA are not behaving as described in
2-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
4-
//
51
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
62
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
73
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/badmalloc.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
// UNSUPPORTED: windows
2-
// XFAIL: cuda
3-
// piextUSM*Alloc functions for CUDA are not behaving as described in
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
5-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
62
//
73
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
84
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out

sycl/test/usm/depends_on.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/dmemll.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/fill.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// XFAIL: cuda
9-
// piextUSM*Alloc functions for CUDA are not behaving as described in
108
//
119
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
1210
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out

sycl/test/usm/hmemll.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/memadvise.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// XFAIL: cuda
2-
// SYCL runtime and piextUSM*Alloc functions for CUDA not behaving as described
3-
// in: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
//
51
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
62
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
73
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/memcpy.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// XFAIL: cuda
9-
// piextUSM*Alloc functions for CUDA are not behaving as described in
10-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
11-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
128
//
139
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
1410
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out

sycl/test/usm/memset.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/mixed.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/mixed2.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/mixed2template.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/mixed_queue.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/pfor_flatten.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: cuda
2-
// CUDA does not support the unnamed lambda extension.
3-
//
41
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-unnamed-lambda -fsycl-dead-args-optimization %s -o %t1.out
52
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
63
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/pfor_flatten_range_shortcut.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// UNSUPPORTED: cuda
2-
// CUDA does not support the unnamed lambda extension.
3-
//
41
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-unnamed-lambda %s -o %t1.out
52
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
63
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

sycl/test/usm/queue_wait.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t.out

sycl/test/usm/smemll.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// XFAIL: cuda
2-
// piextUSM*Alloc functions for CUDA are not behaving as described in
3-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
4-
// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc
5-
//
61
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
72
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
83
// RUN: %CPU_RUN_PLACEHOLDER %t1.out

0 commit comments

Comments
 (0)