Skip to content

Commit 70837af

Browse files
committed
skip fetching cufile on windows
1 parent 338f3df commit 70837af

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/actions/fetch_ctk/action.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,23 @@ runs:
2525
- name: Set up CTK cache variable
2626
shell: bash --noprofile --norc -xeuo pipefail {0}
2727
run: |
28-
HASH=$(echo -n "${{ inputs.cuda-components }}" | sha256sum | awk '{print $1}')
28+
# Pre-process the component list to ensure hash uniqueness
29+
CTK_CACHE_COMPONENTS=${{ inputs.cuda-components }}
30+
# Conditionally strip out libnvjitlink for CUDA versions < 12
31+
if [[ "$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})" -lt 12 ]]; then
32+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
33+
fi
34+
# Conditionally strip out libcufile since it does not support Windows
35+
if [[ "${{ inputs.host-platform }}" == win-* ]]; then
36+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libcufile/}"
37+
fi
38+
# Cleanup stray commas after removing components
39+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
40+
41+
HASH=$(echo -n "${CTK_CACHE_COMPONENTS}" | sha256sum | awk '{print $1}')
2942
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH" >> $GITHUB_ENV
3043
echo "CTK_CACHE_FILENAME=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH.tar.gz" >> $GITHUB_ENV
31-
echo "CTK_CACHE_COMPONENTS=${{ inputs.cuda-components }}" >> $GITHUB_ENV
44+
echo "CTK_CACHE_COMPONENTS=${CTK_CACHE_COMPONENTS}" >> $GITHUB_ENV
3245
3346
- name: Install dependencies
3447
uses: ./.github/actions/install_unix_deps
@@ -94,12 +107,6 @@ runs:
94107
rm $CTK_COMPONENT_COMPONENT_FILENAME
95108
}
96109
97-
# Conditionally strip out libnvjitlink for CUDA versions < 12
98-
if [[ "$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})" -lt 12 ]]; then
99-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
100-
fi
101-
# Cleanup stray commas after removing components
102-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
103110
# Get headers and shared libraries in place
104111
for item in $(echo $CTK_CACHE_COMPONENTS | tr ',' ' '); do
105112
populate_cuda_path "$item"

0 commit comments

Comments
 (0)