Files
compute-runtime/unit_tests/helpers/unit_test_helper.inl
Cencelewska 230d808021 Add mechanism to dynamically assign thread arbitration policy by one kernel
-use clSetKernelExecInfo with param
 CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_INTEL
 to change default value of ThreadArbitrationPolicy

Change-Id: I15d0de0840ed14687c16ae04890b662bc157de76
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2019-12-11 09:30:33 +01:00

73 lines
2.0 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
namespace NEO {
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::isL3ConfigProgrammable() {
return true;
};
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::evaluateDshUsage(size_t sizeBeforeEnqueue, size_t sizeAfterEnqueue, Kernel *kernel) {
if (sizeBeforeEnqueue != sizeAfterEnqueue) {
return true;
}
return false;
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::isPageTableManagerSupported(const HardwareInfo &hwInfo) {
return false;
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::isTimestampPacketWriteSupported() {
return false;
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::isExpectMemoryNotEqualSupported() {
return false;
}
template <typename GfxFamily>
uint32_t UnitTestHelper<GfxFamily>::getDefaultSshUsage() {
return 0;
}
template <typename GfxFamily>
inline uint32_t UnitTestHelper<GfxFamily>::getAppropriateThreadArbitrationPolicy(uint32_t policy) {
return policy;
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::evaluateGshAddressForScratchSpace(uint64_t usedScratchGpuAddress, uint64_t retrievedGshAddress) {
return usedScratchGpuAddress == retrievedGshAddress;
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
return false;
}
template <typename GfxFamily>
inline uint64_t UnitTestHelper<GfxFamily>::getMemoryAddress(const typename GfxFamily::MI_ATOMIC &atomic) {
return atomic.getMemoryAddress() | ((static_cast<uint64_t>(atomic.getMemoryAddressHigh())) << 32);
}
template <typename GfxFamily>
const bool UnitTestHelper<GfxFamily>::tiledImagesSupported = true;
template <typename GfxFamily>
const uint32_t UnitTestHelper<GfxFamily>::smallestTestableSimdSize = 8;
template <typename GfxFamily>
const AuxTranslationMode UnitTestHelper<GfxFamily>::requiredAuxTranslationMode = AuxTranslationMode::Builtin;
} // namespace NEO