Disable host ptr tracking for GEN12LP
Related-To: NEO-3661 Change-Id: I1774aad8ef32f294192a9b679cb9f66e4091198c Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
parent
cd198fac0a
commit
632134db30
|
@ -51,6 +51,7 @@ struct RuntimeCapabilityTable {
|
||||||
bool supportCacheFlushAfterWalker;
|
bool supportCacheFlushAfterWalker;
|
||||||
bool supportsImages;
|
bool supportsImages;
|
||||||
bool supportsDeviceEnqueue;
|
bool supportsDeviceEnqueue;
|
||||||
|
bool hostPtrTrackingEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HardwareCapabilities {
|
struct HardwareCapabilities {
|
||||||
|
|
|
@ -56,6 +56,7 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||||
INTERNAL_HOST_MEMORY,
|
INTERNAL_HOST_MEMORY,
|
||||||
KERNEL_ISA,
|
KERNEL_ISA,
|
||||||
LINEAR_STREAM,
|
LINEAR_STREAM,
|
||||||
|
MAP_ALLOCATION,
|
||||||
MCS,
|
MCS,
|
||||||
PIPE,
|
PIPE,
|
||||||
PREEMPTION,
|
PREEMPTION,
|
||||||
|
|
|
@ -64,7 +64,8 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
||||||
false, // supportsVme
|
false, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable EHL::workaroundTable = {};
|
WorkaroundTable EHL::workaroundTable = {};
|
||||||
|
|
|
@ -66,7 +66,8 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
||||||
true, // supportsVme
|
true, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable ICLLP::workaroundTable = {};
|
WorkaroundTable ICLLP::workaroundTable = {};
|
||||||
|
|
|
@ -65,7 +65,8 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
||||||
false, // supportsVme
|
false, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable LKF::workaroundTable = {};
|
WorkaroundTable LKF::workaroundTable = {};
|
||||||
|
|
|
@ -66,7 +66,8 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
|
||||||
false, // supportsVme
|
false, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
false // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable TGLLP::workaroundTable = {};
|
WorkaroundTable TGLLP::workaroundTable = {};
|
||||||
|
|
|
@ -70,7 +70,8 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
||||||
false, // supportsVme
|
false, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable BDW::workaroundTable = {};
|
WorkaroundTable BDW::workaroundTable = {};
|
||||||
|
|
|
@ -67,7 +67,8 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
||||||
true, // supportsVme
|
true, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
false // supportsDeviceEnqueue
|
false, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable BXT::workaroundTable = {};
|
WorkaroundTable BXT::workaroundTable = {};
|
||||||
|
|
|
@ -62,7 +62,8 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
||||||
true, // supportsVme
|
true, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable CFL::workaroundTable = {};
|
WorkaroundTable CFL::workaroundTable = {};
|
||||||
|
|
|
@ -62,7 +62,8 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
||||||
true, // supportsVme
|
true, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
false // supportsDeviceEnqueue
|
false, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable GLK::workaroundTable = {};
|
WorkaroundTable GLK::workaroundTable = {};
|
||||||
|
|
|
@ -62,7 +62,8 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
||||||
true, // supportsVme
|
true, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable KBL::workaroundTable = {};
|
WorkaroundTable KBL::workaroundTable = {};
|
||||||
|
|
|
@ -70,7 +70,8 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
||||||
true, // supportsVme
|
true, // supportsVme
|
||||||
false, // supportCacheFlushAfterWalker
|
false, // supportCacheFlushAfterWalker
|
||||||
true, // supportsImages
|
true, // supportsImages
|
||||||
true // supportsDeviceEnqueue
|
true, // supportsDeviceEnqueue
|
||||||
|
true // hostPtrTrackingEnabled
|
||||||
};
|
};
|
||||||
WorkaroundTable SKL::workaroundTable = {};
|
WorkaroundTable SKL::workaroundTable = {};
|
||||||
FeatureTable SKL::featureTable = {};
|
FeatureTable SKL::featureTable = {};
|
||||||
|
|
|
@ -283,7 +283,7 @@ Buffer *Buffer::create(Context *context,
|
||||||
|
|
||||||
if (memoryProperties.flags.useHostPtr) {
|
if (memoryProperties.flags.useHostPtr) {
|
||||||
if (!zeroCopyAllowed && !isHostPtrSVM) {
|
if (!zeroCopyAllowed && !isHostPtrSVM) {
|
||||||
AllocationProperties properties{rootDeviceIndex, false, size, GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR, false};
|
AllocationProperties properties{rootDeviceIndex, false, size, GraphicsAllocation::AllocationType::MAP_ALLOCATION, false};
|
||||||
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
|
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
|
||||||
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
|
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,7 @@ Image *Image::create(Context *context,
|
||||||
zeroCopy = true;
|
zeroCopy = true;
|
||||||
}
|
}
|
||||||
if (memory) {
|
if (memory) {
|
||||||
AllocationProperties properties{rootDeviceIndex, false, hostPtrMinSize, GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR, false};
|
AllocationProperties properties{rootDeviceIndex, false, hostPtrMinSize, GraphicsAllocation::AllocationType::MAP_ALLOCATION, false};
|
||||||
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
|
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
|
||||||
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
|
mapAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, hostPtr);
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ Image *Image::create(Context *context,
|
||||||
} else {
|
} else {
|
||||||
errcodeRet = cmdQ->enqueueWriteImage(image, CL_TRUE, ©Origin[0], ©Region[0],
|
errcodeRet = cmdQ->enqueueWriteImage(image, CL_TRUE, ©Origin[0], ©Region[0],
|
||||||
hostPtrRowPitch, hostPtrSlicePitch,
|
hostPtrRowPitch, hostPtrSlicePitch,
|
||||||
hostPtr, nullptr, 0, nullptr, nullptr);
|
hostPtr, mapAllocation, 0, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
image->transferData(memory->getUnderlyingBuffer(), imgInfo.rowPitch, imgInfo.slicePitch,
|
image->transferData(memory->getUnderlyingBuffer(), imgInfo.rowPitch, imgInfo.slicePitch,
|
||||||
|
|
|
@ -332,7 +332,8 @@ void *MemObj::getBasePtrForMap(uint32_t rootDeviceIndex) {
|
||||||
} else {
|
} else {
|
||||||
auto memory = memoryManager->allocateSystemMemory(getSize(), MemoryConstants::pageSize);
|
auto memory = memoryManager->allocateSystemMemory(getSize(), MemoryConstants::pageSize);
|
||||||
setAllocatedMapPtr(memory);
|
setAllocatedMapPtr(memory);
|
||||||
AllocationProperties properties{rootDeviceIndex, false, getSize(), GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR, false};
|
AllocationProperties properties{rootDeviceIndex, false, getSize(), GraphicsAllocation::AllocationType::MAP_ALLOCATION, false};
|
||||||
|
|
||||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, memory);
|
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(properties, memory);
|
||||||
setMapAllocation(allocation);
|
setMapAllocation(allocation);
|
||||||
return getAllocatedMapPtr();
|
return getAllocatedMapPtr();
|
||||||
|
|
|
@ -260,6 +260,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||||
case GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR:
|
case GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR:
|
||||||
case GraphicsAllocation::AllocationType::GLOBAL_SURFACE:
|
case GraphicsAllocation::AllocationType::GLOBAL_SURFACE:
|
||||||
case GraphicsAllocation::AllocationType::IMAGE:
|
case GraphicsAllocation::AllocationType::IMAGE:
|
||||||
|
case GraphicsAllocation::AllocationType::MAP_ALLOCATION:
|
||||||
case GraphicsAllocation::AllocationType::PIPE:
|
case GraphicsAllocation::AllocationType::PIPE:
|
||||||
case GraphicsAllocation::AllocationType::SHARED_BUFFER:
|
case GraphicsAllocation::AllocationType::SHARED_BUFFER:
|
||||||
case GraphicsAllocation::AllocationType::SHARED_IMAGE:
|
case GraphicsAllocation::AllocationType::SHARED_IMAGE:
|
||||||
|
@ -278,6 +279,7 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||||
case GraphicsAllocation::AllocationType::DEVICE_QUEUE_BUFFER:
|
case GraphicsAllocation::AllocationType::DEVICE_QUEUE_BUFFER:
|
||||||
case GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR:
|
case GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR:
|
||||||
case GraphicsAllocation::AllocationType::FILL_PATTERN:
|
case GraphicsAllocation::AllocationType::FILL_PATTERN:
|
||||||
|
case GraphicsAllocation::AllocationType::MAP_ALLOCATION:
|
||||||
case GraphicsAllocation::AllocationType::MCS:
|
case GraphicsAllocation::AllocationType::MCS:
|
||||||
case GraphicsAllocation::AllocationType::PREEMPTION:
|
case GraphicsAllocation::AllocationType::PREEMPTION:
|
||||||
case GraphicsAllocation::AllocationType::PROFILING_TAG_BUFFER:
|
case GraphicsAllocation::AllocationType::PROFILING_TAG_BUFFER:
|
||||||
|
@ -340,7 +342,7 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemory(const AllocationData &
|
||||||
return allocateGraphicsMemoryForImage(allocationData);
|
return allocateGraphicsMemoryForImage(allocationData);
|
||||||
}
|
}
|
||||||
if (allocationData.type == GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR &&
|
if (allocationData.type == GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR &&
|
||||||
(!peekExecutionEnvironment().isFullRangeSvm() || !DebugManager.flags.EnableHostPtrTracking.get())) {
|
(!peekExecutionEnvironment().isFullRangeSvm() || !isHostPointerTrackingEnabled())) {
|
||||||
auto allocation = allocateGraphicsMemoryForNonSvmHostPtr(allocationData);
|
auto allocation = allocateGraphicsMemoryForNonSvmHostPtr(allocationData);
|
||||||
if (allocation) {
|
if (allocation) {
|
||||||
allocation->setFlushL3Required(allocationData.flags.flushL3);
|
allocation->setFlushL3Required(allocationData.flags.flushL3);
|
||||||
|
@ -485,4 +487,11 @@ void *MemoryManager::getReservedMemory(size_t size, size_t alignment) {
|
||||||
return reservedMemory;
|
return reservedMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MemoryManager::isHostPointerTrackingEnabled() {
|
||||||
|
if (DebugManager.flags.EnableHostPtrTracking.get() != -1) {
|
||||||
|
return !!DebugManager.flags.EnableHostPtrTracking.get();
|
||||||
|
}
|
||||||
|
return (peekExecutionEnvironment().getHardwareInfo()->capabilityTable.hostPtrTrackingEnabled | is32bit);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -140,6 +140,8 @@ class MemoryManager {
|
||||||
::alignedFree(ptr);
|
::alignedFree(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MOCKABLE_VIRTUAL bool isHostPointerTrackingEnabled();
|
||||||
|
|
||||||
const ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; }
|
const ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; }
|
||||||
|
|
||||||
OsContext *createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, aub_stream::EngineType engineType,
|
OsContext *createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, aub_stream::EngineType engineType,
|
||||||
|
|
|
@ -87,7 +87,7 @@ DECLARE_DEBUG_VARIABLE(bool, DisableConcurrentBlockExecution, false, "disables c
|
||||||
DECLARE_DEBUG_VARIABLE(bool, UseNoRingFlushesKmdMode, true, "Windows only, passes flag to KMD that informs KMD to not emit any ring buffer flushes.")
|
DECLARE_DEBUG_VARIABLE(bool, UseNoRingFlushesKmdMode, true, "Windows only, passes flag to KMD that informs KMD to not emit any ring buffer flushes.")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForUseHostPtr, false, "When active all buffer allocations created with CL_MEM_USE_HOST_PTR flag will not share memory with CPU.")
|
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForUseHostPtr, false, "When active all buffer allocations created with CL_MEM_USE_HOST_PTR flag will not share memory with CPU.")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForBuffers, false, "When active all buffer allocations will not share memory with CPU.")
|
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForBuffers, false, "When active all buffer allocations will not share memory with CPU.")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, EnableHostPtrTracking, true, "Enable host ptr tracking")
|
DECLARE_DEBUG_VARIABLE(int32_t, EnableHostPtrTracking, -1, "Enable host ptr tracking: -1 - default platform setting, 0 - disabled, 1 - enabled")
|
||||||
DECLARE_DEBUG_VARIABLE(bool, DisableDcFlushInEpilogue, false, "Disable DC flush in epilogue")
|
DECLARE_DEBUG_VARIABLE(bool, DisableDcFlushInEpilogue, false, "Disable DC flush in epilogue")
|
||||||
|
|
||||||
/*FEATURE FLAGS*/
|
/*FEATURE FLAGS*/
|
||||||
|
|
|
@ -143,7 +143,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForNonSvmHostPtr(co
|
||||||
|
|
||||||
wddmAllocation->setDefaultGmm(gmm);
|
wddmAllocation->setDefaultGmm(gmm);
|
||||||
|
|
||||||
if (!createWddmAllocation(wddmAllocation.get(), wddmAllocation->getAlignedCpuPtr())) {
|
if (!createWddmAllocation(wddmAllocation.get(), nullptr)) {
|
||||||
delete gmm;
|
delete gmm;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,7 +419,7 @@ TEST_F(CreateAllocationForHostSurfaceTest, givenReadOnlyHostPointerWhenAllocatio
|
||||||
size_t size = sizeof(memory);
|
size_t size = sizeof(memory);
|
||||||
HostPtrSurface surface(const_cast<char *>(memory), size, true);
|
HostPtrSurface surface(const_cast<char *>(memory), size, true);
|
||||||
|
|
||||||
if (device->isFullRangeSvm()) {
|
if (device->isFullRangeSvm() && gmockMemoryManager->isHostPointerTrackingEnabled()) {
|
||||||
EXPECT_CALL(*gmockMemoryManager, populateOsHandles(::testing::_))
|
EXPECT_CALL(*gmockMemoryManager, populateOsHandles(::testing::_))
|
||||||
.Times(1)
|
.Times(1)
|
||||||
.WillOnce(::testing::Return(MemoryManager::AllocationStatus::InvalidHostPointer));
|
.WillOnce(::testing::Return(MemoryManager::AllocationStatus::InvalidHostPointer));
|
||||||
|
@ -446,7 +446,7 @@ TEST_F(CreateAllocationForHostSurfaceTest, givenReadOnlyHostPointerWhenAllocatio
|
||||||
size_t size = sizeof(memory);
|
size_t size = sizeof(memory);
|
||||||
HostPtrSurface surface(const_cast<char *>(memory), size, false);
|
HostPtrSurface surface(const_cast<char *>(memory), size, false);
|
||||||
|
|
||||||
if (device->isFullRangeSvm()) {
|
if (device->isFullRangeSvm() && gmockMemoryManager->isHostPointerTrackingEnabled()) {
|
||||||
EXPECT_CALL(*gmockMemoryManager, populateOsHandles(::testing::_))
|
EXPECT_CALL(*gmockMemoryManager, populateOsHandles(::testing::_))
|
||||||
.Times(1)
|
.Times(1)
|
||||||
.WillOnce(::testing::Return(MemoryManager::AllocationStatus::InvalidHostPointer));
|
.WillOnce(::testing::Return(MemoryManager::AllocationStatus::InvalidHostPointer));
|
||||||
|
|
|
@ -293,7 +293,7 @@ TEST(Buffer, givenHostPtrPassedToBufferCreateWhenMemUseHostPtrFlagisSetAndBuffer
|
||||||
auto mapAllocation = buffer->getMapAllocation();
|
auto mapAllocation = buffer->getMapAllocation();
|
||||||
EXPECT_NE(nullptr, mapAllocation);
|
EXPECT_NE(nullptr, mapAllocation);
|
||||||
EXPECT_EQ(offsetedPtr, mapAllocation->getUnderlyingBuffer());
|
EXPECT_EQ(offsetedPtr, mapAllocation->getUnderlyingBuffer());
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR, mapAllocation->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::MAP_ALLOCATION, mapAllocation->getAllocationType());
|
||||||
|
|
||||||
alignedFree(ptr);
|
alignedFree(ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1183,7 +1183,7 @@ TEST_P(OsAgnosticMemoryManagerWithParams, givenFullGpuAddressSpaceWhenAllocateGr
|
||||||
bool requiresL3Flush = GetParam();
|
bool requiresL3Flush = GetParam();
|
||||||
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
||||||
executionEnvironment.setHwInfo(platformDevices[0]);
|
executionEnvironment.setHwInfo(platformDevices[0]);
|
||||||
if (!executionEnvironment.isFullRangeSvm()) {
|
if (!executionEnvironment.isFullRangeSvm() || !executionEnvironment.getHardwareInfo()->capabilityTable.hostPtrTrackingEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OsAgnosticMemoryManager memoryManager(executionEnvironment);
|
OsAgnosticMemoryManager memoryManager(executionEnvironment);
|
||||||
|
@ -1201,7 +1201,7 @@ TEST_P(OsAgnosticMemoryManagerWithParams, givenFullGpuAddressSpaceWhenAllocateGr
|
||||||
|
|
||||||
TEST_P(OsAgnosticMemoryManagerWithParams, givenDisabledHostPtrTrackingWhenAllocateGraphicsMemoryForHostPtrIsCalledThenAllocationWithoutFragmentsIsCreated) {
|
TEST_P(OsAgnosticMemoryManagerWithParams, givenDisabledHostPtrTrackingWhenAllocateGraphicsMemoryForHostPtrIsCalledThenAllocationWithoutFragmentsIsCreated) {
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
DebugManager.flags.EnableHostPtrTracking.set(false);
|
DebugManager.flags.EnableHostPtrTracking.set(0);
|
||||||
|
|
||||||
bool requiresL3Flush = GetParam();
|
bool requiresL3Flush = GetParam();
|
||||||
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
MockExecutionEnvironment executionEnvironment(*platformDevices);
|
||||||
|
@ -1945,3 +1945,23 @@ TEST(MemoryManagerTest, whenMemoryManagerReturnsNullptrThenAllocateGlobalsSurfac
|
||||||
allocation = allocateGlobalsSurface(&context, &device, 1024, false, true, nullptr);
|
allocation = allocateGlobalsSurface(&context, &device, 1024, false, true, nullptr);
|
||||||
EXPECT_EQ(nullptr, allocation);
|
EXPECT_EQ(nullptr, allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST_F(MemoryAllocatorTest, givenMemoryManagerWhenEnableHostPtrTrackingFlagIsSetTo0ThenHostPointerTrackingIsDisabled) {
|
||||||
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
DebugManager.flags.EnableHostPtrTracking.set(0);
|
||||||
|
EXPECT_FALSE(memoryManager->isHostPointerTrackingEnabled());
|
||||||
|
}
|
||||||
|
|
||||||
|
HWTEST_F(MemoryAllocatorTest, givenMemoryManagerWhenEnableHostPtrTrackingFlagIsNotSetTo1ThenHostPointerTrackingIsEnabled) {
|
||||||
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
DebugManager.flags.EnableHostPtrTracking.set(1);
|
||||||
|
EXPECT_TRUE(memoryManager->isHostPointerTrackingEnabled());
|
||||||
|
}
|
||||||
|
|
||||||
|
HWTEST_F(MemoryAllocatorTest, givenMemoryManagerWhenEnableHostPtrTrackingFlagIsSetNotSetThenHostPointerTrackingDependsOnCapabilityTable) {
|
||||||
|
if (is32bit) {
|
||||||
|
EXPECT_TRUE(memoryManager->isHostPointerTrackingEnabled());
|
||||||
|
} else {
|
||||||
|
EXPECT_EQ(executionEnvironment->getHardwareInfo()->capabilityTable.hostPtrTrackingEnabled, memoryManager->isHostPointerTrackingEnabled());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ HWTEST_F(EnqueueBufferWindowsTest, givenMisalignedHostPtrWhenEnqueueReadBufferCa
|
||||||
if (kernel->getKernelInfo().kernelArgInfo[1].kernelArgPatchInfoVector[0].size == sizeof(uint64_t)) {
|
if (kernel->getKernelInfo().kernelArgInfo[1].kernelArgPatchInfoVector[0].size == sizeof(uint64_t)) {
|
||||||
auto pKernelArg = (uint64_t *)(kernel->getCrossThreadData() +
|
auto pKernelArg = (uint64_t *)(kernel->getCrossThreadData() +
|
||||||
kernel->getKernelInfo().kernelArgInfo[1].kernelArgPatchInfoVector[0].crossthreadOffset);
|
kernel->getKernelInfo().kernelArgInfo[1].kernelArgPatchInfoVector[0].crossthreadOffset);
|
||||||
EXPECT_EQ(reinterpret_cast<uint64_t>(alignDown(misalignedPtr, 4)), *pKernelArg);
|
EXPECT_EQ(alignDown(gpuVa, 4), static_cast<uint64_t>(*pKernelArg));
|
||||||
EXPECT_EQ(*pKernelArg, surfaceStateDst.getSurfaceBaseAddress());
|
EXPECT_EQ(*pKernelArg, surfaceStateDst.getSurfaceBaseAddress());
|
||||||
|
|
||||||
} else if (kernel->getKernelInfo().kernelArgInfo[1].kernelArgPatchInfoVector[0].size == sizeof(uint32_t)) {
|
} else if (kernel->getKernelInfo().kernelArgInfo[1].kernelArgPatchInfoVector[0].size == sizeof(uint32_t)) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ RenderCompressedBuffersEnabled = -1
|
||||||
AUBDumpAllocsOnEnqueueReadOnly = 0
|
AUBDumpAllocsOnEnqueueReadOnly = 0
|
||||||
AUBDumpForceAllToLocalMemory = 0
|
AUBDumpForceAllToLocalMemory = 0
|
||||||
EnableCacheFlushAfterWalker = -1
|
EnableCacheFlushAfterWalker = -1
|
||||||
EnableHostPtrTracking = 1
|
EnableHostPtrTracking = -1
|
||||||
DisableDcFlushInEpilogue = 0
|
DisableDcFlushInEpilogue = 0
|
||||||
OverrideInvalidEngineWithDefault = 0
|
OverrideInvalidEngineWithDefault = 0
|
||||||
EnableFormatQuery = 0
|
EnableFormatQuery = 0
|
||||||
|
|
Loading…
Reference in New Issue