From f88d9dc68d0f38bf709b0ec9d0712c4721880f1d Mon Sep 17 00:00:00 2001 From: Vyacheslav N Klochkov Date: Tue, 27 Jul 2021 23:14:05 -0700 Subject: [PATCH] [SYCL] Eliminate compilation warnings in reduction tests; disable 1 test Signed-off-by: Vyacheslav N Klochkov --- SYCL/Reduction/reduction_big_data.cpp | 17 +++++------ SYCL/Reduction/reduction_nd_N_vars.cpp | 18 ++++++------ SYCL/Reduction/reduction_nd_conditional.cpp | 10 +++---- SYCL/Reduction/reduction_nd_ext_type.hpp | 26 ++++++++--------- SYCL/Reduction/reduction_nd_lambda.cpp | 6 ++-- SYCL/Reduction/reduction_nd_s0_dw.cpp | 22 +++++++-------- SYCL/Reduction/reduction_nd_s0_rw.cpp | 28 +++++++++---------- SYCL/Reduction/reduction_nd_s1_dw.cpp | 28 +++++++++---------- SYCL/Reduction/reduction_nd_s1_rw.cpp | 28 +++++++++---------- SYCL/Reduction/reduction_placeholder.cpp | 16 +++++------ .../reduction_queue_parallel_for.cpp | 5 ++-- SYCL/Reduction/reduction_range_1d_s1_rw.cpp | 3 ++ SYCL/Reduction/reduction_usm_dw.cpp | 12 ++++---- SYCL/Reduction/reduction_utils.hpp | 4 +-- 14 files changed, 114 insertions(+), 109 deletions(-) diff --git a/SYCL/Reduction/reduction_big_data.cpp b/SYCL/Reduction/reduction_big_data.cpp index 1c8d67068b..f0eb41762c 100644 --- a/SYCL/Reduction/reduction_big_data.cpp +++ b/SYCL/Reduction/reduction_big_data.cpp @@ -4,7 +4,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUNx: %HOST_RUN_PLACEHOLDER %t.out -// TODO: Enable the test for HOST when it supports ONEAPI::reduce() and +// TODO: Enable the test for HOST when it supports ext::oneapi::reduce() and // barrier() // This test performs basic checks of parallel_for(nd_range, reduction, func) @@ -64,12 +64,12 @@ void test(queue &Q, T Identity) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - CGH.parallel_for(NDRange, ONEAPI::reduction(Out, Identity, BOp), - [=](nd_item<1> NDIt, auto &Sum) { - if (NDIt.get_global_linear_id() < NWorkItems) - Sum.combine( - In[NDIt.get_global_linear_id()]); - }); + CGH.parallel_for( + NDRange, ext::oneapi::reduction(Out, Identity, BOp), + [=](nd_item<1> NDIt, auto &Sum) { + if (NDIt.get_global_linear_id() < NWorkItems) + Sum.combine(In[NDIt.get_global_linear_id()]); + }); }); // Check correctness. @@ -99,7 +99,8 @@ template struct BigCustomVecPlus { int main() { queue Q; - test>(Q, getMinimumFPValue()); + test>( + Q, getMinimumFPValue()); using BCV = BigCustomVec; test>(Q, BCV(0)); diff --git a/SYCL/Reduction/reduction_nd_N_vars.cpp b/SYCL/Reduction/reduction_nd_N_vars.cpp index b817826783..b16521e49a 100644 --- a/SYCL/Reduction/reduction_nd_N_vars.cpp +++ b/SYCL/Reduction/reduction_nd_N_vars.cpp @@ -148,7 +148,7 @@ int testOne(queue &Q, T1 IdentityVal1, T1 InitVal1, BinaryOperation1 BOp1, CGH.parallel_for(NDR, Redu1, Redu2, Redu3, Redu4, Lambda); }).wait(); } else { - // Test ONEAPI reductions + // Test ext::oneapi reductions Q.submit([&](handler &CGH) { auto In1 = InBuf1.template get_access(CGH); auto In2 = InBuf2.template get_access(CGH); @@ -159,10 +159,10 @@ int testOne(queue &Q, T1 IdentityVal1, T1 InitVal1, BinaryOperation1 BOp1, auto Out2 = OutBuf2.template get_access(CGH); accessor Out3(OutBuf3, CGH); - auto Redu1 = ONEAPI::reduction(Out1, IdentityVal1, BOp1); - auto Redu2 = ONEAPI::reduction(Out2, IdentityVal2, BOp2); - auto Redu3 = ONEAPI::reduction(Out3, IdentityVal3, BOp3); - auto Redu4 = ONEAPI::reduction(Out4, IdentityVal4, BOp4); + auto Redu1 = ext::oneapi::reduction(Out1, IdentityVal1, BOp1); + auto Redu2 = ext::oneapi::reduction(Out2, IdentityVal2, BOp2); + auto Redu3 = ext::oneapi::reduction(Out3, IdentityVal3, BOp3); + auto Redu4 = ext::oneapi::reduction(Out4, IdentityVal4, BOp4); auto Lambda = [=](nd_item<1> NDIt, auto &Sum1, auto &Sum2, auto &Sum3, auto &Sum4) { @@ -210,7 +210,7 @@ int testOne(queue &Q, T1 IdentityVal1, T1 InitVal1, BinaryOperation1 BOp1, } // Tests both implementations of reduction: -// sycl::reduction and sycl::ONEAPI::reduction +// sycl::reduction and sycl::ext::oneapi::reduction template ( - Q, 0, 1000, std::plus{}, 0, 2000, std::plus<>{}, 0, 4000, + Q, 0, 1000, std::plus<>{}, 0, 2000, std::plus<>{}, 0, 4000, std::bit_or<>{}, 0, 8000, std::bit_xor<>{}, usm::alloc::shared, 16, 16); auto Add = [](auto x, auto y) { return (x + y); }; Error += testBoth( - Q, 0, 1000, std::plus{}, 0, 2000, std::plus<>{}, 0, 4000, Add, 0, - 8000, std::plus<>{}, usm::alloc::device, 5 * (256 + 1), 5); + Q, 0, 1000, std::plus<>{}, 0, 2000, std::plus<>{}, 0, 4000, Add, 0, 8000, + std::plus<>{}, usm::alloc::device, 5 * (256 + 1), 5); if (!Error) std::cout << "Test passed\n"; diff --git a/SYCL/Reduction/reduction_nd_conditional.cpp b/SYCL/Reduction/reduction_nd_conditional.cpp index 48c2cf56f3..3dd1db8b7c 100644 --- a/SYCL/Reduction/reduction_nd_conditional.cpp +++ b/SYCL/Reduction/reduction_nd_conditional.cpp @@ -70,7 +70,7 @@ void test(queue &Q, T Identity, size_t WGSize, size_t NWItems) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - auto Redu = ONEAPI::reduction(Out, Identity, BOp); + auto Redu = ext::oneapi::reduction(Out, Identity, BOp); range<1> GlobalRange(NWItems); range<1> LocalRange(WGSize); @@ -100,10 +100,10 @@ void test(queue &Q, T Identity, size_t WGSize, size_t NWItems) { int main() { queue Q; - test>(Q, 0, 2, 2); - test>(Q, 0, 7, 7); - test>(Q, 0, 2, 64); - test>(Q, 0, 16, 256); + test>(Q, 0, 2, 2); + test>(Q, 0, 7, 7); + test>(Q, 0, 2, 64); + test>(Q, 0, 16, 256); std::cout << "Test passed\n"; return 0; diff --git a/SYCL/Reduction/reduction_nd_ext_type.hpp b/SYCL/Reduction/reduction_nd_ext_type.hpp index 0ee925a615..0d67d6cc0d 100644 --- a/SYCL/Reduction/reduction_nd_ext_type.hpp +++ b/SYCL/Reduction/reduction_nd_ext_type.hpp @@ -42,7 +42,7 @@ void test(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { Q.submit([&](handler &CGH) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - auto Redu = ONEAPI::reduction(Out, Identity, BOp); + auto Redu = ext::oneapi::reduction(Out, Identity, BOp); CGH.parallel_for(NDRange, Redu, [=](nd_item<1> NDIt, auto &Sum) { Sum.combine(In[NDIt.get_global_linear_id()]); @@ -85,20 +85,20 @@ template int runTests(const string_class &ExtensionName) { testBoth>(Q, 1, 77, 4, 4); - testBoth>(Q, 0, 77, 4, 64); - testBoth>(Q, 0, 33, 3, 3 * 5); + testBoth>(Q, 0, 77, 4, 64); + testBoth>(Q, 0, 33, 3, 3 * 5); - testBoth>(Q, getMaximumFPValue(), - -10.0, 7, 7); - testBoth>(Q, getMaximumFPValue(), - 99.0, 7, 7); - testBoth>(Q, getMaximumFPValue(), - -99.0, 3, 3); + testBoth>( + Q, getMaximumFPValue(), -10.0, 7, 7); + testBoth>( + Q, getMaximumFPValue(), 99.0, 7, 7); + testBoth>( + Q, getMaximumFPValue(), -99.0, 3, 3); - testBoth>(Q, getMinimumFPValue(), - 99.0, 3, 3); - testBoth>(Q, getMinimumFPValue(), - 99.0, 7, 7 * 5); + testBoth>( + Q, getMinimumFPValue(), 99.0, 3, 3); + testBoth>( + Q, getMinimumFPValue(), 99.0, 7, 7 * 5); std::cout << "Test passed\n"; return 0; } diff --git a/SYCL/Reduction/reduction_nd_lambda.cpp b/SYCL/Reduction/reduction_nd_lambda.cpp index 0fe7b29779..816eb94b80 100644 --- a/SYCL/Reduction/reduction_nd_lambda.cpp +++ b/SYCL/Reduction/reduction_nd_lambda.cpp @@ -13,14 +13,14 @@ using namespace cl::sycl; // Note that this function is created only to test that if the accessor -// object passed to ONEAPI::reduction is destroyed right after -// ONEAPI::reduction creation, then the reduction still works properly, +// object passed to ext::oneapi::reduction is destroyed right after +// ext::oneapi::reduction creation, then the reduction still works properly, // i.e. it holds a COPY of user's accessor. template auto createReduction(sycl::buffer Buffer, handler &CGH, T Identity, BOpT BOp) { auto Acc = Buffer.template get_access(CGH); - return ONEAPI::reduction(Acc, Identity, BOp); + return ext::oneapi::reduction(Acc, Identity, BOp); } template diff --git a/SYCL/Reduction/reduction_nd_s0_dw.cpp b/SYCL/Reduction/reduction_nd_s0_dw.cpp index 43ce0f6566..8cff888361 100644 --- a/SYCL/Reduction/reduction_nd_s0_dw.cpp +++ b/SYCL/Reduction/reduction_nd_s0_dw.cpp @@ -50,7 +50,7 @@ void test(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - auto Redu = ONEAPI::reduction(Out, Identity, BOp); + auto Redu = ext::oneapi::reduction(Out, Identity, BOp); CGH.parallel_for(NDRange, Redu, [=](nd_item<1> NDIt, auto &Sum) { Sum.combine(In[NDIt.get_global_linear_id()]); @@ -81,24 +81,24 @@ int main() { queue Q; // Check some non power-of-two work-group sizes. - testBoth>(Q, 0, 99, 1, 7); - testBoth>(Q, 0, 99, 49, 49 * 5); + testBoth>(Q, 0, 99, 1, 7); + testBoth>(Q, 0, 99, 49, 49 * 5); // Try some power-of-two work-group sizes. - testBoth>(Q, 0, 99, 1, 32); + testBoth>(Q, 0, 99, 1, 32); testBoth>(Q, 1, 99, 4, 32); - testBoth>(Q, 0, 99, 16, 256); - testBoth>(Q, ~0, 99, 32, 256); - testBoth>( + testBoth>(Q, 0, 99, 16, 256); + testBoth>(Q, ~0, 99, 32, 256); + testBoth>( Q, (std::numeric_limits::max)(), -99, 64, 256); - testBoth>( + testBoth>( Q, (std::numeric_limits::min)(), 99, 128, 256); - testBoth>(Q, 0, 99, 256, 256); + testBoth>(Q, 0, 99, 256, 256); // Check with various types. testBoth>(Q, 1, 99, 8, 256); - testBoth>(Q, 0x7fff, -99, 8, 256); - testBoth>(Q, 0, 99, 8, 256); + testBoth>(Q, 0x7fff, -99, 8, 256); + testBoth>(Q, 0, 99, 8, 256); // Check with CUSTOM type. testBoth, CustomVecPlus>( diff --git a/SYCL/Reduction/reduction_nd_s0_rw.cpp b/SYCL/Reduction/reduction_nd_s0_rw.cpp index a5983f019f..54419d842b 100644 --- a/SYCL/Reduction/reduction_nd_s0_rw.cpp +++ b/SYCL/Reduction/reduction_nd_s0_rw.cpp @@ -49,7 +49,7 @@ void test(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - auto Redu = ONEAPI::reduction(Out, Identity, BOp); + auto Redu = ext::oneapi::reduction(Out, Identity, BOp); CGH.parallel_for(NDRange, Redu, [=](nd_item<1> NDIt, auto &Sum) { Sum.combine(In[NDIt.get_global_linear_id()]); @@ -80,24 +80,24 @@ int main() { queue Q; // Check non power-of-two work-group sizes. - testBoth>(Q, 0, 99, 1, 7); - testBoth>(Q, 0, -99, 49, 49 * 5); + testBoth>(Q, 0, 99, 1, 7); + testBoth>(Q, 0, -99, 49, 49 * 5); // Try some power-of-two work-group sizes. - testBoth>(Q, 0, 99, 2, 32); - testBoth>(Q, 0, 199, 32, 32); - testBoth>(Q, 0, 299, 128, 256); - testBoth>(Q, 0, 399, 256, 256); + testBoth>(Q, 0, 99, 2, 32); + testBoth>(Q, 0, 199, 32, 32); + testBoth>(Q, 0, 299, 128, 256); + testBoth>(Q, 0, 399, 256, 256); // Check with various operations and types. - testBoth>(Q, 1, 2, 8, 256); - testBoth>(Q, 1, 1.2, 8, 32); - testBoth>(Q, 0, 0x3400, 4, 32); - testBoth>(Q, 0, 0x12340000, 4, 32); - testBoth>(Q, ~0, ~0, 4, 16); - testBoth>( + testBoth>(Q, 1, 2, 8, 256); + testBoth>(Q, 1, 1.2, 8, 32); + testBoth>(Q, 0, 0x3400, 4, 32); + testBoth>(Q, 0, 0x12340000, 4, 32); + testBoth>(Q, ~0, ~0, 4, 16); + testBoth>( Q, (std::numeric_limits::max)(), -99, 8, 256); - testBoth>( + testBoth>( Q, (std::numeric_limits::min)(), 99, 8, 256); // Check with CUSTOM type. diff --git a/SYCL/Reduction/reduction_nd_s1_dw.cpp b/SYCL/Reduction/reduction_nd_s1_dw.cpp index 8745d054e3..8fa18e7c18 100644 --- a/SYCL/Reduction/reduction_nd_s1_dw.cpp +++ b/SYCL/Reduction/reduction_nd_s1_dw.cpp @@ -47,7 +47,7 @@ void test(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - auto Redu = ONEAPI::reduction(Out, Identity, BOp); + auto Redu = ext::oneapi::reduction(Out, Identity, BOp); CGH.parallel_for(NDRange, Redu, [=](nd_item<1> NDIt, auto &Sum) { Sum.combine(In[NDIt.get_global_linear_id()]); @@ -78,25 +78,25 @@ int main() { queue Q; // Check some non power-of-two work-group sizes. - testBoth>(Q, 0, 99, 1, 7); - testBoth>(Q, 0, 99, 49, 49 * 5); + testBoth>(Q, 0, 99, 1, 7); + testBoth>(Q, 0, 99, 49, 49 * 5); // Try some power-of-two work-group sizes. - testBoth>(Q, 0, 99, 1, 32); - testBoth>(Q, 1, 99, 4, 64); - testBoth>(Q, 0, 99, 8, 128); - testBoth>(Q, 0, 99, 16, 256); - testBoth>(Q, ~0, 99, 32, 256); - testBoth>( + testBoth>(Q, 0, 99, 1, 32); + testBoth>(Q, 1, 99, 4, 64); + testBoth>(Q, 0, 99, 8, 128); + testBoth>(Q, 0, 99, 16, 256); + testBoth>(Q, ~0, 99, 32, 256); + testBoth>( Q, (std::numeric_limits::max)(), -99, 64, 256); - testBoth>( + testBoth>( Q, (std::numeric_limits::min)(), 99, 128, 256); - testBoth>(Q, 0, 99, 256, 256); + testBoth>(Q, 0, 99, 256, 256); // Check with various types. - testBoth>(Q, 1, 99, 8, 256); - testBoth>(Q, 0x7fff, -99, 8, 256); - testBoth>(Q, 0, 99, 8, 256); + testBoth>(Q, 1, 99, 8, 256); + testBoth>(Q, 0x7fff, -99, 8, 256); + testBoth>(Q, 0, 99, 8, 256); // Check with CUSTOM type. testBoth, CustomVecPlus>( diff --git a/SYCL/Reduction/reduction_nd_s1_rw.cpp b/SYCL/Reduction/reduction_nd_s1_rw.cpp index 2a40149555..1b20563c78 100644 --- a/SYCL/Reduction/reduction_nd_s1_rw.cpp +++ b/SYCL/Reduction/reduction_nd_s1_rw.cpp @@ -50,7 +50,7 @@ void test(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { auto In = InBuf.template get_access(CGH); accessor Out(OutBuf, CGH); - auto Redu = ONEAPI::reduction(Out, Identity, BOp); + auto Redu = ext::oneapi::reduction(Out, Identity, BOp); CGH.parallel_for(NDRange, Redu, [=](nd_item<1> NDIt, auto &Sum) { Sum.combine(In[NDIt.get_global_linear_id()]); @@ -81,24 +81,24 @@ int main() { queue Q; // Check non power-of-two work-group sizes. - testBoth>(Q, 0, 99, 1, 7); - testBoth>(Q, 0, -99, 49, 49 * 5); + testBoth>(Q, 0, 99, 1, 7); + testBoth>(Q, 0, -99, 49, 49 * 5); // Try some power-of-two work-group sizes. - testBoth>(Q, 0, 99, 2, 32); - testBoth>(Q, 0, 199, 32, 128); - testBoth>(Q, 0, 299, 128, 128); - testBoth>(Q, 0, 399, 256, 256); + testBoth>(Q, 0, 99, 2, 32); + testBoth>(Q, 0, 199, 32, 128); + testBoth>(Q, 0, 299, 128, 128); + testBoth>(Q, 0, 399, 256, 256); // Check with various operations and types. - testBoth>(Q, 1, 2, 8, 256); - testBoth>(Q, 1, 1.2, 8, 16); - testBoth>(Q, 0, 0x3400, 4, 32); - testBoth>(Q, 0, 0x12340000, 2, 16); - testBoth>(Q, ~0, ~0, 4, 16); - testBoth>( + testBoth>(Q, 1, 2, 8, 256); + testBoth>(Q, 1, 1.2, 8, 16); + testBoth>(Q, 0, 0x3400, 4, 32); + testBoth>(Q, 0, 0x12340000, 2, 16); + testBoth>(Q, ~0, ~0, 4, 16); + testBoth>( Q, (std::numeric_limits::max)(), 99, 8, 256); - testBoth>( + testBoth>( Q, (std::numeric_limits::min)(), -99, 8, 256); // Check with CUSTOM type. diff --git a/SYCL/Reduction/reduction_placeholder.cpp b/SYCL/Reduction/reduction_placeholder.cpp index e47b040497..f37de2909c 100644 --- a/SYCL/Reduction/reduction_placeholder.cpp +++ b/SYCL/Reduction/reduction_placeholder.cpp @@ -4,7 +4,7 @@ // RUN: %ACC_RUN_PLACEHOLDER %t.out // RUNx: %HOST_RUN_PLACEHOLDER %t.out -// TODO: Enable the test for HOST when it supports ONEAPI::reduce() and +// TODO: Enable the test for HOST when it supports ext::oneapi::reduce() and // barrier() // This test performs basic checks of parallel_for(nd_range, reduction, func) @@ -39,7 +39,7 @@ void testOneCase(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { Q.submit([&](handler &CGH) { auto In = InBuf.template get_access(CGH); CGH.require(Out); - auto Redu = ONEAPI::reduction(Out, Identity, BinaryOperation()); + auto Redu = ext::oneapi::reduction(Out, Identity, BinaryOperation()); range<1> GlobalRange(NWItems); range<1> LocalRange(WGSize); nd_range<1> NDRange(GlobalRange, LocalRange); @@ -71,17 +71,17 @@ void test(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { int main() { queue Q; // fast atomics and fast reduce - test>(Q, 0, 77, 49, 49 * 5); - test>(Q, 0, -77, 8, 8); + test>(Q, 0, 77, 49, 49 * 5); + test>(Q, 0, -77, 8, 8); // fast atomics - test>(Q, 0, 233, 7, 7 * 3); - test>(Q, 0, 177, 4, 128); + test>(Q, 0, 233, 7, 7 * 3); + test>(Q, 0, 177, 4, 128); // fast reduce - test>( + test>( Q, getMaximumFPValue(), -5.0, 5, 5 * 7); - test>( + test>( Q, getMinimumFPValue(), -5.0, 4, 128); // generic algorithm diff --git a/SYCL/Reduction/reduction_queue_parallel_for.cpp b/SYCL/Reduction/reduction_queue_parallel_for.cpp index f143378fb5..5fd52473a8 100644 --- a/SYCL/Reduction/reduction_queue_parallel_for.cpp +++ b/SYCL/Reduction/reduction_queue_parallel_for.cpp @@ -4,7 +4,7 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUNx: %HOST_RUN_PLACEHOLDER %t.out -// TODO: Enable the test for HOST when it supports ONEAPI::reduce() and +// TODO: Enable the test for HOST when it supports ext::oneapi::reduce() and // barrier() // This test only checks that the method queue::parallel_for() accepting @@ -33,7 +33,8 @@ template int test(queue &Q) { .wait(); } else { Q.parallel_for( - nd_range<1>{NElems, WGSize}, ONEAPI::reduction(Sum, ONEAPI::plus<>()), + nd_range<1>{NElems, WGSize}, + ext::oneapi::reduction(Sum, std::plus<>()), [=](nd_item<1> It, auto &Sum) { Sum += Data[It.get_global_id(0)]; }) .wait(); } diff --git a/SYCL/Reduction/reduction_range_1d_s1_rw.cpp b/SYCL/Reduction/reduction_range_1d_s1_rw.cpp index e9c55376fa..99eb4237ed 100644 --- a/SYCL/Reduction/reduction_range_1d_s1_rw.cpp +++ b/SYCL/Reduction/reduction_range_1d_s1_rw.cpp @@ -2,6 +2,9 @@ // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out +// TODO: The test has been caught irregularly failing on GPU/Linux. +// UNSUPPORTED: gpu && linux + // TODO: accelerator may not suport atomics required by the current // implementation. Enable testing when implementation is fixed. // RUNx: %ACC_RUN_PLACEHOLDER %t.out diff --git a/SYCL/Reduction/reduction_usm_dw.cpp b/SYCL/Reduction/reduction_usm_dw.cpp index e3c9b0d6a1..cc475b0da4 100644 --- a/SYCL/Reduction/reduction_usm_dw.cpp +++ b/SYCL/Reduction/reduction_usm_dw.cpp @@ -102,20 +102,20 @@ void testUSM(queue &Q, T Identity, T Init, size_t WGSize, size_t NWItems) { int main() { queue Q; // fast atomics and fast reduce - testUSM>(Q, 0, 99, 49, 5 * 49); + testUSM>(Q, 0, 99, 49, 5 * 49); // fast atomics - testUSM>(Q, 0, 0xff00ff00, 7, 7); - testUSM>(Q, 0, 0x7f007f00, 4, 32); + testUSM>(Q, 0, 0xff00ff00, 7, 7); + testUSM>(Q, 0, 0x7f007f00, 4, 32); // fast reduce - testUSM>( + testUSM>( Q, getMaximumFPValue(), -100.0, 17, 17); - testUSM>( + testUSM>( Q, getMinimumFPValue(), 100.0, 4, 32); // generic algorithm - testUSM>(Q, 1, 5, 7, 7); + testUSM>(Q, 1, 5, 7, 7); testUSM, CustomVecPlus>( Q, CustomVec(0), CustomVec(77), 8, 8 * 3); diff --git a/SYCL/Reduction/reduction_utils.hpp b/SYCL/Reduction/reduction_utils.hpp index e51030f1ea..4907501f59 100644 --- a/SYCL/Reduction/reduction_utils.hpp +++ b/SYCL/Reduction/reduction_utils.hpp @@ -110,9 +110,9 @@ void printDeviceInfo(queue &Q, bool ToCERR = false) { size_t MaxWGSize = D.get_info(); size_t LocalMemSize = D.get_info(); if (ToCERR) - std::cout << "Device: " << Name << ", MaxWGSize: " << MaxWGSize + std::cerr << "Device: " << Name << ", MaxWGSize: " << MaxWGSize << ", LocalMemSize: " << LocalMemSize << std::endl; else - std::cerr << "Device: " << Name << ", MaxWGSize: " << MaxWGSize + std::cout << "Device: " << Name << ", MaxWGSize: " << MaxWGSize << ", LocalMemSize: " << LocalMemSize << std::endl; }