Skip to content

Commit a9ebaa5

Browse files
authored
Merge pull request #143 from AMD-Lightning-Internal/double_inversion
[Offload][AMDGPU] fix double inversion of coarse grain usm map logic
2 parents 5adba57 + 43671d1 commit a9ebaa5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4342,7 +4342,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
43424342
}
43434343

43444344
bool IsGfx90aCoarseGrainUsmMapEnabledImpl() override final {
4345-
return !EnableGFX90ACoarseGrainUsmMaps;
4345+
return EnableGFX90ACoarseGrainUsmMaps;
43464346
}
43474347

43484348
bool hasAPUDeviceImpl() override final { return IsAPU; }

offload/src/OpenMP/Mapping.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ TargetPointerResultTy MappingInfoTy::getTargetPointer(
274274
// memory as coarse-grained. The usage of coarse-grained memory can be
275275
// overriden by setting the env-var OMPX_DISABLE_USM_MAPS=1.
276276
if (Device.RTL->is_gfx90a(Device.DeviceID) && HstPtrBegin &&
277-
(!Device.RTL->is_gfx90a_coarse_grain_usm_map_enabled(
278-
Device.DeviceID))) {
277+
Device.RTL->is_gfx90a_coarse_grain_usm_map_enabled(Device.DeviceID)) {
279278
Device.RTL->set_coarse_grain_mem_region(Device.DeviceID, HstPtrBegin,
280279
Size);
281280
INFO(OMP_INFOTYPE_MAPPING_CHANGED, Device.DeviceID,

0 commit comments

Comments
 (0)