NVIDIA / NVIDIA/nvbandwidth

Support for Jetson GPUs (Jetpack 6.0+, Orin)

Open
#28 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
778
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Current software releases for Orin support all the necessary features to use this tool with a very minimal patch, shown below.

diff --git a/inline_common.h b/inline_common.h
index 05b9b69..b3455bd 100644
--- a/inline_common.h
+++ b/inline_common.h
@@ -81,8 +81,8 @@ std::ostream &operator<<(std::ostream &o, const PeerValueMatrix<T> &matrix) {
 
 // NUMA optimal affinity
 inline void setOptimalCpuAffinity(int cudaDeviceID) {
-#ifdef _WIN32
-    // NVML doesn't support setting affinity on Windows
+#if defined(_WIN32) || defined(__aarch64__)
+    // NVML doesn't support setting affinity on Windows or Jetson
     return;
 #endif
     if (disableAffinity) {
diff --git a/nvbandwidth.cpp b/nvbandwidth.cpp
index d260470..c86f51e 100644
--- a/nvbandwidth.cpp
+++ b/nvbandwidth.cpp
@@ -225,8 +225,8 @@ int main(int argc, char **argv) {
 
     CU_ASSERT(cuDriverGetVersion(&cudaVersion));
 
-    char driverVersion[NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE];
-    NVML_ASSERT(nvmlSystemGetDriverVersion(driverVersion, NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE));
+    char driverVersion[NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE] = { 0 };
+    nvmlSystemGetDriverVersion(driverVersion, NVML_SYSTEM_DRIVER_VERSION_BUFFER_SIZE);
 
     output->addCudaAndDriverInfo(cudaVersion, driverVersion);

The first change could be perhaps improved but currently works around not being able to call nvmlDeviceGetHandleByUUID() on Orin by disabling the affinity feature.

The second change works around the nvmlSystemGetDriverVersion() call returning "Not Supported" on Orin.

While not all of the measurements are immediately useful on the Orin architecture, they do provide performance comparisons of code patterns that exist when reusing existing CUDA applications and so it would be great if this was supported as a build option.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with inline_common.h and nvbandwidth.cpp, reviewing the proposed Jetson-specific changes and how the tool is built. Test on a Jetson Orin with Jetpack 6.0 or later, checking that affinity handling and driver-version reporting work without breaking other platforms. Done means Jetson support is available as a build option and the measurements run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.