Skip to content

Commit 4acc725

Browse files
doru1004ronlieb
authored andcommitted
[libomptarget] Clean-up canUseHostGlobals function.
Change-Id: Ie061bc4627e9828edccf39878a892ba47bb3d0d8
1 parent 5cd4383 commit 4acc725

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4179,12 +4179,12 @@ struct AMDGPUPluginTy final : public GenericPluginTy {
41794179
return;
41804180
}
41814181

4182-
bool canUseHostGlobals() {
4182+
bool canUseHostGlobals() override final {
41834183
// Check if the HSA_XNACK and OMPX_APU_MAPS are enabled. If unified memory is
41844184
// not enabled but both HSA_XNACK and OMPX_APU_MAPS are enabled then we can
41854185
// also use globals directly from the host.
41864186
bool EnableHostGlobals = false;
4187-
bool IsZeroCopyOnAPU = Plugin::get().AreAllocationsForMapsOnApusDisabled();
4187+
bool IsZeroCopyOnAPU = AreAllocationsForMapsOnApusDisabled();
41884188
BoolEnvar HSAXnack = BoolEnvar("HSA_XNACK", false);
41894189

41904190
if (IsZeroCopyOnAPU && HSAXnack.get())
@@ -4193,7 +4193,7 @@ struct AMDGPUPluginTy final : public GenericPluginTy {
41934193
// Check if we are on a system that has an APU or on a non-APU system
41944194
// where unified shared memory can be enabled:
41954195
bool IsUsmSystem =
4196-
Plugin::get().hasAPUDevice() || Plugin::get().hasDGpuWithUsmSupport();
4196+
hasAPUDevice() || hasDGpuWithUsmSupport();
41974197

41984198
// Warn user if there is a mismatch between the request and the system
41994199
// architecture:

openmp/libomptarget/plugins-nextgen/common/include/PluginInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ struct GenericPluginTy {
11841184

11851185
/// Return true if host globals can be enabled on a system that supprots
11861186
/// unified shared memory.
1187-
virtual bool canUseHostGlobals() const { return false; }
1187+
virtual bool canUseHostGlobals() { return false; }
11881188

11891189
protected:
11901190
/// Indicate whether a device id is valid.

0 commit comments

Comments
 (0)