Detect Jetson GPUs in Linux DRM device discovery - #32544
Detect Jetson GPUs in Linux DRM device discovery#32544Tianlei Wu (tianleiwu) with Copilot wants to merge 3 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
|
Copilot resolve the merge conflicts in this pull request |
…in-getepdevices # Conflicts: # onnxruntime/core/platform/linux/device_discovery.cc Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Resolved the conflict by merging current |
There was a problem hiding this comment.
🔵 Needs a closer look
The accepted nvidia driver path still lacks a dedicated positive test.
Pull request overview
Adds Linux DRM discovery for Jetson platform-bus NVIDIA GPUs, surfacing non-PCI nvgpu/nvidia devices as integrated GPUs.
Changes:
- Detects supported NVIDIA platform DRM devices without PCI metadata.
- Preserves filtering of other non-NVIDIA platform devices.
- Adds Jetson-style sysfs tests and CMake integration.
File summaries
| File | Summary |
|---|---|
onnxruntime/test/platform/linux/drm_device_discovery_test.cc |
Adds Jetson-style discovery and filtering tests. |
onnxruntime/core/platform/linux/drm_device_discovery.h |
Declares DRM discovery interfaces. |
onnxruntime/core/platform/linux/device_discovery.cc |
Implements NVIDIA platform GPU detection and metadata handling. |
cmake/onnxruntime_common.cmake |
Registers the DRM discovery header. |
Review details
Suppressed comments (2)
onnxruntime/core/platform/linux/device_discovery.cc:159
- The new contract accepts both
nvgpuandnvidia, but the tests only exerciseDRIVER=nvgpu; a regression or typo in the second accepted driver would therefore pass. Add a focused case withDRIVER=nvidiaand assert that it is recognized as a platform GPU.
(HasUeventEntry(uevent, "DRIVER=nvgpu") ||
HasUeventEntry(uevent, "DRIVER=nvidia"));
onnxruntime/test/platform/linux/drm_device_discovery_test.cc:45
- The new detector explicitly accepts both
DRIVER=nvgpuandDRIVER=nvidia, but this fixture only exercises the former (the other two values are rejection cases). Add a positivenvidiaplatform-card case and assert that both accepted cards are returned, so the second supported Jetson-style driver cannot regress untested.
CreatePlatformDrmCard(temp_dir_ / "card0", "nvgpu");
CreatePlatformDrmCard(temp_dir_ / "card1", "amdgpu");
CreatePlatformDrmCard(temp_dir_ / "card2", "nvgpu-extra");
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
nvgpu/nvidiadriver.Motivation and Context
Jetson GPUs use the platform/host1x bus and lack PCI vendor attributes, causing Linux device discovery to skip them. Consequently, the CUDA plugin EP is absent from
GetEpDevices()despite loading successfully.