mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
refactor: cleanup in product helpers
Related-To: NEO-12681 Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
87277ec9e2
commit
eeeed9edd8
@@ -7,9 +7,9 @@
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/local_memory_access_modes.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/product_helper_from_xe_hpg_to_xe3.inl"
|
||||
#include "shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl"
|
||||
#include "shared/source/unified_memory/usm_memory_support.h"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
@@ -200,21 +200,6 @@ bool ProductHelperHw<gfxProduct>::isResolveDependenciesByPipeControlsSupported(c
|
||||
return enabled;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isHostUsmPoolAllocatorSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDeviceUsmPoolAllocatorSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::useLocalPreferredForCacheableBuffers() const {
|
||||
return true;
|
||||
@@ -257,19 +242,14 @@ void ProductHelperHw<gfxProduct>::adjustNumberOfCcs(HardwareInfo &hwInfo) const
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<bool> ProductHelperHw<gfxProduct>::isCoherentAllocation(uint64_t patIndex) const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDeviceUsmAllocationReuseSupported() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isHostUsmAllocationReuseSupported() const {
|
||||
return true;
|
||||
uint64_t ProductHelperHw<gfxProduct>::getHostMemCapabilitiesValue() const {
|
||||
return (UnifiedSharedMemoryFlags::access);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_arl.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ARROWLAKE;
|
||||
|
||||
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl"
|
||||
|
||||
|
||||
@@ -5,22 +5,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/driver_model_type.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/kernel/kernel_properties.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG2;
|
||||
|
||||
#include "shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl"
|
||||
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_METEORLAKE;
|
||||
|
||||
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl"
|
||||
namespace NEO {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_before_xe2.inl"
|
||||
#include "shared/source/os_interface/product_helper_from_xe_hpg_to_xe3.inl"
|
||||
#include "shared/source/os_interface/product_helper_xe_hpg_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const {
|
||||
if (isMaxThreadsForWorkgroupWARequired(hwInfo)) {
|
||||
return std::min(getMaxThreadsForWorkgroup(hwInfo, maxNumEUsPerDualSubSlice), 64u);
|
||||
}
|
||||
return getMaxThreadsForWorkgroup(hwInfo, maxNumEUsPerDualSubSlice);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,14 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_arl.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ARROWLAKE;
|
||||
|
||||
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl"
|
||||
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/kernel/kernel_properties.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG2;
|
||||
|
||||
#include "shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl"
|
||||
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
|
||||
|
||||
#include "windows_product_helper_dg2_extra.inl"
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_METEORLAKE;
|
||||
|
||||
#include "shared/source/xe_hpg_core/os_agnostic_product_helper_xe_hpg_core.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl"
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl"
|
||||
|
||||
|
||||
@@ -10,20 +10,12 @@
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/memory_manager/allocation_type.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper.inl"
|
||||
#include "shared/source/os_interface/product_helper_from_xe_hpg_to_xe3.inl"
|
||||
#include "shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
uint64_t ProductHelperHw<gfxProduct>::getHostMemCapabilitiesValue() const {
|
||||
return (UnifiedSharedMemoryFlags::access | UnifiedSharedMemoryFlags::atomicAccess);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages;
|
||||
@@ -58,31 +50,11 @@ bool ProductHelperHw<gfxProduct>::isResolveDependenciesByPipeControlsSupported(c
|
||||
return enabled;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isHostUsmPoolAllocatorSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDeviceUsmPoolAllocatorSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::overrideAllocationCacheable(const AllocationData &allocationData) const {
|
||||
return allocationData.type == AllocationType::commandBuffer;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getCommandBuffersPreallocatedPerCommandQueue() const {
|
||||
return 2u;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<GfxMemoryAllocationMethod> ProductHelperHw<gfxProduct>::getPreferredAllocationMethod(AllocationType allocationType) const {
|
||||
switch (allocationType) {
|
||||
@@ -114,12 +86,8 @@ std::optional<bool> ProductHelperHw<gfxProduct>::isCoherentAllocation(uint64_t p
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDeviceUsmAllocationReuseSupported() const {
|
||||
return true;
|
||||
bool ProductHelperHw<gfxProduct>::isTile64With3DSurfaceOnBCSSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isHostUsmAllocationReuseSupported() const {
|
||||
return true;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user