[Openmp-commits] [PATCH] D138600: [OpenMP] Add debug info about CC incompatibility

Mark Dewing via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 17 12:44:18 PDT 2023


markdewing updated this revision to Diff 506178.
markdewing added a comment.
Herald added subscribers: jplehr, sunshaoce.

Add the debug message to the new plugin


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138600/new/

https://reviews.llvm.org/D138600

Files:
  openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
  openmp/libomptarget/plugins/cuda/src/rtl.cpp


Index: openmp/libomptarget/plugins/cuda/src/rtl.cpp
===================================================================
--- openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -1591,8 +1591,13 @@
     // any GPU with the same major revision and same or higher minor revision.
     int32_t ImageMajor = ArchStr[0] - '0';
     int32_t ImageMinor = ArchStr[1] - '0';
-    if (Major != ImageMajor || Minor < ImageMinor)
+    if (Major != ImageMajor || Minor < ImageMinor) {
+      DP("Compute capability of image not compatible with device. Device: %d "
+         "%d "
+         "Image: %d %d\n",
+         Major, Minor, ImageMajor, ImageMinor);
       return false;
+    }
   }
 
   DP("Image has compatible compute capability: %s\n", Info->Arch);
Index: openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
===================================================================
--- openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
+++ openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
@@ -962,8 +962,13 @@
       // A cubin generated for a certain compute capability is supported to run
       // on any GPU with the same major revision and same or higher minor
       // revision.
-      if (Major != ImageMajor || Minor < ImageMinor)
+      if (Major != ImageMajor || Minor < ImageMinor) {
+        DP("Compute capability of image not compatible with device. Device: %d "
+           "%d "
+           "Image: %d %d\n",
+           Major, Minor, ImageMajor, ImageMinor);
         return false;
+      }
     }
     return true;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138600.506178.patch
Type: text/x-patch
Size: 1583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230317/a1219881/attachment.bin>


More information about the Openmp-commits mailing list