From ec3262e986f9d2c0ffa4fd1bc549212d6492944a Mon Sep 17 00:00:00 2001 From: Joe Todd Date: Wed, 23 Oct 2024 11:43:50 +0100 Subject: [PATCH 1/4] Move tests to correct (non-e2e) test dir These tests never run the compiled code, so belong in `sycl/test` --- sycl/{test-e2e => test}/syclcompat/launch/kernel_properties.cpp | 0 .../syclcompat/launch/launch_policy_lmem_neg.cpp | 0 sycl/{test-e2e => test}/syclcompat/launch/launch_policy_neg.cpp | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename sycl/{test-e2e => test}/syclcompat/launch/kernel_properties.cpp (100%) rename sycl/{test-e2e => test}/syclcompat/launch/launch_policy_lmem_neg.cpp (100%) rename sycl/{test-e2e => test}/syclcompat/launch/launch_policy_neg.cpp (100%) diff --git a/sycl/test-e2e/syclcompat/launch/kernel_properties.cpp b/sycl/test/syclcompat/launch/kernel_properties.cpp similarity index 100% rename from sycl/test-e2e/syclcompat/launch/kernel_properties.cpp rename to sycl/test/syclcompat/launch/kernel_properties.cpp diff --git a/sycl/test-e2e/syclcompat/launch/launch_policy_lmem_neg.cpp b/sycl/test/syclcompat/launch/launch_policy_lmem_neg.cpp similarity index 100% rename from sycl/test-e2e/syclcompat/launch/launch_policy_lmem_neg.cpp rename to sycl/test/syclcompat/launch/launch_policy_lmem_neg.cpp diff --git a/sycl/test-e2e/syclcompat/launch/launch_policy_neg.cpp b/sycl/test/syclcompat/launch/launch_policy_neg.cpp similarity index 100% rename from sycl/test-e2e/syclcompat/launch/launch_policy_neg.cpp rename to sycl/test/syclcompat/launch/launch_policy_neg.cpp From 568de400548e17e8114127a1e9230bd529580ef0 Mon Sep 17 00:00:00 2001 From: Joe Todd Date: Wed, 23 Oct 2024 11:46:32 +0100 Subject: [PATCH 2/4] Update RUN commands --- .../syclcompat/launch/kernel_properties.cpp | 2 +- .../launch/launch_policy_lmem_neg.cpp | 2 +- .../syclcompat/launch/launch_policy_neg.cpp | 24 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sycl/test/syclcompat/launch/kernel_properties.cpp b/sycl/test/syclcompat/launch/kernel_properties.cpp index be557a61fe570..de69ec062d565 100644 --- a/sycl/test/syclcompat/launch/kernel_properties.cpp +++ b/sycl/test/syclcompat/launch/kernel_properties.cpp @@ -23,7 +23,7 @@ // We need hardware which can support at least 2 sub-group sizes, since that // hardware (presumably) supports the `intel_reqd_sub_group_size` attribute. // REQUIRES: sg-32 && sg-16 -// RUN: %{build} %if cl_options %{/clang:-S /clang:-emit-llvm%} %else %{-S -emit-llvm%} -o - | FileCheck %s +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %if cl_options %{/clang:-S /clang:-emit-llvm%} %else %{-S -emit-llvm%} -o - | FileCheck %s #include #include diff --git a/sycl/test/syclcompat/launch/launch_policy_lmem_neg.cpp b/sycl/test/syclcompat/launch/launch_policy_lmem_neg.cpp index 27fb160e54c4b..98222d6cc374f 100644 --- a/sycl/test/syclcompat/launch/launch_policy_lmem_neg.cpp +++ b/sycl/test/syclcompat/launch/launch_policy_lmem_neg.cpp @@ -22,7 +22,7 @@ * templates as tests in launch_policy_neg.cpp **************************************************************************/ -// RUN: not %{build} -o %t.out 2>&1 | FileCheck -vv %s +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out 2>&1 | FileCheck -vv %s #include #include diff --git a/sycl/test/syclcompat/launch/launch_policy_neg.cpp b/sycl/test/syclcompat/launch/launch_policy_neg.cpp index a73a88abe02d5..558864084ff62 100644 --- a/sycl/test/syclcompat/launch/launch_policy_neg.cpp +++ b/sycl/test/syclcompat/launch/launch_policy_neg.cpp @@ -20,18 +20,18 @@ * Negative tests for new launch_policy. **************************************************************************/ -// RUN: not %{build} -DCHECK1 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK1 -// RUN: not %{build} -DCHECK2 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK2 -// RUN: not %{build} -DCHECK3 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK3 -// RUN: not %{build} -DCHECK4 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK4 -// RUN: not %{build} -DCHECK5 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK5 -// RUN: not %{build} -DCHECK6 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK6 -// RUN: not %{build} -DCHECK7 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK7 -// RUN: not %{build} -DCHECK8 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK8 -// RUN: not %{build} -DCHECK9 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK9 -// RUN: not %{build} -DCHECK10 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK10 -// RUN: not %{build} -DCHECK11 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK11 -// RUN: not %{build} -DCHECK12 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK12 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK1 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK1 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK2 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK2 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK3 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK3 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK4 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK4 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK5 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK5 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK6 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK6 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK7 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK7 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK8 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK8 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK9 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK9 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK10 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK10 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK11 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK11 +// RUN: not %clangxx -fsycl -fsycl-targets=%sycl_triple %s -DCHECK12 -o %t.out 2>&1 | FileCheck -vv %s --check-prefixes=CHECK12 #include #include From 544c4c8a1dc058e20f696622c4ebc6a6c3ab4942 Mon Sep 17 00:00:00 2001 From: Joe Todd Date: Wed, 23 Oct 2024 12:05:41 +0100 Subject: [PATCH 3/4] Remove (unneeded?) cl_options clause --- sycl/test/syclcompat/launch/kernel_properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test/syclcompat/launch/kernel_properties.cpp b/sycl/test/syclcompat/launch/kernel_properties.cpp index de69ec062d565..ff42cfd159aaf 100644 --- a/sycl/test/syclcompat/launch/kernel_properties.cpp +++ b/sycl/test/syclcompat/launch/kernel_properties.cpp @@ -23,7 +23,7 @@ // We need hardware which can support at least 2 sub-group sizes, since that // hardware (presumably) supports the `intel_reqd_sub_group_size` attribute. // REQUIRES: sg-32 && sg-16 -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %if cl_options %{/clang:-S /clang:-emit-llvm%} %else %{-S -emit-llvm%} -o - | FileCheck %s +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -S -emit-llvm -o - | FileCheck %s #include #include From eecfe5562ef53e7c82806b462dd78ed32352809d Mon Sep 17 00:00:00 2001 From: Joe Todd Date: Wed, 23 Oct 2024 16:40:59 +0100 Subject: [PATCH 4/4] Re-add clang-cl conditonal args to test --- sycl/test/syclcompat/launch/kernel_properties.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sycl/test/syclcompat/launch/kernel_properties.cpp b/sycl/test/syclcompat/launch/kernel_properties.cpp index ff42cfd159aaf..f17571fae0c2d 100644 --- a/sycl/test/syclcompat/launch/kernel_properties.cpp +++ b/sycl/test/syclcompat/launch/kernel_properties.cpp @@ -23,8 +23,7 @@ // We need hardware which can support at least 2 sub-group sizes, since that // hardware (presumably) supports the `intel_reqd_sub_group_size` attribute. // REQUIRES: sg-32 && sg-16 -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -S -emit-llvm -o - | FileCheck %s - +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %if cl_options %{/clang:-S /clang:-emit-llvm%} %else %{-S -emit-llvm%} -o - | FileCheck %s #include #include #include