Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/actions/fetch_ctk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
description: "A list of the CTK components to install as a comma-separated list. e.g. 'cuda_nvcc,cuda_nvrtc,cuda_cudart'"
required: false
type: string
default: "cuda_nvcc,cuda_cudart,cuda_nvrtc,cuda_profiler_api,cuda_cccl,cuda_sanitizer_api,libnvjitlink"
default: "cuda_nvcc,cuda_cudart,cuda_nvrtc,cuda_profiler_api,cuda_cccl,cuda_sanitizer_api,libnvjitlink,libcublas"
Comment thread
leofang marked this conversation as resolved.
Outdated

runs:
using: composite
Expand Down Expand Up @@ -55,7 +55,6 @@ runs:

# The binary archives (redist) are guaranteed to be updated as part of the release posting.
CTK_BASE_URL="https://developer.download.nvidia.com/compute/cuda/redist/"
CTK_JSON_URL="$CTK_BASE_URL/redistrib_${{ inputs.cuda-version }}.json"
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
if [[ "${{ inputs.host-platform }}" == "linux-64" ]]; then
CTK_SUBDIR="linux-x86_64"
Expand All @@ -74,13 +73,15 @@ runs:
rm -rf $_TEMP_DIR_
}
fi

function populate_cuda_path() {
# take the component name as a argument
function download() {
curl -kLSs $1 -o $2
}
CTK_COMPONENT=$1
CTK_COMPONENT_REL_PATH="$(curl -s $CTK_JSON_URL |
local CTK_COMPONENT=$1
local CTK_VERSION=$2
CTK_COMPONENT_REL_PATH="$(curl -s ${CTK_BASE_URL}/redistrib_${CTK_VERSION}.json |
python -c "import sys, json; print(json.load(sys.stdin)['${CTK_COMPONENT}']['${CTK_SUBDIR}']['relative_path'])")"
CTK_COMPONENT_URL="${CTK_BASE_URL}/${CTK_COMPONENT_REL_PATH}"
CTK_COMPONENT_COMPONENT_FILENAME="$(basename $CTK_COMPONENT_REL_PATH)"
Expand All @@ -97,7 +98,13 @@ runs:
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
# Get headers and shared libraries in place
for item in $(echo $CTK_CACHE_COMPONENTS | tr ',' ' '); do
populate_cuda_path "$item"
ctk_version="${{ inputs.cuda-version }}"
if [[ "$item" == "cuda_sanitizer_api" ]]; then
# Always use latest CTK for cuda_sanitizer_api
# FIXME: Automatically track latest CTK version
ctk_version="12.8.1"
Comment thread
leofang marked this conversation as resolved.
Outdated
fi
populate_cuda_path "$item" "$ctk_version"
done
ls -l $CUDA_PATH

Expand Down