Change ThreadArbitrationPolicy enum type to int32_t

Change ThreadArbitrationPolicy::NotPresent value to -1
Update initial values to ThreadArbitrationPolicy::NotPresent

Related-To: NEO-6728

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-03-07 17:00:26 +00:00
committed by Compute-Runtime-Automation
parent c612480f16
commit 80b520bc9b
46 changed files with 109 additions and 108 deletions

View File

@@ -186,7 +186,7 @@ GEN12LPTEST_F(ThreadArbitrationGen12Lp, givenPolicyWhenThreadArbitrationProgramm
PreambleHelper<FamilyType>::programThreadArbitration(&cs, ThreadArbitrationPolicy::RoundRobin);
EXPECT_EQ(0u, cs.getUsed());
EXPECT_EQ(0u, HwHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy());
EXPECT_EQ(ThreadArbitrationPolicy::AgeBased, HwHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy());
}
GEN12LPTEST_F(ThreadArbitrationGen12Lp, whenGetSupportThreadArbitrationPoliciesIsCalledThenEmptyVectorIsReturned) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -81,7 +81,7 @@ BDWTEST_F(ThreadArbitrationGen8, givenPolicyWhenThreadArbitrationProgrammedThenD
MockDevice device;
EXPECT_EQ(0u, PreambleHelper<BDWFamily>::getAdditionalCommandsSize(device));
EXPECT_EQ(0u, PreambleHelper<BDWFamily>::getThreadArbitrationCommandsSize());
EXPECT_EQ(0u, HwHelperHw<BDWFamily>::get().getDefaultThreadArbitrationPolicy());
EXPECT_EQ(ThreadArbitrationPolicy::AgeBased, HwHelperHw<BDWFamily>::get().getDefaultThreadArbitrationPolicy());
}
BDWTEST_F(ThreadArbitrationGen8, whenGetSupportThreadArbitrationPoliciesIsCalledThenEmptyVectorIsReturned) {

View File

@@ -31,7 +31,7 @@ struct UnitTestHelper {
static uint32_t getDefaultSshUsage();
static uint32_t getAppropriateThreadArbitrationPolicy(uint32_t policy);
static uint32_t getAppropriateThreadArbitrationPolicy(int32_t policy);
static auto getCoherencyTypeSupported(COHERENCY_TYPE coherencyType) -> decltype(coherencyType);

View File

@@ -13,8 +13,8 @@ bool UnitTestHelper<GfxFamily>::isPageTableManagerSupported(const HardwareInfo &
}
template <typename GfxFamily>
inline uint32_t UnitTestHelper<GfxFamily>::getAppropriateThreadArbitrationPolicy(uint32_t policy) {
return policy;
inline uint32_t UnitTestHelper<GfxFamily>::getAppropriateThreadArbitrationPolicy(int32_t policy) {
return static_cast<uint32_t>(policy);
}
template <typename GfxFamily>

View File

@@ -44,7 +44,7 @@ class MockCsrBase : public UltCommandStreamReceiver<GfxFamily> {
madeNonResidentGfxAllocations.push_back(&gfxAllocation);
}
uint32_t peekThreadArbitrationPolicy() { return static_cast<uint32_t>(this->streamProperties.stateComputeMode.threadArbitrationPolicy.value); }
int32_t peekThreadArbitrationPolicy() { return this->streamProperties.stateComputeMode.threadArbitrationPolicy.value; }
bool isMadeResident(GraphicsAllocation *gfxAllocation) {
for (GraphicsAllocation *gfxAlloc : madeResidentGfxAllocations) {

View File

@@ -174,8 +174,8 @@ LocalMemoryAccessMode HwInfoConfigHw<IGFX_UNKNOWN>::getLocalMemoryAccessMode(con
}
template <>
std::vector<uint32_t> HwInfoConfigHw<IGFX_UNKNOWN>::getKernelSupportedThreadArbitrationPolicies() {
return std::vector<uint32_t>();
std::vector<int32_t> HwInfoConfigHw<IGFX_UNKNOWN>::getKernelSupportedThreadArbitrationPolicies() {
return {};
}
template <>

View File

@@ -28,7 +28,7 @@ template <>
const uint32_t UnitTestHelper<Family>::smallestTestableSimdSize = 16;
template <>
uint32_t UnitTestHelper<Family>::getAppropriateThreadArbitrationPolicy(uint32_t policy) {
uint32_t UnitTestHelper<Family>::getAppropriateThreadArbitrationPolicy(int32_t policy) {
using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE;
switch (policy) {
case ThreadArbitrationPolicy::RoundRobin: