Skip to content

Commit a27aa7b

Browse files
committed
Use symlink to oneapi as a cache key
1 parent e33e8c0 commit a27aa7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/actions/setup-pytorch/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ runs:
7474
- name: Generate PyTorch cache key
7575
shell: bash
7676
run: |
77+
ONEAPI_LINK=$(readlink /opt/intel/oneapi || true)
7778
ONEAPI_KEY=$(sha256sum /opt/intel/installed.txt 2> /dev/null | cut -d\ -f1 || true)
78-
PYTORCH_CACHE_KEY=$(echo $PYTHON_VERSION $PYTORCH_COMMIT_ID ${{ hashFiles('scripts/patch-pytorch.sh') }} ${{ inputs.mode }}$ONEAPI_KEY | sha256sum - | cut -d\ -f1)
79+
PYTORCH_CACHE_KEY=$(echo $PYTHON_VERSION $PYTORCH_COMMIT_ID ${{ hashFiles('scripts/patch-pytorch.sh') }} ${{ inputs.mode }}${ONEAPI_KEY}${ONEAPI_LINK} | sha256sum - | cut -d\ -f1)
7980
echo "PYTORCH_CACHE_KEY=$PYTORCH_CACHE_KEY" | tee -a "$GITHUB_ENV"
8081
8182
- name: Load PyTorch from a cache

0 commit comments

Comments
 (0)