Skip to content
Merged
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
7 changes: 4 additions & 3 deletions sycl/test-e2e/Compression/compression_multiple_tu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// translation units, one compressed and one not compressed.
// REQUIRES: zstd, linux

// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %T/kernel1.so
// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %T/kernel2.so
// RUN: mkdir -p %t.dir
// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %t.dir/kernel1.so
// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %t.dir/kernel2.so

// RUN: %{build} %T/kernel1.so %T/kernel2.so -o %t_compress.out
// RUN: %{build} %t.dir/kernel1.so %t.dir/kernel2.so -o %t_compress.out
// RUN: %{run} %t_compress.out
#if defined(ENABLE_KERNEL1) || defined(ENABLE_KERNEL2)
#include <sycl/builtins.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
// DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %}
// DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%}

// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix}
// DEFINE: %{tdir} = %t/..
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not %t.dir here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Used %t.dir at first, these 4 tests are failing. I think it is because the following run assume the shared lib in the same folder as %t, so use %t/.. to emulate that.

Copy link
Contributor

Choose a reason for hiding this comment

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

@maarquitos14 , do you know what should be changed for those tests to work with %t.dir?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm approving to unblock pulldown, but @maarquitos14 please review/follow-up post-commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't, but I'll speak with the team and follow up.

Copy link
Contributor

Choose a reason for hiding this comment

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

They all pass locally for me with %t.dir except the compressed one, which I couldn't try because I don't have zstd. Did you try locally @jsji? Or was it the CI that failed?

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 didn't try locally, they were failing in CI.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, once we have this merged I'll open a PR with them using %t.dir to see if they pass or fail CI, and if they still fail I'll try to emulate CI locally.

// RUN: mkdir -p %{tdir}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix}
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%{tdir}/libdevice_b.lib%} -o %{tdir}/libdevice_a.%{dynamic_lib_suffix}

// RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies -I %S/Inputs -o %t.out \
// RUN: %if windows \
// RUN: %{%T/libdevice_a.lib%} \
// RUN: %{%{tdir}/libdevice_a.lib%} \
// RUN: %else \
// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%}
// RUN: %{-L%{tdir} -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%{tdir}%}

// RUN: %{run} %t.out

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
// Test -fsycl-allow-device-image-dependencies with a single dynamic library on
// Windows and Linux.

// DEFINE: %{tdir} = %t/..
// RUN: mkdir -p %{tdir}
// RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \
// RUN: %S/Inputs/a.cpp \
// RUN: %S/Inputs/b.cpp \
// RUN: %S/Inputs/c.cpp \
// RUN: %S/Inputs/d.cpp \
// RUN: %S/Inputs/wrapper.cpp \
// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%}
// RUN: -o %if windows %{%{tdir}/device_single.dll%} %else %{%{tdir}/libdevice_single.so%}

// RUN: %{build} --offload-new-driver -I%S/Inputs -o %t.out \
// RUN: %if windows \
// RUN: %{%T/device_single.lib%} \
// RUN: %{%{tdir}/device_single.lib%} \
// RUN: %else \
// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%}
// RUN: %{-L%{tdir} -ldevice_single -Wl,-rpath=%{tdir}%}

// RUN: %{run} %t.out

Expand Down
14 changes: 8 additions & 6 deletions sycl/test-e2e/DeviceImageDependencies/dynamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
// DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %}
// DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%}

// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix}
// DEFINE: %{tdir} = %t/..
// RUN: mkdir -p %{tdir}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix}
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%{tdir}/libdevice_b.lib%} -o %{tdir}/libdevice_a.%{dynamic_lib_suffix}

// RUN: %clangxx -fsycl %{sycl_target_opts} -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel %S/Inputs/basic.cpp -o %t.out \
// RUN: %if windows \
// RUN: %{%T/libdevice_a.lib%} \
// RUN: %{%{tdir}/libdevice_a.lib%} \
// RUN: %else \
// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%}
// RUN: %{-L%{tdir} -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%{tdir}%}

// RUN: %{run} %t.out

Expand Down
19 changes: 10 additions & 9 deletions sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@
// DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %}
// DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%}

// RUN: mkdir -p %t.dir
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp \
// RUN: -o %T/libdevicecompress_d.%{dynamic_lib_suffix}
// RUN: -o %t.dir/libdevicecompress_d.%{dynamic_lib_suffix}

// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp \
// RUN: %if windows %{%T/libdevicecompress_d.lib%} \
// RUN: -o %T/libdevicecompress_c.%{dynamic_lib_suffix}
// RUN: %if windows %{%t.dir/libdevicecompress_d.lib%} \
// RUN: -o %t.dir/libdevicecompress_c.%{dynamic_lib_suffix}

// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp \
// RUN: %if windows %{%T/libdevicecompress_c.lib%} \
// RUN: -o %T/libdevicecompress_b.%{dynamic_lib_suffix}
// RUN: %if windows %{%t.dir/libdevicecompress_c.lib%} \
// RUN: -o %t.dir/libdevicecompress_b.%{dynamic_lib_suffix}

// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp \
// RUN: %if windows %{%T/libdevicecompress_b.lib%} \
// RUN: -o %T/libdevicecompress_a.%{dynamic_lib_suffix}
// RUN: %if windows %{%t.dir/libdevicecompress_b.lib%} \
// RUN: -o %t.dir/libdevicecompress_a.%{dynamic_lib_suffix}

// Compressed main executable, while dependencies are not compressed.

// RUN: %clangxx -fsycl --offload-compress %{sycl_target_opts} \
// RUN: -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel \
// RUN: %S/Inputs/basic.cpp -o %t.out \
// RUN: %if windows \
// RUN: %{%T/libdevicecompress_a.lib%} \
// RUN: %{%t.dir/libdevicecompress_a.lib%} \
// RUN: %else \
// RUN: %{-L%T -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%T%}
// RUN: %{-L%t.dir -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%t.dir%}

// RUN: %{run} %t.out
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
// Test -fsycl-allow-device-image-dependencies with a single dynamic library on Windows
// and Linux.

// DEFINE: %{tdir} = %t/..
// RUN: mkdir -p %{tdir}
// RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \
// RUN: %S/Inputs/a.cpp \
// RUN: %S/Inputs/b.cpp \
// RUN: %S/Inputs/c.cpp \
// RUN: %S/Inputs/d.cpp \
// RUN: %S/Inputs/wrapper.cpp \
// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%}
// RUN: -o %if windows %{%{tdir}/device_single.dll%} %else %{%{tdir}/libdevice_single.so%}

// RUN: %{build} -I%S/Inputs -o %t.out \
// RUN: %if windows \
// RUN: %{%T/device_single.lib%} \
// RUN: %{%{tdir}/device_single.lib%} \
// RUN: %else \
// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%}
// RUN: %{-L%{tdir} -ldevice_single -Wl,-rpath=%{tdir}%}

// RUN: %{run} %t.out

Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// library is dlclosed and the device images are removed.

// REQUIRES: linux
// RUN: mkdir -p %t.dir
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so

// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so

// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T -o %t1.out
// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir -o %t1.out

// RUN: %{run} %t1.out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
// Check bfloat16 devicelib device image compression.

// REQUIRES: linux, zstd
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so
// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%T
// RUN: mkdir -p %t.dir
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so
// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%t.dir
// RUN: %{run} %t1.out

// UNSUPPORTED: target-nvidia || target-amd
Expand Down
5 changes: 3 additions & 2 deletions sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
//===----------------------------------------------------------------------===//

// REQUIRES: linux
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
// RUN: %{build} -DBUILD_EXE -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T
// RUN: mkdir -p %t.dir
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so
// RUN: %{build} -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: %{run} %t1.out

// UNSUPPORTED: target-nvidia || target-amd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
// Check bfloat16 devicelib device image compression.

// REQUIRES: linux, zstd
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so
// RUN: %{build} --offload-compress -DBUILD_EXE -L%T -o %t1.out -l%basename_t_compress -Wl,-rpath=%T
// RUN: mkdir -p %t.dir
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so
// RUN: %{build} --offload-compress -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t_compress -Wl,-rpath=%t.dir
// RUN: %{run} %t1.out

// UNSUPPORTED: target-nvidia || target-amd
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
// REQUIRES: aspect-ext_intel_legacy_image
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
// RUN: %{build} %{mathflags} -o %t.out
// RUN: %{run} %t.out %T/output.ppm %S/golden_hw.ppm
// RUN: mkdir -p %t.dir
// RUN: %{run} %t.out %t.dir/output.ppm %S/golden_hw.ppm

#include "../esimd_test_utils.hpp"

Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
// REQUIRES: aspect-ext_intel_legacy_image
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
// RUN: %{build} %{mathflags} -o %t.out
// RUN: %{run} %t.out %T/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0
// RUN: mkdir -p %t.dir
// RUN: %{run} %t.out %t.dir/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0

#include "../esimd_test_utils.hpp"

Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//
// FIXME: is there better way to handle libraries loading than LD_PRELOAD?
// There is no LIT substitution, which would point to a directory, where
// temporary files are located. There is %T, but it is marked as "deprecated,
// do not use"
// temporary files are located.

// RUN: env LD_PRELOAD=%t-lib-a.so %{run} %t-a.run
// RUN: env LD_PRELOAD=%t-lib-o.so %{run} %t-o.run
5 changes: 3 additions & 2 deletions sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// REQUIRES: level_zero && linux

// build shared library
// RUN: %clangxx -fsycl -fPIC -shared -o %T/simple_lib.so %S/Inputs/simple_lib.cpp
// RUN: mkdir -p %t.dir
// RUN: %clangxx -fsycl -fPIC -shared -o %t.dir/simple_lib.so %S/Inputs/simple_lib.cpp

// build app
// RUN: %clangxx -DSO_PATH="%T/simple_lib.so" -o %t.out %s %if preview-mode %{-Wno-unused-command-line-argument%}
// RUN: %clangxx -DSO_PATH="%t.dir/simple_lib.so" -o %t.out %s %if preview-mode %{-Wno-unused-command-line-argument%}

// RUN: %{run} %t.out
// RUN: env UR_L0_LEAKS_DEBUG=1 %{run} %t.out
Expand Down
17 changes: 9 additions & 8 deletions sycl/test-e2e/IntermediateLib/multi_lib_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// DEFINE: %{shared_lib_ext} = %if windows %{dll%} %else %{so%}

// clang-format off
// IMPORTANT -DSO_PATH='R"(%T)"'
// We need to capture %T, the build directory, in a string
// IMPORTANT -DSO_PATH='R"(%t.dir)"'
// We need to capture %t.dir, the build directory, in a string
// and the normal STRINGIFY() macros hack won't work.
// Because on Windows, the path delimiters are \,
// which C++ preprocessor converts to escape sequences,
Expand All @@ -16,15 +16,16 @@
// clang-format on

// On Windows, the CI sometimes builds on one machine and runs on another.
// This means that %T might not be consistent between build and run.
// This means that %t.dir might not be consistent between build and run.
// So we use %{run-aux} to perform ALL actions on the run machine
// like we do for the AoT tests.

// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%T)"' -o %t.out %s

// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %T/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp
// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=2 -o %T/lib_b.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp
// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=4 -o %T/lib_c.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp
// RUN: mkdir -p %t.dir
// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%t.dir)"' -o %t.out %s

// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %t.dir/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp
// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=2 -o %t.dir/lib_b.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp
// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=4 -o %t.dir/lib_c.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp

// RUN: env UR_L0_LEAKS_DEBUG=1 %{run} %t.out

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// UNSUPPORTED-INTENDED: IGC shader dump not available on Windows.

// RUN: %{build} -o %t.out
// RUN: env IGC_DumpToCustomDir=%T.dump IGC_ShaderDumpEnable=1 NEO_CACHE_PERSISTENT=0 %{run} %t.out %T.dump/
// RUN: env IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 NEO_CACHE_PERSISTENT=0 %{run} %t.out %t.dump/

// clang-format off
/*
Expand Down
7 changes: 4 additions & 3 deletions sycl/test-e2e/SharedLib/use_when_link.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// REQUIRES: linux
//
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
// RUN: mkdir -p %t.dir
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so

// RUN: %{build} -DFOO_FIRST -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T
// RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: %{run} %t1.out

// RUN: %{build} -L%T -o %t2.out -l%basename_t -Wl,-rpath=%T
// RUN: %{build} -L%t.dir -o %t2.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: %{run} %t2.out

#include <sycl/detail/core.hpp>
Expand Down
7 changes: 4 additions & 3 deletions sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
// offload driver is enabled. Currently, new offload model supports only JIT.
// TODO: Expand the test once AOT support for new offload model is ready.
//
// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %T/lib%basename_t.so
// RUN: mkdir -p %t.dir
// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %t.dir/lib%basename_t.so

// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%T %s -o %t.out -l%basename_t -Wl,-rpath=%T
// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: %{run} %t.out

// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -L%T %s -o %t.out -l%basename_t -Wl,-rpath=%T
// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: %{run} %t.out

#include "use_when_link.cpp"
7 changes: 4 additions & 3 deletions sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// REQUIRES: linux
//
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
// RUN: mkdir -p %t.dir
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so

// RUN: %{build} -DFOO_FIRST -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T
// RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: env SYCL_UR_TRACE=2 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes=CHECK-FIRST,CHECK --implicit-check-not=piProgramBuild

// RUN: %{build} -L%T -o %t2.out -l%basename_t -Wl,-rpath=%T
// RUN: %{build} -L%t.dir -o %t2.out -l%basename_t -Wl,-rpath=%t.dir
// RUN: env SYCL_UR_TRACE=2 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes=CHECK-LAST,CHECK --implicit-check-not=piProgramBuild

#include <sycl/detail/core.hpp>
Expand Down
5 changes: 3 additions & 2 deletions sycl/test-e2e/SharedLib/use_with_dlopen.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// REQUIRES: linux
//
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
// RUN: mkdir -p %t.dir
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so

// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T
// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir

// RUN: %{compile} -o %t1.out -DRUN_FIRST
// RUN: %{run} %t1.out
Expand Down
5 changes: 3 additions & 2 deletions sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// REQUIRES: linux
//
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
// RUN: mkdir -p %t.dir
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so

// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T
// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir

// RUN: %{compile} -o %t1.out -DRUN_FIRST
// RUN: env SYCL_UR_TRACE=2 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes=CHECK-FIRST,CHECK --implicit-check-not=piProgramBuild
Expand Down
Loading