mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Refactor support for L0 scheduling hints (XE_HP and later)
Make sure STATE_COMPUTE_MODE is updated when passing the scheduling hint for a kernel. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3b7fbef826
commit
06a4d2cc02
@@ -57,6 +57,30 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithIndirectAllocationsNotAll
|
||||
ASSERT_FALSE(commandList->hasIndirectAllocationsAllowed());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithOldestFirstThreadArbitrationPolicySetUsingSchedulingHintExtensionThenCorrectInternalPolicyIsReturned) {
|
||||
createKernel();
|
||||
ze_scheduling_hint_exp_desc_t pHint{};
|
||||
pHint.flags = ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST;
|
||||
kernel->setSchedulingHintExp(&pHint);
|
||||
ASSERT_EQ(kernel->getSchedulingHintExp(), NEO::ThreadArbitrationPolicy::AgeBased);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithRRThreadArbitrationPolicySetUsingSchedulingHintExtensionThenCorrectInternalPolicyIsReturned) {
|
||||
createKernel();
|
||||
ze_scheduling_hint_exp_desc_t pHint{};
|
||||
pHint.flags = ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN;
|
||||
kernel->setSchedulingHintExp(&pHint);
|
||||
ASSERT_EQ(kernel->getSchedulingHintExp(), NEO::ThreadArbitrationPolicy::RoundRobin);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithStallRRThreadArbitrationPolicySetUsingSchedulingHintExtensionThenCorrectInternalPolicyIsReturned) {
|
||||
createKernel();
|
||||
ze_scheduling_hint_exp_desc_t pHint{};
|
||||
pHint.flags = ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN;
|
||||
kernel->setSchedulingHintExp(&pHint);
|
||||
ASSERT_EQ(kernel->getSchedulingHintExp(), NEO::ThreadArbitrationPolicy::RoundRobinAfterDependency);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithThreadArbitrationPolicySetUsingSchedulingHintExtensionTheSameFlagIsUsedToSetCmdListThreadArbitrationPolicy) {
|
||||
createKernel();
|
||||
ze_scheduling_hint_exp_desc_t *pHint = new ze_scheduling_hint_exp_desc_t;
|
||||
@@ -70,7 +94,7 @@ HWTEST_F(CommandListAppendLaunchKernel, givenKernelWithThreadArbitrationPolicySe
|
||||
auto result = commandList->appendLaunchKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
ASSERT_EQ(commandList->threadArbitrationPolicy, pHint->flags);
|
||||
ASSERT_EQ(commandList->threadArbitrationPolicy, NEO::ThreadArbitrationPolicy::RoundRobin);
|
||||
delete (pHint);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user