Add force host pointer import debug variable.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
parent
328bfe5ed7
commit
c2dbaee128
|
@ -354,6 +354,11 @@ NEO::GraphicsAllocation *DriverHandleImp::findHostPointerAllocation(void *ptr, s
|
|||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (NEO::DebugManager.flags.ForceHostPointerImport.get() == 1) {
|
||||
importExternalPointer(ptr, size);
|
||||
return hostPointerManager->getHostPointerAllocation(ptr)->hostPtrAllocations.getGraphicsAllocation(rootDeviceIndex);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -1511,5 +1511,18 @@ HWTEST2_F(HostPointerManagerCommandListTest, givenImmediateCommandListWhenMemory
|
|||
commandList->cmdQImmediate = nullptr;
|
||||
}
|
||||
|
||||
HWTEST2_F(HostPointerManagerCommandListTest, givenDebugModeToRegisterAllHostPointerWhenFindIsCalledThenRegisterHappens, Platforms) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.ForceHostPointerImport.set(1);
|
||||
void *testPtr = heapPointer;
|
||||
|
||||
auto gfxAllocation = hostDriverHandle->findHostPointerAllocation(testPtr, 0x10u, device->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, gfxAllocation);
|
||||
EXPECT_EQ(testPtr, gfxAllocation->getUnderlyingBuffer());
|
||||
|
||||
auto result = hostDriverHandle->releaseImportedPointer(testPtr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
|
|
@ -243,4 +243,5 @@ AlignLocalMemoryVaTo2MB = -1
|
|||
EngineInstancedSubDevices = 0
|
||||
OverrideTimestampPacketSize = -1
|
||||
ClDeviceGlobalMemSizeAvailablePercent = -1
|
||||
DebugApiUsed = 0
|
||||
DebugApiUsed = 0
|
||||
ForceHostPointerImport = -1
|
|
@ -256,6 +256,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, PassBoundBOToExec, -1, "Pass bound BOs to exec c
|
|||
DECLARE_DEBUG_VARIABLE(int32_t, EnableStaticPartitioning, -1, "Divide workload into partitions during dispatch, -1: default, 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, UpdateTaskCountFromWait, -1, " Do not update task count after each enqueue, but send update request while wait, -1: default(disabled), 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DeferOsContextInitialization, -1, "-1: default, 0: create all contexts immediately, 1: defer, if possible")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceHostPointerImport, -1, "-1: default, 0: disable, 1: enable, Forces the driver to import every host pointer coming into driver, WARNING this is not spec complaint.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, UseMaxSimdSizeToDeduceMaxWorkgroupSize, false, "With this flag on, max workgroup size is deduced using SIMD32 instead of SIMD8, this causes the max wkg size to be 4 times bigger")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ReturnRawGpuTimestamps, false, "Driver returns raw GPU tiemstamps instead of calculated ones.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ForcePerDssBackedBufferProgramming, false, "Always program per-DSS memory backed buffer in preamble")
|
||||
|
|
Loading…
Reference in New Issue