Skip to content

Commit de72dd8

Browse files
authored
Avoid compiling non-compiling file; Bazel config does not build it (#1171)
- Without the first commit, `build-triton` was failing due to [this line](https://github.com/openxla/triton/blame/cl693214397/test/lib/Instrumentation/GPUHello.cpp#L64) not compiling (this file is not compiled by Bazel) - Without the second commit, `test-triton` was failing as Triton's autotuning utilities now rely on a GPU-enabled PyTorch installation
1 parent c07ffe4 commit de72dd8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/container/Dockerfile.triton

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ sed -i -e 's|-Werror||g' CMakeLists.txt
6565
sed -i -e 's|\(LLVMAMDGPU.*\)|# \1|g' CMakeLists.txt
6666
# Do not build tests
6767
sed -i -e 's|^\s*add_subdirectory(unittest)|# unit tests disabled|' CMakeLists.txt
68+
# Avoid building GPUHello.cpp, which does not compile with cl693214397 of OpenXLA Triton
69+
sed -i -e 's|^add_subdirectory(Instrumentation)|# Instrumentation test disabled|' test/lib/CMakeLists.txt
6870
# Avoid error due to forward declaration of Module
6971
sed -i -e '/#include "llvm\/IR\/IRBuilder.h"/a #include "llvm/IR/Module.h"' test/lib/Instrumentation/GPUHello.cpp
7072
# Google has patches that mess with include paths in source files

.github/workflows/_ci.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,9 @@ jobs:
458458
docker run -i --shm-size=1g --gpus all --volume $PWD:/output \
459459
${{ needs.build-triton.outputs.DOCKER_TAG_FINAL }} \
460460
bash <<"EOF" |& tee test-triton.log
461-
# autotuner tests from jax-triton now hit a triton code path that uses utilities from pytorch...
462-
pip install --no-deps torch --index-url https://download.pytorch.org/whl/cpu
461+
# autotuner tests from jax-triton now hit a triton code path that uses utilities from pytorch; this relies on
462+
# actually having a CUDA backend for pytoch
463+
pip install --no-deps torch
463464
python /opt/jax-triton/tests/triton_call_test.py --xml_output_file /output/triton_test.xml
464465
EOF
465466
STATISTICS_SCRIPT: |

0 commit comments

Comments
 (0)