Skip to content

Commit a6f0f80

Browse files
authored
Copy triton-translate to triton_BINARY_DIR/bin folder instead of modifying lit config file (#2965)
Part of #2030 Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
1 parent 45d3226 commit a6f0f80

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/lit.cfg.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@
4545
# test_exec_root: The root path where tests should be run.
4646
config.test_exec_root = os.path.join(config.triton_obj_root, 'test')
4747
config.triton_tools_dir = os.path.join(config.triton_obj_root, 'bin')
48-
config.triton_intel_plugin_tools_dir = os.path.join(config.triton_obj_root, 'third_party', 'intel', 'bin')
4948
config.filecheck_dir = os.path.join(config.triton_obj_root, 'bin', 'FileCheck')
5049

5150
# FileCheck -enable-var-scope is enabled by default in MLIR test
5251
# This option avoids to accidentally reuse variable across -LABEL match,
5352
# it can be explicitly opted-in by prefixing the variable name with $
5453
config.environment["FILECHECK_OPTS"] = "--enable-var-scope"
5554

56-
tool_dirs = [config.triton_tools_dir, config.triton_intel_plugin_tools_dir, config.llvm_tools_dir, config.filecheck_dir]
55+
tool_dirs = [config.triton_tools_dir, config.llvm_tools_dir, config.filecheck_dir]
5756

5857
# Tweak the PATH to include the tools dir.
5958
for d in tool_dirs:

third_party/intel/bin/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ target_link_libraries(triton-translate
2222
TritonGENToLLVMIRTranslation
2323
)
2424
mlir_check_link_libraries(triton-translate)
25+
26+
# Move `triton-translate` to the folder where `lit` expects to find it
27+
add_custom_command(TARGET triton-translate POST_BUILD
28+
COMMAND ${CMAKE_COMMAND} -E copy
29+
"$<TARGET_FILE:triton-translate>"
30+
"${triton_BINARY_DIR}/bin"
31+
)

0 commit comments

Comments
 (0)