Skip to content

Support for Jetson GPUs (Jetpack 6.0+, Orin) #28

@dicta

Description

@dicta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions