Skip to content

Commit 22ed675

Browse files
authored
[SYCL] Cleanup bindless images lit setup (#18220)
* Add link-directx substitution * Move bindless specific substitutions to bindless directory Follow up from: #18202
1 parent 6635e44 commit 22ed675

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
lines changed

sycl/test-e2e/bindless_images/dx12_interop/read_write_unsampled.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: aspect-ext_oneapi_bindless_images
22
// REQUIRES: windows
33

4-
// DEFINE: %{link-flags}=%if cl_options %{ /clang:-ld3d12 /clang:-ldxgi /clang:-ldxguid %} %else %{ -ld3d12 -ldxgi -ldxguid %}
5-
// RUN: %{build} %{link-flags} -o %t.out
4+
// RUN: %{build} %link-directx -o %t.out
65
// RUN: %{run-unfiltered-devices} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out
76

87
#pragma clang diagnostic ignored "-Waddress-of-temporary"

sycl/test-e2e/bindless_images/dx12_interop/read_write_unsampled_semaphore.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
// XFAIL: run-mode
55
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/15851
66

7-
// DEFINE: %{link-flags}=%if cl_options %{ /clang:-ld3d12 /clang:-ldxgi /clang:-ldxguid %} %else %{ -ld3d12 -ldxgi -ldxguid %}
8-
// RUN: %{build} %{link-flags} -o %t.out
7+
// RUN: %{build} %link-directx -o %t.out
98
// RUN: %{run-unfiltered-devices} %t.out
109

1110
#define TEST_SEMAPHORE_IMPORT
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
import platform
2+
13
# Support of this feature is waiting for the upstream PR
24
# https://github.com/llvm/llvm-project/pull/127737 to be merged with intel/llvm.
35
config.unsupported_features += ['spirv-backend']
6+
7+
cl_options = 'cl_options' in config.available_features
8+
9+
link_vulkan = "-I %s " % (config.vulkan_include_dir)
10+
if platform.system() == "Windows":
11+
if cl_options:
12+
link_vulkan += "/clang:-l%s" % (config.vulkan_lib)
13+
else:
14+
link_vulkan += "-l %s" % (config.vulkan_lib)
15+
else:
16+
vulkan_lib_path = os.path.dirname(config.vulkan_lib)
17+
link_vulkan += "-L %s -lvulkan" % (vulkan_lib_path)
18+
config.substitutions.append(("%link-vulkan", link_vulkan))
19+
20+
if platform.system() == "Windows":
21+
dx12libs = ['-ld3d12', '-ldxgi', '-ldxguid']
22+
if cl_options:
23+
dx12libs = ['/clang:' + l for l in dx12libs]
24+
config.substitutions.append(("%link-directx", ' '.join(dx12libs)))
25+
26+
if config.vulkan_found == "TRUE":
27+
config.available_features.add("vulkan")

sycl/test-e2e/lit.cfg.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -605,23 +605,6 @@ def open_check_file(file_name):
605605
else:
606606
config.substitutions.append(("%verbose_print", ""))
607607

608-
config.substitutions.append(("%vulkan_include_dir", config.vulkan_include_dir))
609-
config.substitutions.append(("%vulkan_lib", config.vulkan_lib))
610-
611-
link_vulkan = "-I %s " % (config.vulkan_include_dir)
612-
if platform.system() == "Windows":
613-
if cl_options:
614-
link_vulkan += "/clang:-l%s" % (config.vulkan_lib)
615-
else:
616-
link_vulkan += "-l %s" % (config.vulkan_lib)
617-
else:
618-
vulkan_lib_path = os.path.dirname(config.vulkan_lib)
619-
link_vulkan += "-L %s -lvulkan" % (vulkan_lib_path)
620-
config.substitutions.append(("%link-vulkan", link_vulkan))
621-
622-
if config.vulkan_found == "TRUE":
623-
config.available_features.add("vulkan")
624-
625608
if not config.gpu_aot_target_opts:
626609
config.gpu_aot_target_opts = '"-device *"'
627610

0 commit comments

Comments
 (0)