Skip to content

Commit d1c5441

Browse files
authored
Fix incorrect llvm path in pipeline (#220)
Newer triton versions put an additional symlink in the llvm folder, so the `ls` command ends up listing two file names separated by a newline which breaks the pipeline run in #187. Use `find` with `top -1` to ensure we only ever get one llvm path.
1 parent 72e73a0 commit d1c5441

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/test-plugin.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ jobs:
9191
- name: Prepare CPU backend environment
9292
working-directory: triton_shared/triton/python
9393
run: |
94-
echo "TRITON_SHARED_OPT_PATH=$(pwd)/build/$(ls $(pwd)/build | grep -i cmake)/third_party/triton_shared/tools/triton-shared-opt/triton-shared-opt" >> "${GITHUB_ENV}"
95-
echo "LLVM_BINARY_DIR=${HOME}/.triton/llvm/$(ls ${HOME}/.triton/llvm/ | grep -i llvm)/bin" >> "${GITHUB_ENV}"
94+
CMAKE_BUILD_DIR=$(ls $(pwd)/build | grep -i cmake)
95+
LLVM_BINARY_DIR=$(find ${HOME}/.triton/llvm/ -name bin | head -1)
96+
echo "TRITON_SHARED_OPT_PATH=$(pwd)/build/${CMAKE_BUILD_DIR}/third_party/triton_shared/tools/triton-shared-opt/triton-shared-opt" >> "${GITHUB_ENV}"
97+
echo "LLVM_BINARY_DIR=${LLVM_BINARY_DIR}" >> "${GITHUB_ENV}"
9698
9799
- name: Run CPU backend examples
98100
working-directory: triton_shared/python/examples
@@ -164,8 +166,10 @@ jobs:
164166
- name: Prepare CPU backend environment
165167
working-directory: triton_shared/triton/python
166168
run: |
167-
echo "TRITON_SHARED_OPT_PATH=$(pwd)/build/$(ls $(pwd)/build | grep -i cmake)/third_party/triton_shared/tools/triton-shared-opt/triton-shared-opt" >> "${GITHUB_ENV}"
168-
echo "LLVM_BINARY_DIR=${HOME}/.triton/llvm/$(ls ${HOME}/.triton/llvm/ | grep -i llvm)/bin" >> "${GITHUB_ENV}"
169+
CMAKE_BUILD_DIR=$(ls $(pwd)/build | grep -i cmake)
170+
LLVM_BINARY_DIR=$(find ${HOME}/.triton/llvm/ -name bin | head -1)
171+
echo "TRITON_SHARED_OPT_PATH=$(pwd)/build/${CMAKE_BUILD_DIR}/third_party/triton_shared/tools/triton-shared-opt/triton-shared-opt" >> "${GITHUB_ENV}"
172+
echo "LLVM_BINARY_DIR=${LLVM_BINARY_DIR}" >> "${GITHUB_ENV}"
169173
170174
- name: Run CPU backend examples
171175
working-directory: triton_shared/python/examples

0 commit comments

Comments
 (0)