mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Revert "performance: program pat index on mtl linux"
This reverts commit 8e0b23db84.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2d60014c9a
commit
7b340775c6
@@ -635,26 +635,15 @@ GraphicsAllocation *DrmMemoryManager::allocateMemoryByKMD(const AllocationData &
|
||||
auto gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmHelper(), allocationData.hostPtr,
|
||||
allocationData.size, 0u, CacheSettingsHelper::getGmmUsageType(allocationData.type, allocationData.flags.uncacheable, productHelper), systemMemoryStorageInfo, gmmRequirements);
|
||||
size_t bufferSize = allocationData.size;
|
||||
auto alignment = allocationData.alignment;
|
||||
if (bufferSize >= 2 * MemoryConstants::megaByte) {
|
||||
alignment = MemoryConstants::pageSize2M;
|
||||
}
|
||||
uint64_t gpuRange = acquireGpuRangeWithCustomAlignment(bufferSize, allocationData.rootDeviceIndex, HeapIndex::heapStandard64KB, alignment);
|
||||
uint64_t gpuRange = acquireGpuRangeWithCustomAlignment(bufferSize, allocationData.rootDeviceIndex, HeapIndex::heapStandard64KB, allocationData.alignment);
|
||||
|
||||
auto &drm = getDrm(allocationData.rootDeviceIndex);
|
||||
int ret = -1;
|
||||
uint32_t handle;
|
||||
auto ioctlHelper = drm.getIoctlHelper();
|
||||
|
||||
uint32_t handle = ioctlHelper->createGem(bufferSize, static_cast<uint32_t>(allocationData.storageInfo.memoryBanks.to_ulong()));
|
||||
|
||||
auto patIndex = drm.getPatIndex(gmm.get(), allocationData.type, CacheRegion::defaultRegion, CachePolicy::writeBack, false, MemoryPoolHelper::isSystemMemoryPool(memoryPool));
|
||||
|
||||
if (drm.getMemoryInfo()) {
|
||||
ret = drm.getMemoryInfo()->createGemExtWithSingleRegion(allocationData.storageInfo.getMemoryBanks(), bufferSize, handle, patIndex, -1, allocationData.flags.isUSMHostAllocation);
|
||||
}
|
||||
|
||||
if (0 != ret) {
|
||||
auto ioctlHelper = drm.getIoctlHelper();
|
||||
handle = ioctlHelper->createGem(bufferSize, static_cast<uint32_t>(allocationData.storageInfo.memoryBanks.to_ulong()));
|
||||
}
|
||||
|
||||
std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount));
|
||||
bo->setAddress(gpuRange);
|
||||
|
||||
|
||||
@@ -1231,7 +1231,7 @@ uint64_t Drm::getPatIndex(Gmm *gmm, AllocationType allocationType, CacheRegion c
|
||||
}
|
||||
|
||||
uint64_t patIndex = rootDeviceEnvironment.getGmmClientContext()->cachePolicyGetPATIndex(resourceInfo, usageType, compressed, cachable);
|
||||
patIndex = productHelper.overridePatIndex(isUncachedType, patIndex, allocationType);
|
||||
patIndex = productHelper.overridePatIndex(isUncachedType, patIndex);
|
||||
|
||||
UNRECOVERABLE_IF(patIndex == static_cast<uint64_t>(GMM_PAT_ERROR));
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class ProductHelper {
|
||||
virtual bool isSkippingStatefulInformationRequired(const KernelDescriptor &kernelDescriptor) const = 0;
|
||||
virtual bool getMediaFrequencyTileIndex(const ReleaseHelper *releaseHelper, uint32_t &tileIndex) const = 0;
|
||||
virtual bool isResolvingSubDeviceIDNeeded(const ReleaseHelper *releaseHelper) const = 0;
|
||||
virtual uint64_t overridePatIndex(bool isUncachedType, uint64_t patIndex, AllocationType allocationType) const = 0;
|
||||
virtual uint64_t overridePatIndex(bool isUncachedType, uint64_t patIndex) const = 0;
|
||||
virtual std::vector<uint32_t> getSupportedNumGrfs(const ReleaseHelper *releaseHelper) const = 0;
|
||||
virtual aub_stream::EngineType getDefaultCopyEngine() const = 0;
|
||||
virtual void adjustEngineGroupType(EngineGroupType &engineGroupType) const = 0;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "shared/source/helpers/local_memory_access_modes.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/source/kernel/kernel_properties.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
@@ -839,7 +838,7 @@ bool ProductHelperHw<gfxProduct>::isResolvingSubDeviceIDNeeded(const ReleaseHelp
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(bool isUncachedType, uint64_t patIndex, AllocationType allocationType) const {
|
||||
uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(bool isUncachedType, uint64_t patIndex) const {
|
||||
return patIndex;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class ProductHelperHw : public ProductHelper {
|
||||
bool isSkippingStatefulInformationRequired(const KernelDescriptor &kernelDescriptor) const override;
|
||||
bool getMediaFrequencyTileIndex(const ReleaseHelper *releaseHelper, uint32_t &tileIndex) const override;
|
||||
bool isResolvingSubDeviceIDNeeded(const ReleaseHelper *releaseHelper) const override;
|
||||
uint64_t overridePatIndex(bool isUncachedType, uint64_t patIndex, AllocationType allocationType) const override;
|
||||
uint64_t overridePatIndex(bool isUncachedType, uint64_t patIndex) const override;
|
||||
std::vector<uint32_t> getSupportedNumGrfs(const ReleaseHelper *releaseHelper) const override;
|
||||
aub_stream::EngineType getDefaultCopyEngine() const override;
|
||||
void adjustEngineGroupType(EngineGroupType &engineGroupType) const override;
|
||||
|
||||
Reference in New Issue
Block a user