[Openmp-commits] [openmp] c2ce9ea - [libomptarget][nfc] Change enum values to match those in cuda/rtl

via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 12 15:27:18 PST 2020


Author: JonChesterfield
Date: 2020-02-12T23:27:08Z
New Revision: c2ce9ea4e372ee31271da44c727dc598e12261a5

URL: https://github.com/llvm/llvm-project/commit/c2ce9ea4e372ee31271da44c727dc598e12261a5
DIFF: https://github.com/llvm/llvm-project/commit/c2ce9ea4e372ee31271da44c727dc598e12261a5.diff

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

Summary:
[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.

Reviewers: jdoerfert, grokos, ABataev, ronlieb

Reviewed By: grokos

Subscribers: openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D74503

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/common/support.h

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/common/support.h b/openmp/libomptarget/deviceRTLs/common/support.h
index 400d2649afd4..d3472842f980 100644
--- a/openmp/libomptarget/deviceRTLs/common/support.h
+++ b/openmp/libomptarget/deviceRTLs/common/support.h
@@ -20,8 +20,8 @@
 // Execution Parameters
 ////////////////////////////////////////////////////////////////////////////////
 enum ExecutionMode {
-  Generic = 0x00u,
-  Spmd = 0x01u,
+  Spmd = 0x00u,
+  Generic = 0x01u,
   ModeMask = 0x01u,
 };
 


        


More information about the Openmp-commits mailing list