rocr/aie: Correct reporting of dev heap size
Storing the correct dev heap size in the memory region. Change-Id: I14b053330c187da1d7d0213256625e50795b9902
This commit is contained in:
committed by
Tony Gutierrez
parent
daad183bf8
commit
48fdc17179
@@ -84,6 +84,10 @@ hsa_status_t XdnaDriver::DiscoverDriver() {
|
||||
return HSA_STATUS_ERROR;
|
||||
}
|
||||
|
||||
uint64_t XdnaDriver::GetDevHeapByteSize() {
|
||||
return dev_heap_size;
|
||||
}
|
||||
|
||||
hsa_status_t XdnaDriver::Init() { return InitDeviceHeap(); }
|
||||
|
||||
hsa_status_t XdnaDriver::QueryKernelModeDriver(core::DriverQuery query) {
|
||||
|
||||
@@ -63,6 +63,9 @@ public:
|
||||
|
||||
static hsa_status_t DiscoverDriver();
|
||||
|
||||
/// @brief Returns the size of the dev heap in bytes.
|
||||
static uint64_t GetDevHeapByteSize();
|
||||
|
||||
hsa_status_t Init() override;
|
||||
hsa_status_t QueryKernelModeDriver(core::DriverQuery query) override;
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
#include "core/inc/amd_aie_aql_queue.h"
|
||||
#include "core/inc/amd_memory_region.h"
|
||||
#include "core/inc/amd_xdna_driver.h"
|
||||
#include "core/inc/driver.h"
|
||||
#include "core/inc/runtime.h"
|
||||
|
||||
@@ -199,16 +200,18 @@ void AieAgent::InitRegionList() {
|
||||
|
||||
/// For allocating kernel arguments or other objects that only need
|
||||
/// system memory.
|
||||
HsaMemoryProperties sys_mem_props{
|
||||
.HeapType = HSA_HEAPTYPE_SYSTEM,
|
||||
};
|
||||
HsaMemoryProperties sys_mem_props = {};
|
||||
sys_mem_props.HeapType = HSA_HEAPTYPE_SYSTEM;
|
||||
|
||||
/// For allocating memory for programmable device image (PDI) files. These
|
||||
/// need to be mapped to the device so the hardware can access the PDIs.
|
||||
HsaMemoryProperties dev_mem_props{
|
||||
.HeapType = HSA_HEAPTYPE_DEVICE_SVM,
|
||||
};
|
||||
HsaMemoryProperties dev_mem_props = {};
|
||||
dev_mem_props.HeapType = HSA_HEAPTYPE_DEVICE_SVM,
|
||||
dev_mem_props.SizeInBytes = XdnaDriver::GetDevHeapByteSize();
|
||||
|
||||
/// As of now the AIE devices support coarse-grain memory regions that require
|
||||
/// explicit sync operations.
|
||||
regions_.reserve(2);
|
||||
regions_.push_back(
|
||||
new MemoryRegion(false, true, false, false, true, this, sys_mem_props));
|
||||
regions_.push_back(
|
||||
|
||||
Reference in New Issue
Block a user