Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
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
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%}
Copy link
Contributor

Choose a reason for hiding this comment

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

if there any way to automatically detect when the command should be run in build or test, or at least get it correct in most cases? having test authors having to add extra code to support a CI optimization they probably don't know about might be burdensome

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 did experiment with a couple of heuristics to do this, basically thinking about this in the opposite direction: what lines should only run when building, however i found that there were significantly more exceptions i had to deal with in that case. Doing it in this manner was the way that got it correct in the vast majority of cases (all but the tests included in this pr).

Would be open to ideas for sure though.

Copy link
Contributor

@sarnex sarnex Oct 25, 2024

Choose a reason for hiding this comment

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

oh i see you already handle the standard case of using one of the "{run}" things, so test authors would only have to add this if they were doing something weird, IMO that's fine

we should make sure we tell devs in precommit that its broken in split mode (so i guess we should have to use split build/run in precommit) so they can fix it quickly

// 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/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
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelAndProgram/test_cache_jit_aot.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Don't use normal %{run} as we need to control cache directory removal and
// cannot do that reliably when number of devices is unknown.
//
// REQUIRES: level_zero, ocloc
// REQUIRES: level_zero, ocloc, run-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
3 changes: 3 additions & 0 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

# Configuration file for the 'lit' test runner.

#TODO: Remove once #15728 is merged
config.available_features.add("run-mode")

# name: The name of this test suite.
config.name = "SYCL"

Expand Down
Loading