From 258eec38de15dc0db9ea319b5ea550d1eaede9d9 Mon Sep 17 00:00:00 2001 From: Soumi Manna Date: Mon, 5 Apr 2021 11:16:18 -0700 Subject: [PATCH 1/3] [SYCL] Update tests with -fno-sycl-id-queries-fit-in-int option The changes are due to the PR: https://github.com/intel/llvm/pull/3427 Signed-off-by: Soumi Manna --- SYCL/SubGroup/sub_group_as.cpp | 2 +- SYCL/SubGroup/sub_group_as_vec.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SYCL/SubGroup/sub_group_as.cpp b/SYCL/SubGroup/sub_group_as.cpp index 0fce33ba48..6f8824f801 100644 --- a/SYCL/SubGroup/sub_group_as.cpp +++ b/SYCL/SubGroup/sub_group_as.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-sycl-id-queries-fit-in-int %s -o %t.out // Sub-groups are not suported on Host // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/SubGroup/sub_group_as_vec.cpp b/SYCL/SubGroup/sub_group_as_vec.cpp index b37af3363f..795e4d5a05 100644 --- a/SYCL/SubGroup/sub_group_as_vec.cpp +++ b/SYCL/SubGroup/sub_group_as_vec.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-sycl-id-queries-fit-in-int %s -o %t.out // Sub-groups are not suported on Host // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out From 0ec874c97040939bb998fc5cdf8b199669b809b4 Mon Sep 17 00:00:00 2001 From: Soumi Manna Date: Mon, 5 Apr 2021 11:35:59 -0700 Subject: [PATCH 2/3] Revert "[SYCL] Update tests with -fno-sycl-id-queries-fit-in-int option" This reverts commit 258eec38de15dc0db9ea319b5ea550d1eaede9d9. --- SYCL/SubGroup/sub_group_as.cpp | 2 +- SYCL/SubGroup/sub_group_as_vec.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SYCL/SubGroup/sub_group_as.cpp b/SYCL/SubGroup/sub_group_as.cpp index 6f8824f801..0fce33ba48 100644 --- a/SYCL/SubGroup/sub_group_as.cpp +++ b/SYCL/SubGroup/sub_group_as.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-sycl-id-queries-fit-in-int %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // Sub-groups are not suported on Host // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/SYCL/SubGroup/sub_group_as_vec.cpp b/SYCL/SubGroup/sub_group_as_vec.cpp index 795e4d5a05..b37af3363f 100644 --- a/SYCL/SubGroup/sub_group_as_vec.cpp +++ b/SYCL/SubGroup/sub_group_as_vec.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fno-sycl-id-queries-fit-in-int %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // Sub-groups are not suported on Host // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out From 1b9b9ca4734424221cb61080192d34fe3b5130c4 Mon Sep 17 00:00:00 2001 From: Soumi Manna Date: Thu, 27 May 2021 14:00:27 -0700 Subject: [PATCH 3/3] Fix test Signed-off-by: Soumi Manna --- SYCL/Basic/parallel_for_range.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/SYCL/Basic/parallel_for_range.cpp b/SYCL/Basic/parallel_for_range.cpp index b2c70cd384..16d04d725c 100644 --- a/SYCL/Basic/parallel_for_range.cpp +++ b/SYCL/Basic/parallel_for_range.cpp @@ -13,10 +13,6 @@ using namespace cl::sycl; -[[cl::reqd_work_group_size(4, 4, 4)]] void reqd_wg_size_helper() { - // do nothing -} - int main() { auto AsyncHandler = [](exception_list ES) { for (auto &E : ES) { @@ -48,8 +44,8 @@ int main() { try { Q.submit([&](handler &CGH) { CGH.parallel_for( - nd_range<3>(range<3>(16, 16, 16), range<3>(8, 8, 8)), - [=](nd_item<3>) { reqd_wg_size_helper(); }); + nd_range<3>(range<3>(16, 16, 16), range<3>(8, 8, 8)), [= + ](nd_item<3>) [[sycl::reqd_work_group_size(4, 4, 4)]]{}); }); Q.wait_and_throw(); std::cerr @@ -83,8 +79,8 @@ int main() { // -> fail try { Q.submit([&](handler &CGH) { - CGH.parallel_for( - range<3>(16, 16, 16), [=](item<3>) { reqd_wg_size_helper(); }); + CGH.parallel_for(range<3>(16, 16, 16), [= + ](item<3>) [[sycl::reqd_work_group_size(4, 4, 4)]]{}); }); Q.wait_and_throw(); std::cerr @@ -123,8 +119,8 @@ int main() { try { Q.submit([&](handler &CGH) { CGH.parallel_for( - nd_range<3>(range<3>(8, 8, 8), range<3>(4, 4, 4)), - [=](nd_item<3>) { reqd_wg_size_helper(); }); + nd_range<3>(range<3>(8, 8, 8), range<3>(4, 4, 4)), [= + ](nd_item<3>) [[sycl::reqd_work_group_size(4, 4, 4)]]{}); }); Q.wait_and_throw(); } catch (nd_range_error &E) {