mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
fix: correct maxOsContextCount with multiple subdevices and context group
Related-To: NEO-12257 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bca8478bd4
commit
4c172a406d
@@ -3296,10 +3296,32 @@ HWTEST_F(EventTests, GivenEventWhenHostSynchronizeCalledThenExpectDownloadEventA
|
||||
event->destroy();
|
||||
}
|
||||
|
||||
HWTEST_F(EventTests, givenSecondaryCsrWhenDownloadingAllocationThenUseCorrectCsr) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ContextGroupSize.set(2);
|
||||
struct EventContextGroupFixture : public EventFixture<1, 0> {
|
||||
using BaseClass = EventFixture<1, 0>;
|
||||
void setUp() {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
if (hwInfo.capabilityTable.defaultEngineType != aub_stream::EngineType::ENGINE_CCS) {
|
||||
skipped = true;
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
debugManager.flags.ContextGroupSize.set(2);
|
||||
BaseClass::setUp();
|
||||
}
|
||||
|
||||
void tearDown() {
|
||||
if (!skipped) {
|
||||
BaseClass::tearDown();
|
||||
}
|
||||
}
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
bool skipped = false;
|
||||
};
|
||||
|
||||
using EventContextGroupTests = Test<EventContextGroupFixture>;
|
||||
|
||||
HWTEST_F(EventContextGroupTests, givenSecondaryCsrWhenDownloadingAllocationThenUseCorrectCsr) {
|
||||
neoDevice->getExecutionEnvironment()->calculateMaxOsContextCount();
|
||||
|
||||
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::tbx;
|
||||
@@ -3318,9 +3340,10 @@ HWTEST_F(EventTests, givenSecondaryCsrWhenDownloadingAllocationThenUseCorrectCsr
|
||||
*eventAddress = Event::STATE_INITIAL;
|
||||
|
||||
auto ultCsr = new UltCommandStreamReceiver<FamilyType>(*neoDevice->getExecutionEnvironment(), 0, 1);
|
||||
|
||||
neoDevice->secondaryCsrs.push_back(std::unique_ptr<UltCommandStreamReceiver<FamilyType>>(ultCsr));
|
||||
|
||||
OsContext osContext(0, static_cast<uint32_t>(neoDevice->getAllEngines().size() + 1), EngineDescriptorHelper::getDefaultDescriptor());
|
||||
OsContext osContext(0, static_cast<uint32_t>(neoDevice->getAllEngines().size()), EngineDescriptorHelper::getDefaultDescriptor());
|
||||
|
||||
ultCsr->setupContext(osContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user