Skip to content

Commit bc22846

Browse files
authored
Merge pull request #146 from AMD-Lightning-Internal/amd/dev/rlieberm/fix_usm_map_logic
[Offload][AMDGPU] fix double inversion of coarse grain usm map logic
2 parents 2323dda + 90a9018 commit bc22846

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
@@ -4096,7 +4096,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
40964096
}
40974097

40984098
bool IsGfx90aCoarseGrainUsmMapEnabledImpl() override final {
4099-
return !EnableGFX90ACoarseGrainUsmMaps;
4099+
return EnableGFX90ACoarseGrainUsmMaps;
41004100
}
41014101

41024102
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
@@ -271,8 +271,7 @@ TargetPointerResultTy MappingInfoTy::getTargetPointer(
271271
// memory as coarse-grained. The usage of coarse-grained memory can be
272272
// overriden by setting the env-var OMPX_DISABLE_USM_MAPS=1.
273273
if (Device.RTL->is_gfx90a(Device.DeviceID) && HstPtrBegin &&
274-
(!Device.RTL->is_gfx90a_coarse_grain_usm_map_enabled(
275-
Device.DeviceID))) {
274+
Device.RTL->is_gfx90a_coarse_grain_usm_map_enabled(Device.DeviceID)) {
276275
Device.RTL->set_coarse_grain_mem_region(Device.DeviceID, HstPtrBegin,
277276
Size);
278277
INFO(OMP_INFOTYPE_MAPPING_CHANGED, Device.DeviceID,

0 commit comments

Comments
 (0)