SWDEV-336024 - Clear device heap to 0 in ROCr path
Change-Id: Id100ca6d6d5bd7fb16ca8c98ff0b12c9df1d69ab
This commit is contained in:
@@ -1087,6 +1087,7 @@ void PAL_STDCALL Device::PalDeveloperCallback(void* pPrivateData, const Pal::uin
|
||||
#endif // PAL_GPUOPEN_OCL
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool Device::initializeHeapResources() {
|
||||
amd::ScopedLock k(lockForInitHeap_);
|
||||
if (!heapInitComplete_) {
|
||||
@@ -1154,13 +1155,18 @@ bool Device::initializeHeapResources() {
|
||||
xferQueue_->enableSyncedBlit();
|
||||
if (amd::IS_HIP) {
|
||||
// Allocate initial heap for device memory allocator
|
||||
static constexpr size_t HeapBufferSize = 1024 * Ki;
|
||||
static constexpr size_t HeapBufferSize = 128 * Ki;
|
||||
heap_buffer_ = createMemory(HeapBufferSize);
|
||||
if (heap_buffer_ == nullptr) {
|
||||
LogError("Heap buffer allocation failed!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
device::VirtualDevice* Device::createVirtualDevice(amd::CommandQueue* queue) {
|
||||
bool profiling = false;
|
||||
uint rtCUs = amd::CommandQueue::RealTimeDisabled;
|
||||
|
||||
Reference in New Issue
Block a user