Revert "SWDEV-522707 - Set phys_mem_handle type to sizeof(size_t) to avoid blocking address range. (#105)" (#348)

This reverts commit 6811fd90b8.
Этот коммит содержится в:
Jayaprakash, Karthik
2025-05-19 05:49:16 -04:00
коммит произвёл GitHub
родитель f5b8db33f1
Коммит bb7750a946
2 изменённых файлов: 1 добавлений и 11 удалений
-4
Просмотреть файл
@@ -788,10 +788,6 @@ bool Buffer::create(bool alloc_local) {
return false;
}
// Update the size of memory object to size of handle, since the setting the size to the actual
// physical memory allocated would block the address range during amd::MemObjMap::FindMemObj()
// lookup. This might cause address range issue in virtual address space.
owner()->UpdatePhysMemSize();
owner()->setSvmPtr(reinterpret_cast<void*>(owner()->getUserData().hsa_handle));
return true;
+1 -7
Просмотреть файл
@@ -254,6 +254,7 @@ class Memory : public amd::RuntimeObject {
//! Initializes the device memory array
virtual void initDeviceMemory();
void setSize(size_t size) { size_ = size; }
void setInteropObj(InteropObject* obj) { interopObj_ = obj; }
@@ -345,13 +346,6 @@ class Memory : public amd::RuntimeObject {
Flags getMemFlags() const { return flags_; }
Type getType() const { return type_; }
//! Update phys mem size to the handle, only when the ROCCLR_MEM_PHYSMEM flag is set.
void UpdatePhysMemSize() {
if (flags_ & ROCCLR_MEM_PHYMEM) {
size_ = sizeof(getUserData().hsa_handle);
}
}
const Device* getLastWriter() { return lastWriter_; }
const HostMemoryReference* getHostMemRef() const { return &hostMemRef_; }
void* getHostMem() const { return hostMemRef_.hostMem(); }