Revert "performance: Add CCS Optimization"

This reverts commit e7b3a40aa7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2024-10-22 05:04:41 +02:00
committed by Compute-Runtime-Automation
parent afe5f105a8
commit e10998db45
16 changed files with 2 additions and 64 deletions

View File

@@ -362,7 +362,6 @@ 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, 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, ForceNonCoherentModeForTimestamps, false, "When active timestamp buffers are allocated in non coherent memory.")
DECLARE_DEBUG_VARIABLE(bool, SetAssumeNotInUse, true, "Set AssumeNotInUse flag in d3d destroy allocation.")
DECLARE_DEBUG_VARIABLE(int32_t, EnableReusingGpuTimestamps, -1, "Reuse GPU timestamp for next device time requests. -1: os-specific, 0: disable, 1: enable")
DECLARE_DEBUG_VARIABLE(int32_t, AllowZeroCopyWithoutCoherency, -1, "Use cacheline flush instead of memory copy for map/unmap mem object")
DECLARE_DEBUG_VARIABLE(int32_t, EnableHostPtrTracking, -1, "Enable host ptr tracking: -1 - default platform setting, 0 - disabled, 1 - enabled")

View File

@@ -16,7 +16,6 @@ struct RootDeviceEnvironment;
class GmmHandleAllocator;
class MapGpuVirtualAddressGmm;
class FreeGpuVirtualAddressGmm;
class DeallocateGmm;
class GmmClientContext {
public:
@@ -29,7 +28,6 @@ class GmmClientContext {
MOCKABLE_VIRTUAL GMM_RESOURCE_INFO *createResInfoObject(GMM_RESCREATE_PARAMS *pCreateParams);
MOCKABLE_VIRTUAL GMM_RESOURCE_INFO *copyResInfoObject(GMM_RESOURCE_INFO *pSrcRes);
MOCKABLE_VIRTUAL void destroyResInfoObject(GMM_RESOURCE_INFO *pResInfo);
MOCKABLE_VIRTUAL long deallocate2(DeallocateGmm *deallocateGmm);
MOCKABLE_VIRTUAL uint64_t mapGpuVirtualAddress(MapGpuVirtualAddressGmm *pMapGpuVa);
MOCKABLE_VIRTUAL uint64_t freeGpuVirtualAddress(FreeGpuVirtualAddressGmm *pFreeGpuVa);
GMM_CLIENT_CONTEXT *getHandle() const;

View File

@@ -14,8 +14,5 @@ uint64_t GmmClientContext::mapGpuVirtualAddress(MapGpuVirtualAddressGmm *pMapGpu
uint64_t GmmClientContext::freeGpuVirtualAddress(FreeGpuVirtualAddressGmm *pFreeGpuVa) {
return 0;
}
long GmmClientContext::deallocate2(DeallocateGmm *deallocateGmm) {
return 0;
}
} // namespace NEO

View File

@@ -16,8 +16,5 @@ uint64_t GmmClientContext::mapGpuVirtualAddress(MapGpuVirtualAddressGmm *pMapGpu
uint64_t GmmClientContext::freeGpuVirtualAddress(FreeGpuVirtualAddressGmm *pFreeGpuVa) {
return 0;
}
long GmmClientContext::deallocate2(DeallocateGmm *deallocateGmm) {
return deallocateGmm->gdi->destroyAllocation2(deallocateGmm->destroyAllocation2);
}
} // namespace NEO

View File

@@ -31,10 +31,5 @@ uint64_t GmmClientContext::freeGpuVirtualAddress(FreeGpuVirtualAddressGmm *pFree
return 0;
}
}
long GmmClientContext::deallocate2(DeallocateGmm *deallocateGmm) {
GMM_DESTROYALLOCATION2 gmmDestroyAllocation2{};
memcpy_s(&gmmDestroyAllocation2.KmtObj, sizeof(D3DKMT_DESTROYALLOCATION2), deallocateGmm->destroyAllocation2, sizeof(D3DKMT_DESTROYALLOCATION2));
return clientContext->DeAllocate2(&gmmDestroyAllocation2);
}
} // namespace NEO

View File

@@ -31,11 +31,4 @@ class FreeGpuVirtualAddressGmm {
Gdi *gdi;
};
class DeallocateGmm {
public:
DeallocateGmm(D3DKMT_DESTROYALLOCATION2 *destroyAllocation2, Gdi *gdi) : destroyAllocation2(destroyAllocation2), gdi(gdi) {}
D3DKMT_DESTROYALLOCATION2 *destroyAllocation2;
Gdi *gdi;
};
} // namespace NEO

View File

@@ -69,7 +69,6 @@ Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_
applyAuxFlagsForBuffer(gmmRequirements.preferCompressed && !storageInfo.isLockable);
applyMemoryFlags(storageInfo);
applyAppResource(storageInfo);
applyExtraInitFlag();
applyDebugOverrides();
gmmResourceInfo.reset(GmmResourceInfo::create(gmmHelper->getClientContext(), &resourceParams));

View File

@@ -80,7 +80,6 @@ class Gmm {
void setupImageResourceParams(ImageInfo &imgInfo, bool preferCompressed);
bool extraMemoryFlagsRequired();
void applyExtraMemoryFlags(const StorageInfo &storageInfo);
void applyExtraInitFlag();
void applyDebugOverrides();
GmmHelper *gmmHelper = nullptr;

View File

@@ -13,4 +13,3 @@ using namespace NEO;
void Gmm::applyExtraMemoryFlags(const StorageInfo &storageInfo) {}
bool Gmm::extraMemoryFlagsRequired() { return false; }
void Gmm::applyAppResource(const StorageInfo &storageInfo) {}
void Gmm::applyExtraInitFlag() {}

View File

@@ -819,9 +819,7 @@ bool Wddm::destroyAllocations(const D3DKMT_HANDLE *handles, uint32_t allocationC
if ((0U == allocationCount) && (0U == resourceHandle)) {
return true;
}
NTSTATUS status = STATUS_SUCCESS;
D3DKMT_DESTROYALLOCATION2 destroyAllocation = {};
DEBUG_BREAK_IF(!(allocationCount <= 1 || resourceHandle == 0));
@@ -829,11 +827,10 @@ bool Wddm::destroyAllocations(const D3DKMT_HANDLE *handles, uint32_t allocationC
destroyAllocation.hResource = resourceHandle;
destroyAllocation.phAllocationList = handles;
destroyAllocation.AllocationCount = allocationCount;
destroyAllocation.Flags.AssumeNotInUse = debugManager.flags.SetAssumeNotInUse.get();
DeallocateGmm deallocateGmm{&destroyAllocation, getGdi()};
destroyAllocation.Flags.AssumeNotInUse = 1;
status = static_cast<NTSTATUS>(this->rootDeviceEnvironment.getGmmClientContext()->deallocate2(&deallocateGmm));
status = getGdi()->destroyAllocation2(&destroyAllocation);
return status == STATUS_SUCCESS;
}

View File

@@ -22,7 +22,6 @@ class MockGmmClientContextBase : public GmmClientContext {
GMM_RESOURCE_INFO *createResInfoObject(GMM_RESCREATE_PARAMS *pCreateParams) override;
GMM_RESOURCE_INFO *copyResInfoObject(GMM_RESOURCE_INFO *pSrcRes) override;
void destroyResInfoObject(GMM_RESOURCE_INFO *pResInfo) override;
long deallocate2(DeallocateGmm *deallocateGmm) override;
uint8_t getSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT format) override;
uint8_t getMediaSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT format) override;
void setGmmDeviceInfo(GMM_DEVICE_INFO *deviceInfo) override;

View File

@@ -12,7 +12,4 @@ uint64_t MockGmmClientContextBase::mapGpuVirtualAddress(MapGpuVirtualAddressGmm
mapGpuVirtualAddressCalled++;
return 0;
}
long MockGmmClientContextBase::deallocate2(DeallocateGmm *deallocateGmm) {
return 0;
}
} // namespace NEO

View File

@@ -14,7 +14,4 @@ uint64_t MockGmmClientContextBase::mapGpuVirtualAddress(MapGpuVirtualAddressGmm
mapGpuVirtualAddressCalled++;
return pMapGpuVa->gdi->mapGpuVirtualAddress(pMapGpuVa->mapGpuVirtualAddressParams);
}
long MockGmmClientContextBase::deallocate2(DeallocateGmm *deallocateGmm) {
return deallocateGmm->gdi->destroyAllocation2(deallocateGmm->destroyAllocation2);
}
} // namespace NEO

View File

@@ -14,7 +14,4 @@ uint64_t MockGmmClientContextBase::mapGpuVirtualAddress(MapGpuVirtualAddressGmm
mapGpuVirtualAddressCalled++;
return pMapGpuVa->gdi->mapGpuVirtualAddress(pMapGpuVa->mapGpuVirtualAddressParams);
}
long MockGmmClientContextBase::deallocate2(DeallocateGmm *deallocateGmm) {
return deallocateGmm->gdi->destroyAllocation2(deallocateGmm->destroyAllocation2);
}
} // namespace NEO

View File

@@ -622,7 +622,6 @@ DeferStateInitSubmissionToFirstRegularUsage = -1
WaitForPagingFenceInController = -1
DirectSubmissionPrintSemaphoreUsage = -1
ForceNonCoherentModeForTimestamps = 0
SetAssumeNotInUse = 1
ExperimentalUSMAllocationReuseVersion = -1
ForceNonWalkerSplitMemoryCopy = -1
DirectSubmissionSwitchSemaphoreMode = -1

View File

@@ -394,30 +394,6 @@ TEST_F(Wddm20WithMockGdiDllTests, GivenThreeOsHandlesWhenAskedForDestroyAllocati
EXPECT_EQ(1u, ptrToDestroyAlloc2->Flags.AssumeNotInUse);
}
TEST_F(Wddm20WithMockGdiDllTests, GivenSetAssumeNotInUseSetToFalseWhenDestroyAllocationsThenAssumeNotInUseNotSet) {
DebugManagerStateRestore restorer;
debugManager.flags.SetAssumeNotInUse.set(false);
OsHandleStorage storage;
OsHandleWin osHandle1;
osHandle1.handle = ALLOCATION_HANDLE;
storage.fragmentStorageData[0].osHandleStorage = &osHandle1;
storage.fragmentStorageData[0].freeTheFragment = true;
D3DKMT_HANDLE handles[1] = {ALLOCATION_HANDLE};
bool retVal = wddm->destroyAllocations(handles, 1, 0);
EXPECT_TRUE(retVal);
auto destroyWithResourceHandleCalled = 0u;
D3DKMT_DESTROYALLOCATION2 *ptrToDestroyAlloc2 = nullptr;
getSizesFcn(destroyWithResourceHandleCalled, ptrToDestroyAlloc2);
EXPECT_EQ(0u, ptrToDestroyAlloc2->Flags.AssumeNotInUse);
}
TEST_F(Wddm20Tests, WhenMappingAndFreeingGpuVaThenReturnIsCorrect) {
OsAgnosticMemoryManager mm(*executionEnvironment);
auto gmmHelper = getGmmHelper();