diff --git a/sycl/test-e2e/PerformanceTests/CompileTime/core_hpp.cpp b/sycl/test-e2e/PerformanceTests/CompileTime/core_hpp.cpp new file mode 100644 index 0000000000000..6d566395bea06 --- /dev/null +++ b/sycl/test-e2e/PerformanceTests/CompileTime/core_hpp.cpp @@ -0,0 +1,6 @@ +// RUN: time -f "Elapsed real time: %es" %{build} -fsycl-device-only -fsyntax-only +// RUN: time -f "Elapsed real time: %es" %{build} -o %t.out + +#include + +int main() { return 0; } diff --git a/sycl/test-e2e/PerformanceTests/CompileTime/single_task_overhead.cpp b/sycl/test-e2e/PerformanceTests/CompileTime/single_task_overhead.cpp new file mode 100644 index 0000000000000..bcb55d5261538 --- /dev/null +++ b/sycl/test-e2e/PerformanceTests/CompileTime/single_task_overhead.cpp @@ -0,0 +1,33 @@ +// RUN: time -f "Elapsed real time: %es" %{build} -fsycl-device-only -fsyntax-only +// RUN: time -f "Elapsed real time: %es" %{build} -fsycl-device-only -fsyntax-only -DSUBMIT + +#include + +template struct compile_time_heavy_krn { + static void foo(int x = N) { compile_time_heavy_krn::foo(x); } +}; + +template struct compile_time_heavy_krn<0, M> { + static void foo(int x = 0) { std::ignore = x; } +}; + +int main() { + sycl::queue q; + q.single_task([]() { std::ignore = 42; }); + sycl::detail::loop<2>([&](auto outer_idx) { + sycl::detail::loop<200>([&](auto idx) { + auto krn = [=]() { + compile_time_heavy_krn::foo(); + }; + auto s = [&](sycl::handler &cgh) { +#if SUBMIT + cgh.single_task(krn); +#endif + }; +#if SUBMIT + q.submit(s); +#endif + }); + }); + return 0; +} diff --git a/sycl/test-e2e/PerformanceTests/CompileTime/sycl_hpp.cpp b/sycl/test-e2e/PerformanceTests/CompileTime/sycl_hpp.cpp new file mode 100644 index 0000000000000..2b675c38b0286 --- /dev/null +++ b/sycl/test-e2e/PerformanceTests/CompileTime/sycl_hpp.cpp @@ -0,0 +1,6 @@ +// RUN: time -f "Elapsed real time: %es" %{build} -fsycl-device-only -fsyntax-only +// RUN: time -f "Elapsed real time: %es" %{build} -o %t.out + +#include + +int main() { return 0; } diff --git a/sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp b/sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp index 3aaa3e6cb8bf4..ec5ec5396c91e 100644 --- a/sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp +++ b/sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp @@ -1,7 +1,7 @@ // REQUIRES: linux // // RUN: grep -r -l 'sycl.hpp' %S/../../test-e2e | FileCheck %s -// RUN: grep -r -l 'sycl.hpp' %S/../../test-e2e | wc -l | FileCheck %s --check-prefix CHECK-NUM-MATCHES +// RUN: grep -r -l 'sycl.hpp' %S/../../test-e2e | grep -v 'test-e2e/PerformanceTests/' | wc -l | FileCheck %s --check-prefix CHECK-NUM-MATCHES // // CHECK-DAG: README.md // CHECK-DAG: lit.cfg.py