feature: Add mask of tiles to each memory region in Xe

* Derive that information from GT list
* Use it to compute local memory size given the mask of tiles to account
for
* Leverage IoctlHelper to dispatch execution (i915 vs Xe)

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2024-04-15 11:09:00 +00:00
committed by Compute-Runtime-Automation
parent ea057abd36
commit c2b4699cb6
10 changed files with 134 additions and 50 deletions

View File

@@ -30,18 +30,19 @@ class MemoryInfo {
MemoryClassInstance getMemoryRegionClassAndInstance(uint32_t memoryBank, const HardwareInfo &hwInfo);
MOCKABLE_VIRTUAL size_t getMemoryRegionSize(uint32_t memoryBank);
MOCKABLE_VIRTUAL size_t getMemoryRegionSize(uint32_t memoryBank) const;
const MemoryRegion &getMemoryRegion(uint32_t memoryBank);
const MemoryRegion &getMemoryRegion(uint32_t memoryBank) const;
void printRegionSizes();
void printRegionSizes() const;
uint32_t getTileIndex(uint32_t memoryBank);
uint32_t getTileIndex(uint32_t memoryBank) const;
MOCKABLE_VIRTUAL int createGemExtWithSingleRegion(uint32_t memoryBanks, size_t allocSize, uint32_t &handle, uint64_t patIndex, int32_t pairHandle, bool isUSMHostAllocation);
MOCKABLE_VIRTUAL int createGemExtWithMultipleRegions(uint32_t memoryBanks, size_t allocSize, uint32_t &handle, uint64_t patIndex, bool isUSMHostAllocation);
MOCKABLE_VIRTUAL int createGemExtWithMultipleRegions(uint32_t memoryBanks, size_t allocSize, uint32_t &handle, uint64_t patIndex, int32_t pairHandle, bool isChunked, uint32_t numOfChunks, bool isUSMHostAllocation);
const RegionContainer &getLocalMemoryRegions() const { return localMemoryRegions; }
const RegionContainer &getDrmRegionInfos() const { return drmQueryRegions; }
bool isMemPolicySupported() const { return memPolicySupported; }