|
9 | 9 | #include "shared/source/gmm_helper/gmm_helper.h" |
10 | 10 | #include "shared/source/helpers/compiler_product_helper.h" |
11 | 11 | #include "shared/source/memory_manager/internal_allocation_storage.h" |
| 12 | +#include "shared/test/common/cmd_parse/hw_parse.h" |
12 | 13 | #include "shared/test/common/helpers/relaxed_ordering_commands_helper.h" |
13 | 14 | #include "shared/test/common/libult/ult_command_stream_receiver.h" |
14 | 15 | #include "shared/test/common/mocks/mock_direct_submission_hw.h" |
@@ -967,6 +968,29 @@ HWTEST2_F(CopyOffloadInOrderTests, givenProfilingEventWithRelaxedOrderingWhenApp |
967 | 968 | } |
968 | 969 | } |
969 | 970 |
|
| 971 | +HWCMDTEST_F(IGFX_XE_HP_CORE, CopyOffloadInOrderTests, givenCrossEngineDependencyWhenComputeWorkSubmittedThenUseSemaphore) { |
| 972 | + debugManager.flags.OverrideCopyOffloadMode.set(CopyOffloadModes::dualStream); |
| 973 | + |
| 974 | + uint32_t counterOffset = 64; |
| 975 | + |
| 976 | + auto immCmdList = createImmCmdListWithOffload<FamilyType::gfxCoreFamily>(); |
| 977 | + immCmdList->inOrderExecInfo->setAllocationOffset(counterOffset); |
| 978 | + |
| 979 | + auto cmdStream = immCmdList->getCmdContainer().getCommandStream(); |
| 980 | + |
| 981 | + immCmdList->appendMemoryCopy(©Data1, ©Data2, 1, nullptr, 0, nullptr, copyParams); |
| 982 | + EXPECT_TRUE(immCmdList->latestFlushIsDualCopyOffload); |
| 983 | + |
| 984 | + auto offset = cmdStream->getUsed(); |
| 985 | + |
| 986 | + immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams); |
| 987 | + |
| 988 | + auto hwCmds = HardwareParse::parseCommandBuffer<FamilyType>(*cmdStream, offset); |
| 989 | + |
| 990 | + auto itor = find<typename FamilyType::MI_SEMAPHORE_WAIT *>(hwCmds.begin(), hwCmds.end()); |
| 991 | + EXPECT_NE(hwCmds.end(), itor); |
| 992 | +} |
| 993 | + |
970 | 994 | HWTEST2_F(CopyOffloadInOrderTests, givenAtomicSignalingModeWhenUpdatingCounterThenUseCorrectHwCommands, IsAtLeastXe2HpgCore) { |
971 | 995 | using MI_ATOMIC = typename FamilyType::MI_ATOMIC; |
972 | 996 | using ATOMIC_OPCODES = typename FamilyType::MI_ATOMIC::ATOMIC_OPCODES; |
|
0 commit comments