Skip to content

Commit

Permalink
[CI] Fix ccache + triton version (fairinternal/xformers#949)
Browse files Browse the repository at this point in the history
Co-authored-by: xFormers Bot <[email protected]>

__original_commit__ = fairinternal/xformers@4c71e5f
  • Loading branch information
danthe3rd authored and xFormers Bot committed Dec 4, 2023
1 parent be4f584 commit 246b45c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion .github/actions/setup-env-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ inputs:
runs:
using: composite
steps:
- name: Cleanup
shell: bash
run: rm -f ~/.profile ~/.bashrc
- id: prepare_conda_env_paths
shell: python
run: |
Expand All @@ -31,7 +34,7 @@ runs:
import datetime
from pathlib import Path
CONDA_INSTALL_CMD = "conda create python=${{ inputs.python }} zlib pip ninja pytorch=${{ inputs.pytorch_version }} torchvision ccache pytorch-cuda=${{ inputs.cuda }} -c ${{ inputs.pytorch_channel }} -c nvidia -q -y"
CONDA_INSTALL_CMD = "conda create python=${{ inputs.python }} zlib pip ninja pytorch=${{ inputs.pytorch_version }} torchvision ccache=4.8 pytorch-cuda=${{ inputs.cuda }} -c ${{ inputs.pytorch_channel }} -c nvidia -c conda-forge -q -y"
conda_env_key = CONDA_INSTALL_CMD
for file in sorted(glob.glob("requirement*.txt")):
Expand Down Expand Up @@ -92,6 +95,9 @@ runs:
# For some reason bash only reads from `.profile`
# but conda writes init script to `.bashrc`
cat ~/.bashrc >> ~/.profile
rm ~/.bashrc
echo "==== .profile ====="
cat ~/.profile
- run: which python
shell: bash -l {0}
- name: Setup ccache nvcc
Expand All @@ -103,6 +109,7 @@ runs:
cat $CONDA_PREFIX/bin/nvcc-ccache
chmod +x $CONDA_PREFIX/bin/nvcc-ccache
which nvcc
ccache --version
- name: Setup ccache g++
shell: bash -l {0}
Expand All @@ -113,6 +120,13 @@ runs:
cat $CONDA_PREFIX/bin/g++-ccache
chmod +x $CONDA_PREFIX/bin/g++-ccache
which g++-ccache
- name: Patch for https://github.com/pytorch/pytorch/issues/114962
shell: bash -l {0}
run: |
CPP_EXTENSIONS_PY=$(python -c "import torch.utils.cpp_extension; print(torch.utils.cpp_extension.__file__)")
echo "Patching $CPP_EXTENSIONS_PY"
sed -i "/generate-dependencies-with-compile/d" $CPP_EXTENSIONS_PY
- name: Check NVIDIA libs
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ scipy
# Dependency for fused layers, optional
cmake
--extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/
triton-nightly
triton-nightly<=2.1.0.post20231125000000

0 comments on commit 246b45c

Please sign in to comment.