Skip to content

Commit 4d8dc85

Browse files
committed
[SYCL] do addifitional fixes per reviewer comments
This fix also disables the LIT test reduction_usm.cpp for Linux until the GPU drivers used by CI is updated to 20.06.15619 or newer. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent 2ce0fe6 commit 4d8dc85

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ class __SYCL_EXPORT handler {
856856
parallel_for(nd_range<Dims> Range, Reduction &Redu, KernelType KernelFunc) {
857857
if (Reduction::is_usm)
858858
Redu.associateWithHandler(*this);
859-
auto QueueCopy = MQueue;
859+
shared_ptr_class<detail::queue_impl> QueueCopy = MQueue;
860860
auto Acc = Redu.getUserAccessor();
861861
intel::detail::reduCGFunc<KernelName>(*this, KernelFunc, Range, Redu, Acc);
862862

@@ -887,7 +887,7 @@ class __SYCL_EXPORT handler {
887887
detail::enable_if_t<Reduction::accessor_mode == access::mode::discard_write &&
888888
Reduction::has_fast_atomics>
889889
parallel_for(nd_range<Dims> Range, Reduction &Redu, KernelType KernelFunc) {
890-
auto QueueCopy = MQueue;
890+
shared_ptr_class<detail::queue_impl> QueueCopy = MQueue;
891891
auto RWAcc = Redu.getReadWriteScalarAcc(*this);
892892
intel::detail::reduCGFunc<KernelName>(*this, KernelFunc, Range, Redu,
893893
RWAcc);
@@ -940,7 +940,7 @@ class __SYCL_EXPORT handler {
940940
if (Reduction::is_usm && NWorkGroups == 1)
941941
Redu.associateWithHandler(*this);
942942
intel::detail::reduCGFunc<KernelName>(*this, KernelFunc, Range, Redu);
943-
auto QueueCopy = MQueue;
943+
shared_ptr_class<detail::queue_impl> QueueCopy = MQueue;
944944
this->finalize();
945945

946946
// 2. Run the additional aux kernel as many times as needed to reduce

sycl/test/reduction/reduction_placeholder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// Reductions use work-group builtins not yet supported by CUDA.
33

44
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5-
// RUNx: env SYCL_DEVICE_TYPE=HOST %t.out
65
// RUN: %CPU_RUN_PLACEHOLDER %t.out
76
// RUN: %GPU_RUN_PLACEHOLDER %t.out
87
// RUN: %ACC_RUN_PLACEHOLDER %t.out
98

9+
// TODO: Enable the test for HOST when it supports intel::reduce() and barrier()
10+
1011
// This test performs basic checks of parallel_for(nd_range, reduction, func)
1112
// with reductions initialized with a placeholder accessor.
1213

sycl/test/reduction/reduction_usm.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
// UNSUPPORTED: cuda
22
// Reductions use work-group builtins not yet supported by CUDA.
33

4+
// UNSUPPORTED: linux
5+
// TODO: Enable the test for Linux when CI uses GPU driver 20.06.15619 or newer.
6+
47
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5-
// RUNx: env SYCL_DEVICE_TYPE=HOST %t.out
68
// RUN: %CPU_RUN_PLACEHOLDER %t.out
79
// RUN: %GPU_RUN_PLACEHOLDER %t.out
810
// RUN: %ACC_RUN_PLACEHOLDER %t.out
911

12+
// TODO: Enable the test for HOST when it supports intel::reduce() and barrier()
13+
1014
// This test performs basic checks of parallel_for(nd_range, reduction, func)
1115
// with reductions initialized with USM var.
1216

0 commit comments

Comments
 (0)