|
78 | 78 | fi
|
79 | 79 | fi
|
80 | 80 |
|
| 81 | + # We don't test compute-sanitizer on CTK<12 because backporting fixes is too much effort |
| 82 | + # We only test compute-sanitizer on python 3.12 arbitrarily; we don't need to use sanitizer on the entire matrix |
| 83 | + # Only local ctk installs have compute-sanitizer; there is not wheel for it |
| 84 | + if [[ "${{ inputs.python-version }}" == "3.12" && "${{ inputs.cuda-version }}" != "11.8.0" && "${{ inputs.local-ctk }}" == 1 ]]; then |
| 85 | + SETUP_SANITIZER=1 |
| 86 | + echo "LATEST_CUDA_VERSION=$(bash .github/actions/fetch_ctk/guess_latest.sh)" >> $GITHUB_ENV |
| 87 | + else |
| 88 | + SETUP_SANITIZER=0 |
| 89 | + fi |
| 90 | + echo "SETUP_SANITIZER=${SETUP_SANITIZER}" >> $GITHUB_ENV |
| 91 | +
|
81 | 92 | # make outputs from the previous job as env vars
|
82 | 93 | CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-${{ inputs.host-platform }}"
|
83 | 94 | echo "PYTHON_VERSION_FORMATTED=${PYTHON_VERSION_FORMATTED}" >> $GITHUB_ENV
|
@@ -185,20 +196,17 @@ jobs:
|
185 | 196 | cuda-version: ${{ inputs.cuda-version }}
|
186 | 197 |
|
187 | 198 | - name: Set up latest cuda_sanitizer_api
|
188 |
| - if: ${{ inputs.local-ctk == '1' }} |
| 199 | + if: ${{ env.SETUP_SANITIZER == '1' }} |
189 | 200 | uses: ./.github/actions/fetch_ctk
|
190 | 201 | continue-on-error: false
|
191 | 202 | with:
|
192 | 203 | host-platform: ${{ inputs.host-platform }}
|
193 |
| - cuda-version: "12.8.1" |
| 204 | + cuda-version: ${{ env.LATEST_CUDA_VERSION }} |
194 | 205 | cuda-components: "cuda_sanitizer_api"
|
195 | 206 |
|
196 | 207 | - name: Set up compute-sanitizer
|
197 | 208 | run: |
|
198 |
| - # We don't test compute-sanitizer on CTK<12 because backporting fixes is too much effort |
199 |
| - # We only test compute-sanitizer on python 3.12 arbitrarily; we don't need to use sanitizer on the entire matrix |
200 |
| - # Only local ctk installs have compute-sanitizer; there is not wheel for it |
201 |
| - if [[ "${{ inputs.python-version }}" == "3.12" && "${{ inputs.cuda-version }}" != "11.8.0" && "${{ inputs.local-ctk }}" == 1 ]]; then |
| 209 | + if [[ "${SETUP_SANITIZER}" == 1 ]]; then |
202 | 210 | COMPUTE_SANITIZER="${CUDA_HOME}/bin/compute-sanitizer"
|
203 | 211 | COMPUTE_SANITIZER_VERSION=$(${COMPUTE_SANITIZER} --version | grep -Eo "[0-9]{4}\.[0-9]\.[0-9]" | sed -e 's/\.//g')
|
204 | 212 | SANITIZER_CMD="${COMPUTE_SANITIZER} --target-processes=all --launch-timeout=0 --tool=memcheck --error-exitcode=1"
|
|
0 commit comments