Extract functions to aub_helper_bdw_plus.inl, helpers/hw_helper_bdw_plus.inl

Change-Id: Ic3857a8cbebb7a7e16eebc25fbd0244f4605c0a8
Related-To: NEO-3016
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2019-05-16 09:52:28 +02:00
committed by sys_ocldev
parent ab183b13a0
commit 9ef2f4b3ee
10 changed files with 107 additions and 84 deletions

View File

@@ -10,8 +10,10 @@ set(RUNTIME_SRCS_AUB
${CMAKE_CURRENT_SOURCE_DIR}/aub_center.h
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/aub_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper.inl
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_base.inl
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_bdw_plus.inl
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_add_mmio.cpp
)
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_AUB})
set_property(GLOBAL PROPERTY RUNTIME_SRCS_AUB ${RUNTIME_SRCS_AUB})
add_subdirectories()

View File

@@ -1,31 +1,15 @@
/*
* Copyright (C) 2018-2019 Intel Corporation
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/aub/aub_helper.h"
#include "runtime/aub_mem_dump/aub_mem_dump.h"
namespace NEO {
template <typename Family>
int AubHelperHw<Family>::getDataHintForPml4Entry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename Family>
int AubHelperHw<Family>::getDataHintForPdpEntry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename Family>
int AubHelperHw<Family>::getDataHintForPdEntry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename Family>
int AubHelperHw<Family>::getDataHintForPtEntry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename Family>
int AubHelperHw<Family>::getMemTraceForPml4Entry() const {
if (localMemoryEnabled) {

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/aub/aub_helper_base.inl"
namespace NEO {
template <typename GfxFamily>
int AubHelperHw<GfxFamily>::getDataHintForPml4Entry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename GfxFamily>
int AubHelperHw<GfxFamily>::getDataHintForPdpEntry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename GfxFamily>
int AubHelperHw<GfxFamily>::getDataHintForPdEntry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
template <typename GfxFamily>
int AubHelperHw<GfxFamily>::getDataHintForPtEntry() const {
return AubMemDump::DataTypeHintValues::TraceNotype;
}
} // namespace NEO

View File

@@ -5,11 +5,9 @@
*
*/
#include "runtime/aub/aub_helper.h"
#include "runtime/aub/aub_helper.inl"
#include "runtime/aub/aub_helper_bdw_plus.inl"
#include "runtime/helpers/flat_batch_buffer_helper_hw.inl"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/hw_helper_common.inl"
#include "runtime/helpers/hw_helper_bdw_plus.inl"
namespace NEO {
typedef CNLFamily Family;

View File

@@ -5,11 +5,9 @@
*
*/
#include "runtime/aub/aub_helper.h"
#include "runtime/aub/aub_helper.inl"
#include "runtime/aub/aub_helper_bdw_plus.inl"
#include "runtime/helpers/flat_batch_buffer_helper_hw.inl"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/hw_helper_common.inl"
#include "runtime/helpers/hw_helper_bdw_plus.inl"
namespace NEO {
typedef ICLFamily Family;

View File

@@ -5,11 +5,9 @@
*
*/
#include "runtime/aub/aub_helper.h"
#include "runtime/aub/aub_helper.inl"
#include "runtime/aub/aub_helper_bdw_plus.inl"
#include "runtime/helpers/flat_batch_buffer_helper_hw.inl"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/hw_helper_common.inl"
#include "runtime/helpers/hw_helper_bdw_plus.inl"
#include "runtime/memory_manager/memory_constants.h"
namespace NEO {

View File

@@ -5,11 +5,9 @@
*
*/
#include "runtime/aub/aub_helper.h"
#include "runtime/aub/aub_helper.inl"
#include "runtime/aub/aub_helper_bdw_plus.inl"
#include "runtime/helpers/flat_batch_buffer_helper_hw.inl"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/hw_helper_common.inl"
#include "runtime/helpers/hw_helper_bdw_plus.inl"
namespace NEO {
typedef SKLFamily Family;

View File

@@ -49,7 +49,8 @@ set(RUNTIME_SRCS_HELPERS_BASE
${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.h
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_common.inl
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_base.inl
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_bdw_plus.inl
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
${CMAKE_CURRENT_SOURCE_DIR}/kernel_commands.h

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -19,20 +19,6 @@
namespace NEO {
template <typename Family>
void HwHelperHw<Family>::setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) {
coherencyFlag = true;
}
template <typename Family>
void HwHelperHw<Family>::adjustDefaultEngineType(HardwareInfo *pHwInfo) {
}
template <typename Family>
bool HwHelperHw<Family>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const {
return false;
}
template <typename Family>
bool HwHelperHw<Family>::obtainRenderBufferCompressionPreference(const size_t size) const {
return size > KB;
@@ -48,12 +34,6 @@ void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, c
caps->isStatelesToStatefullWithOffsetSupported = true;
}
template <typename Family>
uint32_t HwHelperHw<Family>::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const {
return pHwInfo->gtSystemInfo.MaxSubSlicesSupported * pHwInfo->gtSystemInfo.MaxEuPerSubSlice *
pHwInfo->gtSystemInfo.ThreadCount / pHwInfo->gtSystemInfo.EUCount;
}
template <typename Family>
SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) {
if (!debuggingActive) {
@@ -62,11 +42,6 @@ SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) {
return SipKernelType::DbgCsr;
}
template <typename Family>
uint32_t HwHelperHw<Family>::getConfigureAddressSpaceMode() {
return 0u;
}
template <typename Family>
bool HwHelperHw<Family>::setupPreemptionRegisters(HardwareInfo *pHwInfo, bool enable) {
return enable;
@@ -87,16 +62,6 @@ bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo)
return false;
}
template <typename Family>
bool HwHelperHw<Family>::supportsYTiling() const {
return true;
}
template <typename Family>
bool HwHelperHw<Family>::timestampPacketWriteSupported() const {
return false;
}
template <typename GfxFamily>
inline void HwHelperHw<GfxFamily>::checkResourceCompatibility(Buffer *buffer, cl_int &errorCode) {
}
@@ -172,13 +137,6 @@ size_t HwHelperHw<Family>::getScratchSpaceOffsetFor64bit() {
return 4096;
}
template <typename Family>
const std::vector<aub_stream::EngineType> HwHelperHw<Family>::getGpgpuEngineInstances() const {
constexpr std::array<aub_stream::EngineType, 2> gpgpuEngineInstances = {{aub_stream::ENGINE_RCS,
aub_stream::ENGINE_RCS}}; // low priority
return std::vector<aub_stream::EngineType>(gpgpuEngineInstances.begin(), gpgpuEngineInstances.end());
}
template <typename Family>
bool HwHelperHw<Family>::getEnableLocalMemory(const HardwareInfo &hwInfo) const {
if (DebugManager.flags.EnableLocalMemory.get() != -1) {
@@ -190,11 +148,6 @@ bool HwHelperHw<Family>::getEnableLocalMemory(const HardwareInfo &hwInfo) const
return OSInterface::osEnableLocalMemory && isLocalMemoryEnabled(hwInfo);
}
template <typename Family>
std::string HwHelperHw<Family>::getExtensions() const {
return "";
}
template <typename Family>
typename Family::PIPE_CONTROL *PipeControlHelper<Family>::obtainPipeControlAndProgramPostSyncOperation(LinearStream *commandStream,
POST_SYNC_OPERATION operation,

View File

@@ -0,0 +1,59 @@
/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/hw_helper_base.inl"
namespace NEO {
template <typename GfxFamily>
void HwHelperHw<GfxFamily>::adjustDefaultEngineType(HardwareInfo *pHwInfo) {
}
template <typename GfxFamily>
uint32_t HwHelperHw<GfxFamily>::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const {
return pHwInfo->gtSystemInfo.MaxSubSlicesSupported * pHwInfo->gtSystemInfo.MaxEuPerSubSlice *
pHwInfo->gtSystemInfo.ThreadCount / pHwInfo->gtSystemInfo.EUCount;
}
template <typename GfxFamily>
void HwHelperHw<GfxFamily>::setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) {
coherencyFlag = true;
}
template <typename GfxFamily>
uint32_t HwHelperHw<GfxFamily>::getConfigureAddressSpaceMode() {
return 0u;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const {
return false;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::supportsYTiling() const {
return true;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::timestampPacketWriteSupported() const {
return false;
}
template <typename GfxFamily>
const std::vector<aub_stream::EngineType> HwHelperHw<GfxFamily>::getGpgpuEngineInstances() const {
constexpr std::array<aub_stream::EngineType, 2> gpgpuEngineInstances = {{aub_stream::ENGINE_RCS,
aub_stream::ENGINE_RCS}}; // low priority
return std::vector<aub_stream::EngineType>(gpgpuEngineInstances.begin(), gpgpuEngineInstances.end());
}
template <typename GfxFamily>
std::string HwHelperHw<GfxFamily>::getExtensions() const {
return "";
}
} // namespace NEO