mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Check if KMD migration is supported
Related-To: NEO-3312 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
320a404a91
commit
049e77b235
@ -145,6 +145,8 @@ class MemoryManager {
|
||||
bool isLocalMemorySupported(uint32_t rootDeviceIndex) const;
|
||||
virtual bool isMemoryBudgetExhausted() const;
|
||||
|
||||
virtual bool isKmdMigrationAvailable(uint32_t rootDeviceIndex) { return false; }
|
||||
|
||||
virtual AlignedMallocRestrictions *getAlignedMallocRestrictions() {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -220,13 +220,9 @@ void *SVMAllocsManager::createSharedUnifiedMemoryAllocation(size_t size,
|
||||
}
|
||||
|
||||
if (supportDualStorageSharedMemory) {
|
||||
bool useKmdMigration = false;
|
||||
|
||||
if (DebugManager.flags.UseKmdMigration.get() != -1) {
|
||||
useKmdMigration = DebugManager.flags.UseKmdMigration.get();
|
||||
}
|
||||
|
||||
bool useKmdMigration = memoryManager->isKmdMigrationAvailable(*memoryProperties.rootDeviceIndices.begin());
|
||||
void *unifiedMemoryPointer = nullptr;
|
||||
|
||||
if (useKmdMigration) {
|
||||
unifiedMemoryPointer = createUnifiedKmdMigratedAllocation(size, {}, memoryProperties);
|
||||
if (!unifiedMemoryPointer) {
|
||||
|
Reference in New Issue
Block a user