Skip to content

Commit 03ae304

Browse files
committed
update revert_patches.txt
1 parent 57ea703 commit 03ae304

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5784,6 +5784,11 @@ void *AMDGPUDeviceTy::allocate(size_t Size, void *, TargetAllocTy Kind) {
57845784
break;
57855785
}
57865786

5787+
if (Kind == TARGET_ALLOC_SHARED && IsEquippedWithGFX90A &&
5788+
EnableGFX90ACoarseGrainSharedAlloc) {
5789+
MemoryPool = CoarseGrainedMemoryPools[0];
5790+
}
5791+
57875792
if (!MemoryPool) {
57885793
REPORT("No memory pool for the specified allocation kind\n");
57895794
return nullptr;
@@ -5795,6 +5800,15 @@ void *AMDGPUDeviceTy::allocate(size_t Size, void *, TargetAllocTy Kind) {
57955800
REPORT("%s\n", toString(std::move(Err)).data());
57965801
return nullptr;
57975802
}
5803+
if (MemoryPool == CoarseGrainedMemoryPools[0] && IsEquippedWithGFX90A &&
5804+
EnableGFX90ACoarseGrainUsmMaps) {
5805+
// Need to register in the coarse grain usm map table
5806+
// if not already registered.
5807+
if (auto Err = setCoarseGrainMemoryImpl(Alloc, Size, /*set_attr=*/false)) {
5808+
REPORT("%s\n", toString(std::move(Err)).data());
5809+
return nullptr;
5810+
}
5811+
}
57985812

57995813
if (Alloc && (Kind == TARGET_ALLOC_HOST || Kind == TARGET_ALLOC_SHARED ||
58005814
OMPX_EnableDevice2DeviceMemAccess)) {

offload/plugins-nextgen/common/include/MemoryManager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class DeviceAllocatorTy {
3535
virtual void *allocate(size_t Size, void *HstPtr,
3636
TargetAllocTy Kind = TARGET_ALLOC_DEFAULT) = 0;
3737

38-
/// Delete the pointer \p TgtPtr on the device
3938
virtual int free(void *TgtPtr, TargetAllocTy Kind = TARGET_ALLOC_DEFAULT) = 0;
4039
};
4140

revert_patches.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ needs more offload patches
1919
[Offload] Port llvm-offload-device-info to new offload API (#155626)
2020
[Offload] Implement 'olIsValidBinary' in offload
2121
---
22-
needs akashB to land
23-
b4f1e0e5b173 [Flang][OpenMP] Implicitly map nested allocatable components
22+
need to resole API changes downstream
23+
[Offload] Use Error for allocating/deallocating in plugins
2424
---

0 commit comments

Comments
 (0)