fix: allocate in system memory when system memory bitfield is set in properties

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-04-11 12:23:06 +00:00
committed by Compute-Runtime-Automation
parent e47b88f6e4
commit b24ad6a1b0
5 changed files with 23 additions and 29 deletions

View File

@@ -239,15 +239,8 @@ void RootDeviceEnvironment::initDummyAllocation() {
}
void RootDeviceEnvironment::setDummyBlitProperties(uint32_t rootDeviceIndex) {
size_t size = 4 * 4096u;
this->dummyBlitProperties = std::make_unique<AllocationProperties>(
rootDeviceIndex,
true,
size,
NEO::AllocationType::buffer,
false,
false,
systemMemoryBitfield);
size_t size = 32 * MemoryConstants::kiloByte;
this->dummyBlitProperties = std::make_unique<AllocationProperties>(rootDeviceIndex, size, NEO::AllocationType::buffer, systemMemoryBitfield);
}
GraphicsAllocation *RootDeviceEnvironment::getDummyAllocation() const {

View File

@@ -400,6 +400,10 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
auto &helper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
auto &productHelper = rootDeviceEnvironment.getProductHelper();
if (storageInfo.getMemoryBanks() == 0) {
allocationData.flags.useSystemMemory = true;
}
bool allow64KbPages = false;
bool allow32Bit = false;
bool forcePin = properties.flags.forcePin;
@@ -1054,7 +1058,7 @@ bool MemoryManager::isLocalMemoryUsedForIsa(uint32_t rootDeviceIndex) {
std::call_once(checkIsaPlacementOnceFlags[rootDeviceIndex], [&] {
AllocationProperties properties = {rootDeviceIndex, 0x1000, AllocationType::kernelIsa, 1};
AllocationData data;
getAllocationData(data, properties, nullptr, StorageInfo());
getAllocationData(data, properties, nullptr, createStorageInfoFromProperties(properties));
isaInLocalMemory[rootDeviceIndex] = !data.flags.useSystemMemory;
});