mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Move allowStatelessCompression from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com> Related-To: NEO-4541
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
09e8bc4eda
commit
bbfbf19a02
@@ -2485,8 +2485,8 @@ void Kernel::fillWithKernelObjsForAuxTranslation(KernelObjsForAuxTranslation &ke
|
||||
}
|
||||
}
|
||||
}
|
||||
auto &hwHelper = HwHelper::get(getDevice().getHardwareInfo().platform.eRenderCoreFamily);
|
||||
if (hwHelper.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily);
|
||||
if (hwInfoConfig.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||
for (auto gfxAllocation : kernelUnifiedMemoryGfxAllocations) {
|
||||
if ((gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) ||
|
||||
(gfxAllocation->getAllocationType() == GraphicsAllocation::AllocationType::SVM_GPU)) {
|
||||
@@ -2806,8 +2806,8 @@ bool Kernel::requiresLimitedWorkgroupSize() const {
|
||||
}
|
||||
|
||||
void Kernel::updateAuxTranslationRequired() {
|
||||
auto &hwHelper = HwHelper::get(getDevice().getHardwareInfo().platform.eRenderCoreFamily);
|
||||
if (hwHelper.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily);
|
||||
if (hwInfoConfig.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||
if (hasDirectStatelessAccessToHostMemory() || hasIndirectStatelessAccessToHostMemory()) {
|
||||
setAuxTranslationRequired(true);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/memory_manager/compression_selector.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
bool CompressionSelector::preferRenderCompressedBuffer(const AllocationProperties &properties, const HardwareInfo &hwInfo) {
|
||||
@@ -17,8 +17,8 @@ bool CompressionSelector::preferRenderCompressedBuffer(const AllocationPropertie
|
||||
case GraphicsAllocation::AllocationType::CONSTANT_SURFACE:
|
||||
case GraphicsAllocation::AllocationType::SVM_GPU:
|
||||
case GraphicsAllocation::AllocationType::PRINTF_SURFACE: {
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
return hwHelper.allowStatelessCompression(hwInfo);
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
return hwInfoConfig.allowStatelessCompression(hwInfo);
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/program/print_formatter.h"
|
||||
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
@@ -77,8 +78,8 @@ void PrintfHandler::makeResident(CommandStreamReceiver &commandStreamReceiver) {
|
||||
}
|
||||
|
||||
void PrintfHandler::printEnqueueOutput() {
|
||||
auto &helper = HwHelper::get(device.getHardwareInfo().platform.eRenderCoreFamily);
|
||||
if (helper.allowStatelessCompression(device.getHardwareInfo())) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(device.getHardwareInfo().platform.eProductFamily);
|
||||
if (hwInfoConfig.allowStatelessCompression(device.getHardwareInfo())) {
|
||||
auto printOutputSize = static_cast<uint32_t>(printfSurface->getUnderlyingBufferSize());
|
||||
auto printOutputDecompressed = std::make_unique<uint8_t[]>(printOutputSize);
|
||||
auto &bcsEngine = device.getEngine(EngineHelpers::getBcsEngineType(device.getHardwareInfo(), device.getDeviceBitfield(), device.getSelectorCopyEngine(), true), EngineUsage::Regular);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/helpers/cl_hw_helper_base.inl"
|
||||
@@ -27,7 +28,7 @@ void populateFactoryTable<ClHwHelperHw<Family>>() {
|
||||
|
||||
template <>
|
||||
bool ClHwHelperHw<Family>::requiresNonAuxMode(const ArgDescPointer &argAsPtr, const HardwareInfo &hwInfo) const {
|
||||
if (HwHelperHw<Family>::get().allowStatelessCompression(hwInfo)) {
|
||||
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->allowStatelessCompression(hwInfo)) {
|
||||
return false;
|
||||
} else {
|
||||
return !argAsPtr.isPureStateful();
|
||||
@@ -36,7 +37,7 @@ bool ClHwHelperHw<Family>::requiresNonAuxMode(const ArgDescPointer &argAsPtr, co
|
||||
|
||||
template <>
|
||||
bool ClHwHelperHw<Family>::requiresAuxResolves(const KernelInfo &kernelInfo, const HardwareInfo &hwInfo) const {
|
||||
if (HwHelperHw<Family>::get().allowStatelessCompression(hwInfo)) {
|
||||
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->allowStatelessCompression(hwInfo)) {
|
||||
return false;
|
||||
} else {
|
||||
return hasStatelessAccessToBuffer(kernelInfo);
|
||||
|
||||
Reference in New Issue
Block a user