From 7997a344d244dfe9f05ee2a074d9eba5c84e6a12 Mon Sep 17 00:00:00 2001 From: James Brodman Date: Mon, 28 Sep 2020 16:00:56 -0400 Subject: [PATCH 1/4] Eliminate incorrect assertions and enable cuda usm tests Signed-off-by: James Brodman --- sycl/plugins/cuda/pi_cuda.cpp | 6 +++--- sycl/test/usm/allocator_equal.cpp | 4 ---- sycl/test/usm/badmalloc.cpp | 4 ---- sycl/test/usm/depends_on.cpp | 5 ----- sycl/test/usm/dmemll.cpp | 5 ----- sycl/test/usm/fill.cpp | 2 -- sycl/test/usm/hmemll.cpp | 5 ----- sycl/test/usm/memadvise.cpp | 4 ---- sycl/test/usm/memcpy.cpp | 4 ---- sycl/test/usm/memset.cpp | 5 ----- sycl/test/usm/mixed.cpp | 5 ----- sycl/test/usm/mixed2.cpp | 5 ----- sycl/test/usm/mixed2template.cpp | 5 ----- sycl/test/usm/mixed_queue.cpp | 5 ----- sycl/test/usm/queue_wait.cpp | 5 ----- sycl/test/usm/smemll.cpp | 5 ----- 16 files changed, 3 insertions(+), 71 deletions(-) diff --git a/sycl/plugins/cuda/pi_cuda.cpp b/sycl/plugins/cuda/pi_cuda.cpp index 3088701bff353..5e93f0fde1e8d 100644 --- a/sycl/plugins/cuda/pi_cuda.cpp +++ b/sycl/plugins/cuda/pi_cuda.cpp @@ -4133,7 +4133,7 @@ pi_result cuda_piextUSMHostAlloc(void **result_ptr, pi_context context, } catch (pi_result error) { result = error; } - assert(reinterpret_cast(*result_ptr) % alignment == 0); + return result; } @@ -4154,7 +4154,7 @@ pi_result cuda_piextUSMDeviceAlloc(void **result_ptr, pi_context context, } catch (pi_result error) { result = error; } - assert(reinterpret_cast(*result_ptr) % alignment == 0); + return result; } @@ -4176,7 +4176,7 @@ pi_result cuda_piextUSMSharedAlloc(void **result_ptr, pi_context context, } catch (pi_result error) { result = error; } - assert(reinterpret_cast(*result_ptr) % alignment == 0); + return result; } diff --git a/sycl/test/usm/allocator_equal.cpp b/sycl/test/usm/allocator_equal.cpp index e02040fe16c28..eaf636c17f7db 100644 --- a/sycl/test/usm/allocator_equal.cpp +++ b/sycl/test/usm/allocator_equal.cpp @@ -1,7 +1,3 @@ -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/badmalloc.cpp b/sycl/test/usm/badmalloc.cpp index b139d7dbf80d8..a6c461d8af0ab 100644 --- a/sycl/test/usm/badmalloc.cpp +++ b/sycl/test/usm/badmalloc.cpp @@ -1,8 +1,4 @@ // UNSUPPORTED: windows -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc // // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out diff --git a/sycl/test/usm/depends_on.cpp b/sycl/test/usm/depends_on.cpp index c985fc6c7a9a9..3943621853836 100644 --- a/sycl/test/usm/depends_on.cpp +++ b/sycl/test/usm/depends_on.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/dmemll.cpp b/sycl/test/usm/dmemll.cpp index 8617c9f751958..e5c32b2f20262 100644 --- a/sycl/test/usm/dmemll.cpp +++ b/sycl/test/usm/dmemll.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/fill.cpp b/sycl/test/usm/fill.cpp index 0465c5dad9792..6c75e16fc8d30 100644 --- a/sycl/test/usm/fill.cpp +++ b/sycl/test/usm/fill.cpp @@ -5,8 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in // // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out diff --git a/sycl/test/usm/hmemll.cpp b/sycl/test/usm/hmemll.cpp index 4ec1fd6a6516a..38b578ce948c2 100644 --- a/sycl/test/usm/hmemll.cpp +++ b/sycl/test/usm/hmemll.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/memadvise.cpp b/sycl/test/usm/memadvise.cpp index 8183f4a59c784..9b584c045e2e5 100644 --- a/sycl/test/usm/memadvise.cpp +++ b/sycl/test/usm/memadvise.cpp @@ -1,7 +1,3 @@ -// XFAIL: cuda -// SYCL runtime and piextUSM*Alloc functions for CUDA not behaving as described -// in: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/memcpy.cpp b/sycl/test/usm/memcpy.cpp index e8c9c67d91614..893f20903de0b 100644 --- a/sycl/test/usm/memcpy.cpp +++ b/sycl/test/usm/memcpy.cpp @@ -5,10 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc // // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out diff --git a/sycl/test/usm/memset.cpp b/sycl/test/usm/memset.cpp index e91877928041f..01100d19502f2 100644 --- a/sycl/test/usm/memset.cpp +++ b/sycl/test/usm/memset.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/mixed.cpp b/sycl/test/usm/mixed.cpp index 092a1e51d4b4f..5d45182d2a35e 100644 --- a/sycl/test/usm/mixed.cpp +++ b/sycl/test/usm/mixed.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/mixed2.cpp b/sycl/test/usm/mixed2.cpp index 7e8ef785c42cb..698406c199227 100644 --- a/sycl/test/usm/mixed2.cpp +++ b/sycl/test/usm/mixed2.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/mixed2template.cpp b/sycl/test/usm/mixed2template.cpp index 24acd20396e98..d9dcb286fdd52 100644 --- a/sycl/test/usm/mixed2template.cpp +++ b/sycl/test/usm/mixed2template.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/mixed_queue.cpp b/sycl/test/usm/mixed_queue.cpp index 1c99ebda7b5ce..32a61c29c1596 100644 --- a/sycl/test/usm/mixed_queue.cpp +++ b/sycl/test/usm/mixed_queue.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/queue_wait.cpp b/sycl/test/usm/queue_wait.cpp index 611e7b6226398..29ad8e95a4d9e 100644 --- a/sycl/test/usm/queue_wait.cpp +++ b/sycl/test/usm/queue_wait.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/usm/smemll.cpp b/sycl/test/usm/smemll.cpp index 46d1f10a5f33f..4fb79cb8429d8 100644 --- a/sycl/test/usm/smemll.cpp +++ b/sycl/test/usm/smemll.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out From 919cc1abfe0620759ea6f70d73ce7693f78090e3 Mon Sep 17 00:00:00 2001 From: James Brodman Date: Mon, 28 Sep 2020 16:33:44 -0400 Subject: [PATCH 2/4] Turns out unnamed lambda DOES work! Signed-off-by: James Brodman --- sycl/test/usm/pfor_flatten.cpp | 3 --- sycl/test/usm/pfor_flatten_range_shortcut.cpp | 3 --- 2 files changed, 6 deletions(-) diff --git a/sycl/test/usm/pfor_flatten.cpp b/sycl/test/usm/pfor_flatten.cpp index e64119c489c26..ddd03917f7bb5 100644 --- a/sycl/test/usm/pfor_flatten.cpp +++ b/sycl/test/usm/pfor_flatten.cpp @@ -1,6 +1,3 @@ -// UNSUPPORTED: cuda -// CUDA does not support the unnamed lambda extension. -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-unnamed-lambda -fsycl-dead-args-optimization %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out diff --git a/sycl/test/usm/pfor_flatten_range_shortcut.cpp b/sycl/test/usm/pfor_flatten_range_shortcut.cpp index 65fbb25df5887..8c57ab1df64bd 100644 --- a/sycl/test/usm/pfor_flatten_range_shortcut.cpp +++ b/sycl/test/usm/pfor_flatten_range_shortcut.cpp @@ -1,6 +1,3 @@ -// UNSUPPORTED: cuda -// CUDA does not support the unnamed lambda extension. -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-unnamed-lambda %s -o %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out From 9e20981ae7b2106421c98f98cf3f199de0517ad8 Mon Sep 17 00:00:00 2001 From: James Brodman Date: Mon, 28 Sep 2020 16:41:18 -0400 Subject: [PATCH 3/4] Enable in-order queue usm test Signed-off-by: James Brodman --- sycl/test/inorder_queue/in_order_dmemll.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/sycl/test/inorder_queue/in_order_dmemll.cpp b/sycl/test/inorder_queue/in_order_dmemll.cpp index 3eb6ecc39a34c..00dfbdb8ac16d 100644 --- a/sycl/test/inorder_queue/in_order_dmemll.cpp +++ b/sycl/test/inorder_queue/in_order_dmemll.cpp @@ -2,7 +2,6 @@ // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out // -// XFAIL: cuda //==----------- ordered_dmemll.cpp - Device Memory Linked List test --------==// // It uses an ordered queue where explicit waiting is not necessary between // kernels From 24ed286f76861dff647450c576b481a8a1fddf5c Mon Sep 17 00:00:00 2001 From: James Brodman Date: Tue, 29 Sep 2020 10:06:59 -0400 Subject: [PATCH 4/4] Enable passing test queue_parallel_for_generic Signed-off-by: James Brodman --- sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp b/sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp index ee1feea0853ca..83405ebbdb767 100644 --- a/sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp +++ b/sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp @@ -1,8 +1,3 @@ -// XFAIL: cuda -// piextUSM*Alloc functions for CUDA are not behaving as described in -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc -// https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/cl_intel_unified_shared_memory.asciidoc -// // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out