fix: While creating shared memory use given device

When creating shared USM, currently default root device index
is used when accessing memoryManager.
This change fixes this issue, by using device provided by caller.
In case device is not provided, then default root device index
could be used.

Related-To: LOCI-4474

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2023-06-01 15:55:58 +00:00
committed by Compute-Runtime-Automation
parent 694e731a01
commit 38415162c5
3 changed files with 45 additions and 11 deletions

View File

@@ -125,6 +125,7 @@ class SVMAllocsManager {
alignment(alignment),
rootDeviceIndices(rootDeviceIndices),
subdeviceBitfields(subdeviceBitfields){};
uint32_t getRootDeviceIndex() const;
InternalMemoryType memoryType = InternalMemoryType::NOT_SPECIFIED;
MemoryProperties allocationFlags;
Device *device = nullptr;