Skip to content

Commit 4d2c031

Browse files
[infra] Limit PR CUDA builds to runner architectures (#64)
Build x86 targets for the detected runner GPU and pin Jetson jobs to their platform architectures to avoid compiling unused CUDA variants.
1 parent bcdfa58 commit 4d2c031

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/pr-verify.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ jobs:
6767
if: github.event.pull_request.head.repo.full_name == github.repository
6868
runs-on: [gpu]
6969
timeout-minutes: 120
70+
env:
71+
EXTRA_CMAKE_ARGS: "-DCMAKE_CUDA_ARCHITECTURES=native"
7072
steps:
7173
- name: Verify GPU
7274
run: nvidia-smi
@@ -229,6 +231,7 @@ jobs:
229231
env:
230232
BASE_IMAGE: "nvcr.io/nvidia/12.6.11-devel:12.6.11-devel-aarch64-ubuntu22.04"
231233
UBUNTU_VERSION: "22.04"
234+
EXTRA_CMAKE_ARGS: "-DCMAKE_CUDA_ARCHITECTURES=87"
232235
steps:
233236
- name: System info
234237
run: |
@@ -305,6 +308,7 @@ jobs:
305308
env:
306309
CUDA_VERSION: "13.0.1"
307310
UBUNTU_VERSION: "24.04"
311+
EXTRA_CMAKE_ARGS: "-DCMAKE_CUDA_ARCHITECTURES=110"
308312
steps:
309313
- name: System info
310314
run: |
@@ -409,9 +413,8 @@ jobs:
409413

410414
- name: Build with USE_RERUN
411415
env:
412-
# Build for the default (all) CUDA archs so the generated kernels match the
413-
# runner GPU, which the C++ tests below require at runtime.
414-
EXTRA_CMAKE_ARGS: "-DUSE_RERUN=ON"
416+
# PR binaries are built and tested on the same GPU runner.
417+
EXTRA_CMAKE_ARGS: "-DUSE_RERUN=ON -DCMAKE_CUDA_ARCHITECTURES=native"
415418
run: ./scripts/build_cuvslam_in_docker.sh Release ./output-rerun
416419

417420
- name: Run C++ tests

0 commit comments

Comments
 (0)