Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit ce5ca4b

Browse files
sergeimlychkov
andauthored
Apply suggestions from code review
Co-authored-by: Mikhail Lychkov <[email protected]>
1 parent 613874d commit ce5ca4b

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

SYCL/AOT/multiple-devices.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// RUN: %GPU_RUN_PLACEHOLDER %t_all.out
1919
// RUN: %ACC_RUN_PLACEHOLDER %t_all.out
2020

21-
// FIXME: Change the behavior when proper automaton for assert support is
21+
// FIXME: Change the behavior when proper automation for assert support is
2222
// introduced
2323
// Produce object file, spirv, device images to combine these differently
2424
// at link-time, thus testing various AOT-compiled images configurations

SYCL/lit.cfg.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,16 @@
281281
if find_executable('sycl-ls'):
282282
config.available_features.add('sycl-ls')
283283

284-
llvm_spirv_path = find_executable("llvm-spirv")
285-
if llvm_spirv_path:
286-
lit_config.note("Found llvm-spirv")
287-
config.available_features.add('llvm-spirv')
288-
config.substitutions.append( ('%llvm_spirv', os.path.realpath(llvm_spirv_path)) )
289-
else:
290-
lit_config.warning("Can't find llvm-spirv")
291-
292-
llvm_link_path = find_executable("llvm-link")
293-
if llvm_link_path:
294-
lit_config.note("Found llvm-link")
295-
config.available_features.add('llvm-link')
296-
config.substitutions.append( ('%llvm_link', os.path.realpath(llvm_link_path)) )
297-
else:
298-
lit_config.warning("Can't find llvm-link")
284+
llvm_tools = ["llvm-spirv", "llvm-link"]
285+
for llvm_tool in llvm_tools:
286+
llvm_tool_path = find_executable(llvm_tool)
287+
if llvm_tool_path:
288+
lit_config.note("Found " + llvm_tool)
289+
config.available_features.add(llvm_tool)
290+
config.substitutions.append( ('%' + llvm_tool.replace('-', '_'),
291+
os.path.realpath(llvm_tool_path)) )
292+
else:
293+
lit_config.warning("Can't find " + llvm_tool)
299294

300295
# Device AOT compilation tools aren't part of the SYCL project,
301296
# so they need to be pre-installed on the machine

0 commit comments

Comments
 (0)