Skip to content

Commit

Permalink
CI: Cache Torch
Browse files Browse the repository at this point in the history
  • Loading branch information
stemann committed Apr 29, 2024
1 parent aa10911 commit 0ef32d1
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/BuildCWrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: ./.dev/install_build_deps.sh $GCC_VERSION
- run: ./.dev/install_torch.sh $TORCH_VARIANT $TORCH_VERSION
- name: Cache Torch
id: cache-torch
uses: actions/cache@v4
with:
path: /usr/local/libtorch
key: torch-${{ env.TORCH_VERSION }}-${{ runner.arch }}-${{ runner.os }}-cpu
- name: Install Torch
if: steps.cache-torch.outputs.cache-hit != 'true'
run: ./.dev/install_torch.sh $TORCH_VARIANT $TORCH_VERSION
- name: build
run: |
export CMAKE_PREFIX_PATH=/usr/local/libtorch
Expand Down Expand Up @@ -84,7 +92,15 @@ jobs:
run: |
./.dev/install_cuda_sdk.sh $CUDA_VERSION
./.dev/install_cudnn.sh $CUDA_VERSION $CUDNN_VERSION
- run: |
- name: Cache Torch
id: cache-torch
uses: actions/cache@v4
with:
path: /usr/local/libtorch
key: torch-${{ matrix.torch_version }}-${{ runner.arch }}-${{ runner.os }}-cuda${{ matrix.cuda_version }}
- name: Install Torch
if: steps.cache-torch.outputs.cache-hit != 'true'
run: |
export TORCH_VARIANT="cu$(echo $CUDA_VERSION | cut -d . -f 1-2 | tr -d '.')"
./.dev/install_torch.sh $TORCH_VARIANT $TORCH_VERSION
- name: build
Expand Down

0 comments on commit 0ef32d1

Please sign in to comment.