SWDEV-345213 - Use the right accessor

- Use correct accessor to fetch memory objects. This checks the svm map
and arena maps

Change-Id: I84515330bb530cfe2b39abf30e1e659938f06806
This commit is contained in:
Saleel Kudchadker
2023-01-17 16:27:11 -08:00
parent 5837d83e46
commit 8028d327e9
4 changed files with 48 additions and 20 deletions
+4 -1
View File
@@ -38,7 +38,10 @@ public:
const hipMemAllocationProp& GetProperties() const { return properties_; }
hipMemGenericAllocationHandle_t asMemGenericAllocationHandle() { return reinterpret_cast<hipMemGenericAllocationHandle_t>(this); }
amd::Memory& asAmdMemory() { return *amd::MemObjMap::FindMemObj(genericAddress()); }
amd::Memory& asAmdMemory() {
size_t discardOffset;
return *getMemoryObject(genericAddress(), discardOffset);
}
void* genericAddress() const { return ptr_; }
};
};