SWDEV-307185 - Move memory allocation under device layer
It can be too early to allocate memory at the begining of Device::create() under PAL Change-Id: I4bd76db7be3f6fb246243ea68022d8b0f860471d
This commit is contained in:
@@ -522,11 +522,6 @@ bool Device::create(const Isa &isa) {
|
||||
if (nullptr == vaCacheMap_) {
|
||||
return false;
|
||||
}
|
||||
if (amd::IS_HIP) {
|
||||
// Allocate initial heap for device memory allocator
|
||||
static constexpr size_t HeapBufferSize = 1024 * Ki;
|
||||
heap_buffer_ = createMemory(HeapBufferSize);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1151,6 +1151,11 @@ bool Device::initializeHeapResources() {
|
||||
return false;
|
||||
}
|
||||
xferQueue_->enableSyncedBlit();
|
||||
if (amd::IS_HIP) {
|
||||
// Allocate initial heap for device memory allocator
|
||||
static constexpr size_t HeapBufferSize = 1024 * Ki;
|
||||
heap_buffer_ = createMemory(HeapBufferSize);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -784,6 +784,12 @@ bool Device::create() {
|
||||
}
|
||||
}
|
||||
|
||||
if (amd::IS_HIP) {
|
||||
// Allocate initial heap for device memory allocator
|
||||
static constexpr size_t HeapBufferSize = 1024 * Ki;
|
||||
heap_buffer_ = createMemory(HeapBufferSize);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user