Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][E2E] Add functionality to split build and run of e2e tests #16016

Merged
merged 24 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7432d1c
Add functionality to split build and run of e2e tests
ayylol Nov 7, 2024
be37e41
Add `REQUIRES: unsplit-mode` to tests that failed building
ayylol Nov 7, 2024
be6805f
Add `XFAIL: run-mode` to xfail tests that are able to build
ayylol Nov 7, 2024
10d2c4c
Add `XFAIL: *` to tests that fail building
ayylol Nov 7, 2024
4eb0d31
Add `%if run-mode` to lines that should not run in build-mode
ayylol Nov 7, 2024
0ed6008
Add `%{run}` to tests that did not use it
ayylol Nov 7, 2024
dd77b6d
Remove added RUN line from test
ayylol Nov 7, 2024
364994d
Merge branch 'sycl' into e2e-split
ayylol Nov 12, 2024
29048da
Change XFAIL for DeviceArchitecture test
ayylol Nov 12, 2024
b8e6cfc
Replace `unsplit-mode` with `unsplit-test-mode`
ayylol Nov 12, 2024
0f19c31
Add test.config.split_mode variable to clean up if statements
ayylol Nov 13, 2024
97369f7
Fix formatting
ayylol Nov 13, 2024
70c2555
Rename usages of "split"
ayylol Nov 13, 2024
1387eed
Merge branch 'sycl' into e2e-split
ayylol Nov 13, 2024
dfcbcd1
Detect `UNSUPPORTED: true`
ayylol Nov 14, 2024
b40fcf3
Rename run-and-build to build-and-run
ayylol Nov 14, 2024
b8b1b1e
Merge branch 'sycl' into e2e-split
ayylol Nov 14, 2024
2811890
Fix formatting
ayylol Nov 15, 2024
ef98efd
Merge branch 'sycl' into e2e-split
ayylol Nov 15, 2024
4bd4857
Add empty device_arch flag on build-only
ayylol Nov 15, 2024
1f393c0
Add run-line markers for KernelCompiler test
ayylol Nov 15, 2024
5fcb771
Address reviewer comments
ayylol Nov 15, 2024
f3fc08f
Merge branch 'sycl' into e2e-split
ayylol Nov 20, 2024
f1b98c3
Merge branch 'sycl' into e2e-split
ayylol Nov 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sycl/test-e2e/AmdNvidiaJIT/kernel_and_bundle.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// UNSUPPORTED: windows
// REQUIRES: cuda || hip
// REQUIRES: unsplit-mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we might want something more descriptive here, if possible UNSUPPORTED: split-test-build-and-run or something like that

Copy link
Contributor Author

@ayylol ayylol Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will address this comment last to leave open to bike-shedding. Would something like unsplit-test-mode work? or unsplit-testing, should the other features (build-mode, run-mode) follow suit? or are they clear enough.

I don't think i'd want to put the word "split" in this particular feature, since it is exactly what it isn't.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah of course i dont want to start bikeshedding, REQUIRES: unsplit-test-mode is fine with me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't it be clearer to have something like only-build-test, only-run-test, build-and-run-test instead of build-mode, run-mode, and unsplit-test-mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't it be clearer to have something like only-build-test, only-run-test, build-and-run-test instead of build-mode, run-mode, and unsplit-test-mode?

The run-mode feature is useful because it allows us to have common behaviour between the run-only and unsplit modes, if we didnt have it we would have to mark tests that xfail at run-time as both XFAIL on only-run-test and build-and-run-test.

The build-mode feature I could not think of a valid use for, since if we have an xfail at build time we would always also want to mark it as an xfail at run-time since we wouldn't have an executable, also a test in the e2e folder that uses REQUIRES: build-mode seems a bit suspicious.

I added something like build-only/run-only/unsplit as a variable within the python scripts, but not as a feature since their usefulness in that context is unclear to me. Rather I'm using them to clean up if statements in the python scripts where we want to check what split-mode we are in.


// This test relies on debug output from a pass, make sure that the compiler
// can generate it.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/fpga_tests/fpga_pipes_mixed_usage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// XFAIL: *
// XFAIL: run-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/13887
// If users need to use host pipe feature provided by experimental::pipe, all
// pipes in their design should use the experimental::pipe (as a workround).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: windows
// REQUIRES: unsplit-mode

// RUN: %clangxx --driver-mode=cl /std:c++17 /EHsc -I%sycl_include -I%opencl_include_dir %s -o %t.out /link /defaultlib:%sycl_static_libs_dir/sycl.lib
// RUN: %{run} %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Compression/no_zstd_warning.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// using --offload-compress without zstd should throw an error.
// REQUIRES: !zstd
// REQUIRES: unsplit-mode
// RUN: not %{build} %O0 -g --offload-compress %S/Inputs/single_kernel.cpp -o %t_compress.out 2>&1 | FileCheck %s
// CHECK: '--offload-compress' option is specified but zstd is not available. The device image will not be compressed.
10 changes: 5 additions & 5 deletions sycl/test-e2e/Config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
// RUN: %{build} %debug_option %O0 -o %t.out
// RUN: echo SYCL_PRINT_EXECUTION_GRAPH=always > %t.cfg
// RUN: %{run-unfiltered-devices} env SYCL_CONFIG_FILE_NAME=%t.cfg %t.out
// RUN: cat *.dot > /dev/null
// RUN: rm *.dot
// RUN: %if run-mode %{cat *.dot > /dev/null%}
// RUN: %if run-mode %{rm *.dot%}
// RUN: %{run-unfiltered-devices} env SYCL_PRINT_EXECUTION_GRAPH=always %t.out
// RUN: cat *.dot > /dev/null
// RUN: rm *.dot
// RUN: %if run-mode %{cat *.dot > /dev/null%}
// RUN: %if run-mode %{rm *.dot%}
// RUN: %{run-unfiltered-devices} %t.out
// RUN: not cat *.dot > /dev/null
// RUN: %if run-mode %{not cat *.dot > /dev/null%}

#include <sycl/detail/core.hpp>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: arch-intel_gpu_pvc, ocloc

// XFAIL: arch-intel_gpu_pvc
// XFAIL: arch-intel_gpu_pvc, run-mode
ayylol marked this conversation as resolved.
Show resolved Hide resolved
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/14826

// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_pvc %s -o %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/DeviceLib/math_fp64_windows_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: aspect-fp64, windows
// REQUIRES: unsplit-mode

// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}

Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/DeviceLib/math_windows_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: windows
// REQUIRES: unsplit-mode

// TODO: Add hypotf case back when the missing symbol is fixed.

Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out
// RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir 2914 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm
// RUN: echo "Baseline from driver version 1.3.30872"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 2914 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm%}
// RUN: %if run-mode %{echo "Baseline from driver version 1.3.30872"%}

#include "../BitonicSortK.cpp"
4 changes: 2 additions & 2 deletions sycl/test-e2e/ESIMD/PerformanceTests/BitonicSortKv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out
// RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir 2969 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm
// RUN: echo "Baseline from driver version 1.3.30872"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 2969 ZTSZZN11BitonicSort5SolveEPjS0_jENKUlRN4sycl3_V17handlerEE0_clES4_E5Merge.asm%}
// RUN: %if run-mode %{echo "Baseline from driver version 1.3.30872"%}

#include "../BitonicSortKv2.cpp"
6 changes: 3 additions & 3 deletions sycl/test-e2e/ESIMD/PerformanceTests/Stencil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out
// RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm
// RUN: echo "Baseline from driver version 1.3.29138"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm%}
// RUN: %if run-mode %{echo "Baseline from driver version 1.3.29138"%}

#include "../Stencil.cpp"
#include "../Stencil.cpp"
6 changes: 3 additions & 3 deletions sycl/test-e2e/ESIMD/PerformanceTests/invoke_simd_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.dir/exec.out
// RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir 149 _simd16_entry_0001.asm
// RUN: echo "Baseline from driver version 1.3.29735"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 149 _simd16_entry_0001.asm%}
// RUN: %if run-mode %{echo "Baseline from driver version 1.3.29735"%}

#include "../../InvokeSimd/invoke_simd_smoke.cpp"
#include "../../InvokeSimd/invoke_simd_smoke.cpp"
4 changes: 2 additions & 2 deletions sycl/test-e2e/ESIMD/PerformanceTests/matrix_transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out
// RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir %if igc-dev %{ 1059 %} %else %{ 1116 %} ZTSZZ7runTestjjjRdS_ENKUlRN4sycl3_V17handlerEE_clES3_E3K16.asm
// RUN: echo "Baseline from driver version 1.3.30872"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir %if igc-dev %{ 1059 %} %else %{ 1116 %} ZTSZZ7runTestjjjRdS_ENKUlRN4sycl3_V17handlerEE_clES3_E3K16.asm%}
// RUN: %if run-mode %{echo "Baseline from driver version 1.3.30872"%}

#include "../matrix_transpose.cpp"
6 changes: 3 additions & 3 deletions sycl/test-e2e/ESIMD/PerformanceTests/stencil2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out
// RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm
// RUN: echo "Baseline from driver version 1.3.29138"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir 1699 ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E14Stencil_kernel.asm%}
// RUN: %if run-mode %{echo "Baseline from driver version 1.3.29138"%}

#include "../stencil2.cpp"
#include "../stencil2.cpp"
2 changes: 1 addition & 1 deletion sycl/test-e2e/ESIMD/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// The test still fails after GPU driver update on Linux. Temporary marking it
// as expected to fail, whilst it is being investigated, see intel/llvm#11359
// XFAIL: linux
// XFAIL: linux && run-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/11359
//
// Hanging on gen12, remove when internal tracker fixed
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/ESIMD/preemption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// UNSUPPORTED: gpu-intel-dg2 || arch-intel_gpu_pvc
// RUN: %{build} -o %t.out
// RUN: env IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 %{run} %t.out
// RUN: grep enablePreemption %t.dump/*.asm
// RUN: %if run-mode %{grep enablePreemption %t.dump/*.asm%}

// The test expects to see "enablePreemption" switch in the compilation
// switches. It fails if does not find it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %{build} -Wno-error=deprecated-declarations -o %t.out %cuda_options
// RUN: %{run} %t.out
// REQUIRES: cuda, cuda_dev_kit
// REQUIRES: unsplit-mode

#include <cuda.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// RUN: %{build} -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64
// RUN: %{run} %t.out
// REQUIRES: hip
// REQUIRES: unsplit-mode

#include <iostream>
#include <sycl/backend.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: cuda, cuda_dev_kit
// REQUIRES: unsplit-mode
// RUN: %{build} -o %t.out %cuda_options
// RUN: %{run} %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: cuda, cuda_dev_kit
// REQUIRES: unsplit-mode
//
// RUN: %{build} -o %t.out %cuda_options
// RUN: %{run} %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/HostInteropTask/interop-task-cuda.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %{build} -o %t.out %cuda_options
// RUN: %{run} %t.out
// REQUIRES: cuda, cuda_dev_kit
// REQUIRES: unsplit-mode

#include <iostream>
#include <sycl/backend.hpp>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/HostInteropTask/interop-task-hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// RUN: %{build} -Wno-error=deprecated-declarations -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64
// RUN: %{run} %t.out
// REQUIRES: hip
// REQUIRES: unsplit-mode

#include <iostream>
#include <sycl/backend.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InlineAsm/asm_multiple_instructions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// RUN: %{run} %t.out
// The test is failing when writing directly to output buffer.
// If temporary variable is used (see TO_PASS mode) the test succeeded.
// XFAIL: gpu
// XFAIL: gpu && run-mode
#include "include/asmhelper.h"
#include <iostream>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// TODO: Passing/returning structures via invoke_simd() API is not implemented
// in GPU driver yet. Enable the test when GPU RT supports it.
// XFAIL: gpu
// XFAIL: gpu && run-mode
//
// RUN: %{build} -DIMPL_SUBGROUP -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out
// RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Feature/invoke_simd_struct.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// TODO: Passing/returning structures via invoke_simd() API is not implemented
// in GPU driver yet. Enable the test when GPU RT supports it.
// XFAIL: gpu
// XFAIL: gpu, run-mode
//
// RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out
// RUN: env IGC_VCSaveStackCallLinkage=1 IGC_VCDirectCallsOnly=1 %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Spec/ImplicitSubgroup/tuple.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: enable when Jira ticket resolved
// XFAIL: gpu
// XFAIL: *
sarnex marked this conversation as resolved.
Show resolved Hide resolved
//
// Check that full compilation works:
// RUN: %clangxx -DIMPL_SUBGROUP -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr %S/../tuple.cpp -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: enable when Jira ticket resolved
// XFAIL: gpu
// XFAIL: *
//
// Check that full compilation works:
// RUN: %clangxx -DIMPL_SUBGROUP -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr %S/../tuple_return.cpp -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: enable when Jira ticket resolved
// XFAIL: gpu
// XFAIL: *
//
// Check that full compilation works:
// RUN: %clangxx -DIMPL_SUBGROUP -fsycl -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr %S/../tuple_vadd.cpp -o %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Spec/tuple.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: enable when Jira ticket resolved
// XFAIL: gpu
// XFAIL: *
//
// Check that full compilation works:
// RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Spec/tuple_return.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: enable when Jira ticket resolved
// XFAIL: gpu
// XFAIL: *
//
// Check that full compilation works:
// RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/InvokeSimd/Spec/tuple_vadd.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: enable when Jira ticket resolved
// XFAIL: gpu
// XFAIL: *
//
// Check that full compilation works:
// RUN: %{build} -fno-sycl-device-code-split-esimd -Xclang -fsycl-allow-func-ptr -o %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// cannot do that reliably when number of devices is unknown.
//
// REQUIRES: level_zero, ocloc
// REQUIRES: unsplit-mode
//
// DEFINE: %{cache_vars} = env SYCL_CACHE_PERSISTENT=1 SYCL_CACHE_TRACE=1 SYCL_CACHE_DIR=%t/cache_dir
// DEFINE: %{build_cmd} = %{build}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
// or SYCL_CACHE_TRACE is set to 0.

// RUN: env SYCL_CACHE_IN_MEM=0 %{run} %t.out 2> %t.trace1
// RUN: FileCheck --allow-empty --input-file=%t.trace1 --implicit-check-not "In-Memory Cache" %s
// RUN: %if run-mode %{ FileCheck --allow-empty --input-file=%t.trace1 --implicit-check-not "In-Memory Cache" %s %}
// RUN: env SYCL_CACHE_TRACE=0 %{run} %t.out 2> %t.trace2
// RUN: FileCheck --allow-empty --input-file=%t.trace2 --implicit-check-not "In-Memory Cache" %s
// RUN: %if run-mode %{ FileCheck --allow-empty --input-file=%t.trace2 --implicit-check-not "In-Memory Cache" %s %}

// RUN: env SYCL_CACHE_TRACE=2 %{run} %t.out 2> %t.trace3
// RUN: FileCheck %s --input-file=%t.trace3 --check-prefix=CHECK-CACHE-TRACE
// RUN: %if run-mode %{ FileCheck %s --input-file=%t.trace3 --check-prefix=CHECK-CACHE-TRACE %}

#include <sycl/detail/core.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// XFAIL:*
// XFAIL: run-mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry if i asked this before but i wonder if we can implement this inside the python scripts instead of requiring test changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are to differentiate between tests that fail when compiling vs tests that fail when running. These tests originally are able to build so marking as XFAIL: run-mode makes sure these tests arent reported as XPASS when building only.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want (very strongly) to start with explicit tests markup first before we introduce any heuristics in the lit logic, especially if that's really heuristics and not some bullet-proof correct logic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess im just worried this feature will slow down/confuse developers writing tests, im willing to proceed with this as-is and see what happens, but we should be ready to revert/fix the problem fast if some issue comes up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess im just worried this feature will slow down/confuse developers writing tests, im willing to proceed with this as-is and see what happens, but we should be ready to revert/fix the problem fast if some issue comes up

For now since there is no automatic running on CI enabled, we'll just have to monitor the failures manually.

However once this is integrated into the post/pre commit I think it should be pretty straightforward to figure out the appropriate action given the ci's behaviour:

  • If we see that a test passes the build stage but fails the run stage we have a runfail, and if this is expected we would mark it as XFAIL/UNSUPPORTED on run-mode.
  • If it fails on both the build and run stage then we have a compfail and we would mark as XFAIL/UNSUPPORTED * (Or we could mark as XFAIL for a feature that is non-device-specific, like linux).


#include "../common.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t.out
// RUN: %{run} %t.out

// XFAIL:*
// XFAIL: run-mode

#include "../../common.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// RUN: %{build} -D__SPIRV_USE_COOPERATIVE_MATRIX -o %t.out
// RUN: %{run} %t.out

// XFAIL:*
// XFAIL: run-mode

#include "../common.hpp"

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Matrix/joint_matrix_colA_rowB_colC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// XFAIL:*
// XFAIL: run-mode

#include "common.hpp"

Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Matrix/joint_matrix_hip_gfx90a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// RUN: %{run} %t.out

// REQUIRES: gpu-amd-gfx90a
// REQUIRES: unsplit-mode

#include "joint_matrix_hip_apply.hpp"
#include "joint_matrix_hip_copy.hpp"
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Matrix/joint_matrix_hip_half_gfx90a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// REQUIRES: gpu-amd-gfx90a
// REQUIRES: aspect-fp16
// REQUIRES: unsplit-mode

#include "joint_matrix_hip_apply.hpp"
#include "joint_matrix_hip_copy.hpp"
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Matrix/joint_matrix_tensorcores_sm70.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: cuda
// REQUIRES: unsplit-mode
// RUN: %{build} -Xsycl-target-backend --cuda-gpu-arch=sm_70 -o %t.out
// RUN: %{run} %t.out
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Matrix/runtime_query_hip_gfx90a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: gpu-amd-gfx90a
// REQUIRES: unsplit-mode
// RUN: %{build} -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx90a -o %t.out
// RUN: %{run} %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: hip_amd, opencl, gpu, cpu
// REQUIRES: unsplit-mode

// RUN: %clangxx -fsycl -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx906 -fsycl-targets=amdgcn-amd-amdhsa %S/Inputs/is_compatible_with_env.cpp -o %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: cuda, opencl, gpu, cpu
// REQUIRES: unsplit-mode

// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/is_compatible_with_env.cpp -o %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: ocloc, level_zero, gpu, cpu
// REQUIRES: unsplit-mode

// RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga,spir64_gen -Xsycl-target-backend "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out

Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Plugin/cuda_queue_priority.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: gpu, cuda, cuda_dev_kit
// REQUIRES: unsplit-mode
// RUN: %{build} %cuda_options -o %t.out
// RUN: %{run} %t.out
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Plugin/dll-detach-order.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: windows
// REQUIRES: unsplit-mode
// RUN: env SYCL_UR_TRACE=-1 sycl-ls | FileCheck %s

// ensure that the plugins are detached AFTER urLoaderTearDown is done executing
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Plugin/level_zero_sub_sub_device.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: arch-intel_gpu_pvc, level_zero

// XFAIL: arch-intel_gpu_pvc
// XFAIL: arch-intel_gpu_pvc && run-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/15602

// RUN: %{build} %level_zero_options -o %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Plugin/sycl-ls-gpu-cuda.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: gpu, cuda
// REQUIRES: unsplit-mode

// RUN: env ONEAPI_DEVICE_SELECTOR="cuda:*" sycl-ls --verbose >%t.cuda.out
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out
Expand Down
Loading
Loading