Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@
# test_exec_root: The root path where tests should be run.
config.test_exec_root = os.path.join(config.triton_obj_root, 'test')
config.triton_tools_dir = os.path.join(config.triton_obj_root, 'bin')
config.triton_intel_plugin_tools_dir = os.path.join(config.triton_obj_root, 'third_party', 'intel', 'bin')
config.filecheck_dir = os.path.join(config.triton_obj_root, 'bin', 'FileCheck')

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

tool_dirs = [config.triton_tools_dir, config.triton_intel_plugin_tools_dir, config.llvm_tools_dir, config.filecheck_dir]
tool_dirs = [config.triton_tools_dir, config.llvm_tools_dir, config.filecheck_dir]

# Tweak the PATH to include the tools dir.
for d in tool_dirs:
Expand Down
7 changes: 7 additions & 0 deletions third_party/intel/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ target_link_libraries(triton-translate
TritonGENToLLVMIRTranslation
)
mlir_check_link_libraries(triton-translate)

# Move `triton-translate` to the folder where `lit` expects to find it
add_custom_command(TARGET triton-translate POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE:triton-translate>"
"${triton_BINARY_DIR}/bin"
)