Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dicta opened this issue Dec 16, 2024 · 0 comments
Open

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

dicta opened this issue Dec 16, 2024 · 0 comments

Comments

@dicta
Copy link

dicta commented Dec 16, 2024

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.

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

No branches or pull requests

1 participant