[Openmp-commits] [PATCH] D74503: [libomptarget][nfc] Change enum values to match those in cuda/rtl

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 12 13:28:55 PST 2020

JonChesterfield created this revision.
JonChesterfield added reviewers: jdoerfert, grokos, ABataev, ronlieb.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

[libomptarget][nfc] Change enum values to match those in cuda/rtl

support.h and cuda/rtl.cpp (and downsteam hsa/rtl.cpp) have enums for execution
mode. These are actually independent - the numbers that used within support, or
within the plugin, are never passed across the boundary.

Nevertheless, trying to work out why the values are different between the two
has generated a reasonable amount of confusion. This patch changes support to
match the values in plugin, on the basis that the plugin also has some comments
which I'd have to update if I changed that one instead. Credit to Ron for
working through this in our own fork. See rocm-developer-tools/aomp/issues/7
for that earlier diagnostic write up.

Also happy with generic = 0, spmd = 1 - provided it's the same in both places.

  rG LLVM Github Monorepo



Index: openmp/libomptarget/deviceRTLs/common/support.h
--- openmp/libomptarget/deviceRTLs/common/support.h
+++ openmp/libomptarget/deviceRTLs/common/support.h
@@ -20,8 +20,8 @@
 // Execution Parameters
 enum ExecutionMode {
-  Generic = 0x00u,
-  Spmd = 0x01u,
+  Spmd = 0x00u,
+  Generic = 0x01u,
   ModeMask = 0x01u,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74503.244260.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200212/92909c9a/attachment.bin>

More information about the Openmp-commits mailing list