diff --git a/runtime/gen8/hw_helper.cpp b/runtime/gen8/hw_helper.cpp index 8db762f962..1a4f8cb122 100644 --- a/runtime/gen8/hw_helper.cpp +++ b/runtime/gen8/hw_helper.cpp @@ -20,14 +20,11 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include "runtime/helpers/hw_helper.h" +#include "runtime/helpers/hw_helper.inl" namespace OCLRT { typedef BDWFamily Family; -// Explicitly instantiate HwHelperHw for this device family -template class HwHelperHw; - -#include "runtime/helpers/hw_helper.inl" template <> size_t HwHelperHw::getMaxBarrierRegisterPerSlice() const { @@ -39,4 +36,5 @@ bool HwHelperHw::setupPreemptionRegisters(HardwareInfo *pHwInfo, bool en return false; } +template class HwHelperHw; } // namespace OCLRT diff --git a/runtime/gen9/hw_helper.cpp b/runtime/gen9/hw_helper.cpp index e61b6edd16..62c4efedab 100644 --- a/runtime/gen9/hw_helper.cpp +++ b/runtime/gen9/hw_helper.cpp @@ -20,13 +20,11 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include "runtime/helpers/hw_helper.h" +#include "runtime/helpers/hw_helper.inl" namespace OCLRT { typedef SKLFamily Family; -template class HwHelperHw; - -#include "runtime/helpers/hw_helper.inl" template <> size_t HwHelperHw::getMaxBarrierRegisterPerSlice() const { @@ -38,4 +36,6 @@ bool HwHelperHw::setupPreemptionRegisters(HardwareInfo *pHwInfo, bool en pHwInfo->capabilityTable.whitelistedRegisters.csChicken1_0x2580 = enable; return pHwInfo->capabilityTable.whitelistedRegisters.csChicken1_0x2580; } + +template class HwHelperHw; } // namespace OCLRT diff --git a/runtime/helpers/hw_helper.inl b/runtime/helpers/hw_helper.inl index 76a640b56b..77c45d1358 100644 --- a/runtime/helpers/hw_helper.inl +++ b/runtime/helpers/hw_helper.inl @@ -22,7 +22,9 @@ #include "runtime/helpers/hw_helper.h" +namespace OCLRT { template void HwHelperHw::setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) { coherencyFlag = true; } +} // namespace OCLRT