Skip to content

Commit

Permalink
[SYCL][Fusion] Require feature for all fusion tests (intel#12216)
Browse files Browse the repository at this point in the history
Even fusion end-to-end tests that do not require `complete_fusion` would
fail if the tests are executed on a device that supports fusion in
principle (e.g., CPU), but the build has fusion disabled.

This change simply replaces the `REQUIRES: fusion` in individual test
files with the equivalent in the `lit.local.cfg` to require the `fusion`
feature for all tests in the directory.

Signed-off-by: Lukas Sommer <[email protected]>
  • Loading branch information
sommerlukas authored Dec 20, 2023
1 parent 9138b6f commit 6baf1a3
Show file tree
Hide file tree
Showing 40 changed files with 3 additions and 39 deletions.
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/abort_fusion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/abort_internalization.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -O2 -fsycl-embed-ir -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 SYCL_ENABLE_FUSION_CACHING=0 %{run} %t.out 2>&1 | FileCheck %s

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not "Computation error" --implicit-check-not "Internalized" --check-prefix=CHECK %if hip %{ --check-prefix=CHECK-HIP %} %else %{ --check-prefix=CHECK-NON-HIP %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/buffer_internalization.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/cached_ndrange.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not "COMPUTATION ERROR"
// UNSUPPORTED: hip
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/cancel_fusion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/complete_fusion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/device_info_descriptor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/diamond_shape.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/diamond_shape_local.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/different_nd_ranges.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/event_wait_cancel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// REQUIRES: aspect-usm_shared_allocations
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/event_wait_complete.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// REQUIRES: aspect-usm_shared_allocations
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/existing_local_accessor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// REQUIRES: aspect-usm_shared_allocations
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/internalize_array_wrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/internalize_deep.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/internalize_multi_ptr.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/internalize_vec.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/internalize_vfunc.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/jit_caching.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not "COMPUTATION ERROR" --implicit-check-not "WRONG INTERNALIZATION"

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelFusion/jit_caching_multispirv.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: fusion, gpu, (opencl || level_zero)
// REQUIRES: gpu, (opencl || level_zero)
// RUN: %{build} -O2 -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --implicit-check-not "WRONG a VALUE" --implicit-check-not "WRONG b VALUE"

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelFusion/jit_caching_multitarget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: fusion, gpu, (hip || cuda)
// REQUIRES: gpu, (hip || cuda)
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run-unfiltered-devices} %t.out 2>&1 | FileCheck %s --implicit-check-not "WRONG a VALUE" --implicit-check-not "WRONG b VALUE"
// XFAIL: *
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/KernelFusion/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import platform

config.required_features += ['fusion']
config.unsupported_features += ['accelerator']

# TODO: enable on Windows once kernel fusion is supported on Windows.
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/local_internalization.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/math_function.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/non_unit_local_size.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/pointer_arg_function.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out
// This test currently fails because InferAddressSpace is not able to remove all
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/private_internalization.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/ranged_offset_accessor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/struct_with_array.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/sync_two_queues_event_dep.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// For this test, complete_fusion must be supported.
// REQUIRES: fusion
// RUN: %{build} -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/sync_two_queues_requirement.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// For this test, complete_fusion must be supported.
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: env SYCL_RT_WARNING_LEVEL=1 %{run} %t.out 2>&1 | FileCheck %s

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/three_dimensional.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/two_dimensional.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -O2 -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/usm_no_dependencies.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// REQUIRES: aspect-usm_shared_allocations
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/work_group_barrier.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/KernelFusion/wrapped_usm.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: fusion
// REQUIRES: aspect-usm_shared_allocations
// RUN: %{build} -fsycl-embed-ir -o %t.out
// RUN: %{run} %t.out
Expand Down

0 comments on commit 6baf1a3

Please sign in to comment.