Commit 3b69212
CLI: Fix GPU_TYPE detection for Jetson AGX Orin on JetPack 7.x (#1601)
## Issue
JP7.2 transitions Jetson AGX Orin to SBSA compatibility (dGPU compute
stack) but nvidia-smi still reports the GPU name as "Orin (nvgpu)",
causing get_host_gpu() to incorrectly return "igpu".
## Updates
Fix by adding a driver version check when the Orin nvgpu name is
detected: driver < 580 (CUDA 12) maps to the JP6.x / IGX OS 1.x
integrated GPU stack (igpu), while driver >= 580 (CUDA 13) maps to the
JP7.x / IGX OS 2.x SBSA-compatible stack (dgpu).
Adds unit tests covering the JP6/JP7 disambiguation and updates the
get_cuda_tag() docstring to reflect the JP7.x platform mapping.
### Caveats
- Strictly assumes the user is using default drivers with their Jetpack
installation: R540 for Jetpack 6.x, R580 or R595 for Jetpack 7.x
- Edge case: may fail if user attempts to install a custom driver, such
as R580 on Jetpack 6.x. This is generally not supported and is OK to
ignore for HoloHub CLI.
## Results
Verified on Jetson AGX Orin with Jetpack 7.2 (R595):
```bash
$ ./holohub build-container --dryrun
No project provided, proceeding with default container
2026-06-06 14:26:25 [dryrun] $ docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg BASE_IMAGE=nvcr.io/nvidia/clara-holoscan/holoscan:v4.3.0-cuda13 \
--build-arg GPU_TYPE=dgpu \ # <---- fixed: previously "igpu" which is not reflective of Jetpack 7.2 stack
--build-arg BASE_SDK_VERSION=4.3.0 \
--build-arg COMPUTE_CAPACITY=8.7 \
--build-arg CUDA_MAJOR=13 \
...
```
On IGX Orin iGPU w/ IGX OS 1.1 (R540):
```bash
$ ./holohub build-container --dryrun
No project provided, proceeding with default container
2026-06-06 14:31:06 [dryrun] $ docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg BASE_IMAGE=nvcr.io/nvidia/clara-holoscan/holoscan:v4.3.0-cuda12-igpu \
--build-arg GPU_TYPE=igpu \ # <---- preserves "igpu" as expected
--build-arg BASE_SDK_VERSION=4.3.0 \
--build-arg COMPUTE_CAPACITY=8.7 \
--build-arg CUDA_MAJOR=12 \
...
```
Assisted-by: Claude:claude-sonnet-4-6
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved GPU type detection on Orin devices: integrated vs discrete
GPU classification now depends on detected CUDA version.
* **Documentation**
* Clarified platform compatibility and CUDA-tag mapping for relevant
Jetson and IGX OS combinations.
* **Tests**
* Added unit tests covering Orin and non-Orin GPU scenarios and the
no-GPU default.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
Signed-off-by: Tom Birdsong <40648863+tbirdso@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>1 parent f7b9b80 commit 3b69212
2 files changed
Lines changed: 43 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
467 | 502 | | |
468 | 503 | | |
469 | 504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
472 | 475 | | |
473 | | - | |
| 476 | + | |
474 | 477 | | |
475 | 478 | | |
476 | 479 | | |
| |||
520 | 523 | | |
521 | 524 | | |
522 | 525 | | |
523 | | - | |
| 526 | + | |
524 | 527 | | |
525 | | - | |
| 528 | + | |
526 | 529 | | |
527 | 530 | | |
528 | 531 | | |
| |||
0 commit comments