Skip to content

Detect Jetson GPUs in Linux DRM device discovery - #32544

Open
Tianlei Wu (tianleiwu) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-cuda-plugin-getepdevices
Open

Detect Jetson GPUs in Linux DRM device discovery#32544
Tianlei Wu (tianleiwu) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-cuda-plugin-getepdevices

Conversation

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

  • Recognize non-PCI DRM devices using the NVIDIA nvgpu/nvidia driver.
  • Surface them as integrated NVIDIA GPUs without PCI identity metadata.
  • Continue excluding AMD XCP and other non-NVIDIA platform devices.
  • Add focused Jetson-style sysfs discovery coverage.

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.

@azure-pipelines

Copy link
Copy Markdown
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 AI changed the title [WIP] Fix CUDA plugin GetEpDevices to detect GPU on Jetson Detect Jetson GPUs in Linux DRM device discovery Sep 10, 2026
@tianleiwu

Copy link
Copy Markdown
Contributor

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>

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

Resolved the conflict by merging current main and preserving its shared NVIDIA vendor-ID constant in the Jetson discovery path. Merge commit: efe18509. The Release build and all 11 focused DRM/PCI discovery tests pass.

@tianleiwu
Tianlei Wu (tianleiwu) marked this pull request as ready for review September 13, 2026 18:07
Copilot AI balanced review requested due to automatic review settings September 13, 2026 18:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 nvgpu and nvidia, but the tests only exercise DRIVER=nvgpu; a regression or typo in the second accepted driver would therefore pass. Add a focused case with DRIVER=nvidia and 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=nvgpu and DRIVER=nvidia, but this fixture only exercises the former (the other two values are rejection cases). Add a positive nvidia platform-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CUDA plugin EP GetEpDevices() finds no GPU on Jetson

3 participants