Skip to content

Commit 463aa4b

Browse files
committed
use ctk_prev build and add arch=all to nvcc
1 parent f417be7 commit 463aa4b

2 files changed

Lines changed: 7 additions & 27 deletions

File tree

.github/workflows/build-wheel.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -453,20 +453,17 @@ jobs:
453453
path: ${{ env.CUDA_CORE_CYTHON_TESTS_DIR }}/test_*${{ env.PY_EXT_SUFFIX }}
454454
if-no-files-found: error
455455

456-
- name: Set up mini CTK for test binaries
456+
# Note: This overwrites CUDA_PATH etc
457+
- name: Set up mini CTK
457458
uses: ./.github/actions/fetch_ctk
458459
continue-on-error: false
459460
with:
460461
host-platform: ${{ inputs.host-platform }}
461462
cuda-version: ${{ inputs.prev-cuda-version }}
462-
cuda-path: "./cuda_toolkit_test_binaries"
463+
cuda-path: "./cuda_toolkit_prev"
463464

464465
- name: Build cuda.core test binaries
465-
run: |
466-
TEST_CTK="$(realpath ./cuda_toolkit_test_binaries)"
467-
export PATH="${TEST_CTK}/bin:${PATH}"
468-
export CUDA_HOME="${TEST_CTK}"
469-
bash ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/build_test_binaries.sh
466+
run: bash ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/build_test_binaries.sh
470467

471468
- name: Upload cuda.core test binaries
472469
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -475,15 +472,6 @@ jobs:
475472
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.o
476473
if-no-files-found: error
477474

478-
# Note: This overwrites CUDA_PATH etc
479-
- name: Set up mini CTK
480-
uses: ./.github/actions/fetch_ctk
481-
continue-on-error: false
482-
with:
483-
host-platform: ${{ inputs.host-platform }}
484-
cuda-version: ${{ inputs.prev-cuda-version }}
485-
cuda-path: "./cuda_toolkit_prev"
486-
487475
- name: Download cuda.bindings build artifacts from the prior branch
488476
env:
489477
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cuda_core/tests/test_binaries/build_test_binaries.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
set -euo pipefail
77

8-
# Build .o test fixtures. Invoked at CI build stage with the oldest test-matrix
9-
# CTK (prev-cuda-version, currently 12.9.x) so nvJitLink on 12.9/13.0/13.3
10-
# test jobs can consume the embedded device code.
8+
# Build .o test fixtures. Invoked at CI build stage
119

1210
SCRIPTPATH=$(dirname "$(realpath "$0")")
1311

@@ -16,13 +14,7 @@ if [[ "${OS:-}" == "Windows_NT" ]]; then
1614
NVCC_EXTRA_FLAGS+=(-Xcompiler /Zc:preprocessor)
1715
fi
1816

19-
GENCODE=()
20-
for cc in 70 75 80 89 90 120; do
21-
if nvcc --list-gpu-code | grep -qx "sm_${cc}"; then
22-
GENCODE+=(-gencode "arch=compute_${cc},code=sm_${cc}")
23-
fi
24-
done
25-
26-
nvcc -dc "${NVCC_EXTRA_FLAGS[@]}" "${GENCODE[@]}" -o "${SCRIPTPATH}/saxpy.o" "${SCRIPTPATH}/saxpy.cu"
17+
nvcc -dc "${NVCC_EXTRA_FLAGS[@]}" -arch=all-major \
18+
-o "${SCRIPTPATH}/saxpy.o" "${SCRIPTPATH}/saxpy.cu"
2719

2820
ls -lah "${SCRIPTPATH}/saxpy.o"

0 commit comments

Comments
 (0)