56
56
57
57
# The binary archives (redist) are guaranteed to be updated as part of the release posting.
58
58
CTK_BASE_URL="https://developer.download.nvidia.com/compute/cuda/redist/"
59
+ CTK_JSON_URL="$CTK_BASE_URL/redistrib_${{ inputs.cuda-version }}.json"
59
60
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
60
61
if [[ "${{ inputs.host-platform }}" == "linux-64" ]]; then
61
62
CTK_SUBDIR="linux-x86_64"
@@ -74,15 +75,13 @@ runs:
74
75
rm -rf $_TEMP_DIR_
75
76
}
76
77
fi
77
-
78
78
function populate_cuda_path() {
79
79
# take the component name as a argument
80
80
function download() {
81
81
curl -kLSs $1 -o $2
82
82
}
83
- local CTK_COMPONENT=$1
84
- local CTK_VERSION=$2
85
- CTK_COMPONENT_REL_PATH="$(curl -s ${CTK_BASE_URL}/redistrib_${CTK_VERSION}.json |
83
+ CTK_COMPONENT=$1
84
+ CTK_COMPONENT_REL_PATH="$(curl -s $CTK_JSON_URL |
86
85
python -c "import sys, json; print(json.load(sys.stdin)['${CTK_COMPONENT}']['${CTK_SUBDIR}']['relative_path'])")"
87
86
CTK_COMPONENT_URL="${CTK_BASE_URL}/${CTK_COMPONENT_REL_PATH}"
88
87
CTK_COMPONENT_COMPONENT_FILENAME="$(basename $CTK_COMPONENT_REL_PATH)"
99
98
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
100
99
# Get headers and shared libraries in place
101
100
for item in $(echo $CTK_CACHE_COMPONENTS | tr ',' ' '); do
102
- ctk_version="${{ inputs.cuda-version }}"
103
- if [[ "$item" == "cuda_sanitizer_api" ]]; then
104
- # Always use latest CTK for cuda_sanitizer_api
105
- # FIXME: Automatically track latest CTK version
106
- CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})"
107
- if [[ "$CUDA_MAJOR" == "12" ]]; then
108
- # TODO: Automatically track latest CTK minor version
109
- ctk_version="12.8.0"
110
- fi
111
- fi
112
- populate_cuda_path "$item" "$ctk_version"
101
+ populate_cuda_path "$item"
113
102
done
114
103
ls -l $CACHE_TMP_DIR
115
104
0 commit comments