[Openmp-commits] [openmp] 14de082 - [OpenMP][FIX] Ensure the modules vector is filled as others are
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Tue Mar 8 21:47:16 PST 2022
Author: Johannes Doerfert
Date: 2022-03-08T23:45:43-06:00
New Revision: 14de0820e87f552993cf9b2c5c31f67e12fb0644
URL: https://github.com/llvm/llvm-project/commit/14de0820e87f552993cf9b2c5c31f67e12fb0644
DIFF: https://github.com/llvm/llvm-project/commit/14de0820e87f552993cf9b2c5c31f67e12fb0644.diff
LOG: [OpenMP][FIX] Ensure the modules vector is filled as others are
The modules vector was for some reason special which could lead to it
not being of the same size (=num devices). Easiest solution is to treat
it like we do all the other vectors.
Added:
Modified:
openmp/libomptarget/plugins/cuda/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
index bbffc478f66d8..dab5b527f5210 100644
--- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -533,6 +533,7 @@ class DeviceRTLTy {
}
DeviceData.resize(NumberOfDevices);
+ Modules.resize(NumberOfDevices);
StreamPool.resize(NumberOfDevices);
EventPool.resize(NumberOfDevices);
@@ -817,7 +818,7 @@ class DeviceRTLTy {
DP("CUDA module successfully loaded!\n");
- Modules.push_back(Module);
+ Modules[DeviceId] = Module;
// Find the symbols in the module by name.
const __tgt_offload_entry *HostBegin = Image->EntriesBegin;
More information about the Openmp-commits
mailing list