mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 09:30:36 +08:00
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:
committed by
Compute-Runtime-Automation
parent
c612480f16
commit
80b520bc9b
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <>
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user