2019-05-16 15:52:28 +08:00
|
|
|
/*
|
2019-12-23 21:28:33 +08:00
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
2019-05-16 15:52:28 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
|
|
|
#include "shared/source/helpers/hw_helper_base.inl"
|
2019-05-16 15:52:28 +08:00
|
|
|
|
|
|
|
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>
|
|
|
|
bool HwHelperHw<GfxFamily>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-08-22 21:21:02 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::hvAlign4Required() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-05-16 15:52:28 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::timestampPacketWriteSupported() const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-21 22:25:04 +08:00
|
|
|
const HwHelper::EngineInstancesContainer HwHelperHw<GfxFamily>::getGpgpuEngineInstances(const HardwareInfo &hwInfo) const {
|
|
|
|
return {aub_stream::ENGINE_RCS,
|
|
|
|
aub_stream::ENGINE_RCS, // low priority
|
|
|
|
aub_stream::ENGINE_RCS}; // internal usage
|
2019-05-16 15:52:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
std::string HwHelperHw<GfxFamily>::getExtensions() const {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2019-08-26 19:02:47 +08:00
|
|
|
template <typename GfxFamily>
|
2020-02-04 19:13:57 +08:00
|
|
|
uint32_t HwHelperHw<GfxFamily>::getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const {
|
2019-08-26 19:02:47 +08:00
|
|
|
if (l3enabled) {
|
|
|
|
return gmmHelper.getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) >> 1;
|
|
|
|
}
|
|
|
|
return gmmHelper.getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED) >> 1;
|
|
|
|
}
|
|
|
|
|
2019-11-08 01:49:46 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::calculateAvailableThreadCount(PRODUCT_FAMILY family, uint32_t grfCount, uint32_t euCount,
|
|
|
|
uint32_t threadsPerEu) {
|
|
|
|
return threadsPerEu * euCount;
|
|
|
|
}
|
|
|
|
|
2020-03-25 20:06:45 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::isIndependentForwardProgressSupported() {
|
|
|
|
return true;
|
|
|
|
}
|
2020-04-21 18:51:00 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
uint64_t HwHelperHw<GfxFamily>::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const {
|
|
|
|
return static_cast<uint64_t>(timeStamp * frequency);
|
|
|
|
}
|
2020-03-25 20:06:45 +08:00
|
|
|
|
2020-02-08 05:48:09 +08:00
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
void MemorySynchronizationCommands<GfxFamily>::addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
2020-02-08 05:48:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
void MemorySynchronizationCommands<GfxFamily>::setExtraPipeControlProperties(PIPE_CONTROL &pipeControl, const HardwareInfo &hwInfo) {
|
2020-02-08 05:48:09 +08:00
|
|
|
}
|
|
|
|
|
2020-02-10 18:02:21 +08:00
|
|
|
template <typename GfxFamily>
|
2020-04-09 00:33:03 +08:00
|
|
|
void MemorySynchronizationCommands<GfxFamily>::setExtraCacheFlushFields(PIPE_CONTROL &pipeControl) {
|
2020-02-10 18:02:21 +08:00
|
|
|
}
|
|
|
|
|
2019-05-16 15:52:28 +08:00
|
|
|
} // namespace NEO
|