Revert "Add support for cooperative kernels to immediate command lists"
This reverts commit fc72de1168
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
d7eacc0280
commit
d0d1514f7a
|
@ -99,9 +99,9 @@ struct CommandList : _ze_command_list_handle_t {
|
||||||
const CmdListKernelLaunchParams &launchParams) = 0;
|
const CmdListKernelLaunchParams &launchParams) = 0;
|
||||||
virtual ze_result_t appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
virtual ze_result_t appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
||||||
const ze_group_count_t *launchKernelArgs,
|
const ze_group_count_t *launchKernelArgs,
|
||||||
ze_event_handle_t signalEvent,
|
ze_event_handle_t hSignalEvent,
|
||||||
uint32_t numWaitEvents,
|
uint32_t numWaitEvents,
|
||||||
ze_event_handle_t *waitEventHandles) = 0;
|
ze_event_handle_t *phWaitEvents) = 0;
|
||||||
virtual ze_result_t appendLaunchKernelIndirect(ze_kernel_handle_t kernelHandle,
|
virtual ze_result_t appendLaunchKernelIndirect(ze_kernel_handle_t kernelHandle,
|
||||||
const ze_group_count_t *pDispatchArgumentsBuffer,
|
const ze_group_count_t *pDispatchArgumentsBuffer,
|
||||||
ze_event_handle_t hEvent, uint32_t numWaitEvents,
|
ze_event_handle_t hEvent, uint32_t numWaitEvents,
|
||||||
|
|
|
@ -88,9 +88,9 @@ struct CommandListCoreFamily : CommandListImp {
|
||||||
const CmdListKernelLaunchParams &launchParams) override;
|
const CmdListKernelLaunchParams &launchParams) override;
|
||||||
ze_result_t appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
ze_result_t appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
||||||
const ze_group_count_t *launchKernelArgs,
|
const ze_group_count_t *launchKernelArgs,
|
||||||
ze_event_handle_t signalEvent,
|
ze_event_handle_t hSignalEvent,
|
||||||
uint32_t numWaitEvents,
|
uint32_t numWaitEvents,
|
||||||
ze_event_handle_t *waitEventHandles) override;
|
ze_event_handle_t *phWaitEvents) override;
|
||||||
ze_result_t appendLaunchKernelIndirect(ze_kernel_handle_t kernelHandle,
|
ze_result_t appendLaunchKernelIndirect(ze_kernel_handle_t kernelHandle,
|
||||||
const ze_group_count_t *pDispatchArgumentsBuffer,
|
const ze_group_count_t *pDispatchArgumentsBuffer,
|
||||||
ze_event_handle_t hEvent, uint32_t numWaitEvents,
|
ze_event_handle_t hEvent, uint32_t numWaitEvents,
|
||||||
|
|
|
@ -253,18 +253,18 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernel(ze_kernel_h
|
||||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||||
ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
||||||
const ze_group_count_t *launchKernelArgs,
|
const ze_group_count_t *launchKernelArgs,
|
||||||
ze_event_handle_t signalEvent,
|
ze_event_handle_t hSignalEvent,
|
||||||
uint32_t numWaitEvents,
|
uint32_t numWaitEvents,
|
||||||
ze_event_handle_t *waitEventHandles) {
|
ze_event_handle_t *phWaitEvents) {
|
||||||
|
|
||||||
ze_result_t ret = addEventsToCmdList(numWaitEvents, waitEventHandles);
|
ze_result_t ret = addEventsToCmdList(numWaitEvents, phWaitEvents);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Event *event = nullptr;
|
Event *event = nullptr;
|
||||||
if (signalEvent) {
|
if (hSignalEvent) {
|
||||||
event = Event::fromHandle(signalEvent);
|
event = Event::fromHandle(hSignalEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
CmdListKernelLaunchParams launchParams = {};
|
CmdListKernelLaunchParams launchParams = {};
|
||||||
|
|
|
@ -118,12 +118,6 @@ struct CommandListCoreFamilyImmediate : public CommandListCoreFamily<gfxCoreFami
|
||||||
uint32_t numWaitEvents,
|
uint32_t numWaitEvents,
|
||||||
ze_event_handle_t *phWaitEvents) override;
|
ze_event_handle_t *phWaitEvents) override;
|
||||||
|
|
||||||
ze_result_t appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
|
||||||
const ze_group_count_t *launchKernelArgs,
|
|
||||||
ze_event_handle_t signalEvent,
|
|
||||||
uint32_t numWaitEvents,
|
|
||||||
ze_event_handle_t *waitEventHandles) override;
|
|
||||||
|
|
||||||
MOCKABLE_VIRTUAL ze_result_t executeCommandListImmediateWithFlushTask(bool performMigration);
|
MOCKABLE_VIRTUAL ze_result_t executeCommandListImmediateWithFlushTask(bool performMigration);
|
||||||
|
|
||||||
void checkAvailableSpace();
|
void checkAvailableSpace();
|
||||||
|
|
|
@ -458,19 +458,6 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryRangesBar
|
||||||
return flushImmediate(ret, true);
|
return flushImmediate(ret, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
|
||||||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendLaunchCooperativeKernel(ze_kernel_handle_t kernelHandle,
|
|
||||||
const ze_group_count_t *launchKernelArgs,
|
|
||||||
ze_event_handle_t signalEvent,
|
|
||||||
uint32_t numWaitEvents,
|
|
||||||
ze_event_handle_t *waitEventHandles) {
|
|
||||||
if (this->isFlushTaskSubmissionEnabled) {
|
|
||||||
checkAvailableSpace();
|
|
||||||
}
|
|
||||||
auto ret = CommandListCoreFamily<gfxCoreFamily>::appendLaunchCooperativeKernel(kernelHandle, launchKernelArgs, signalEvent, numWaitEvents, waitEventHandles);
|
|
||||||
return flushImmediate(ret, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::flushImmediate(ze_result_t inputRet, bool performMigration) {
|
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::flushImmediate(ze_result_t inputRet, bool performMigration) {
|
||||||
if (inputRet == ZE_RESULT_SUCCESS) {
|
if (inputRet == ZE_RESULT_SUCCESS) {
|
||||||
|
|
|
@ -180,9 +180,9 @@ struct MockCommandList : public CommandList {
|
||||||
ADDMETHOD_NOBASE(appendLaunchCooperativeKernel, ze_result_t, ZE_RESULT_SUCCESS,
|
ADDMETHOD_NOBASE(appendLaunchCooperativeKernel, ze_result_t, ZE_RESULT_SUCCESS,
|
||||||
(ze_kernel_handle_t kernelHandle,
|
(ze_kernel_handle_t kernelHandle,
|
||||||
const ze_group_count_t *launchKernelArgs,
|
const ze_group_count_t *launchKernelArgs,
|
||||||
ze_event_handle_t signalEvent,
|
ze_event_handle_t hSignalEvent,
|
||||||
uint32_t numWaitEvents,
|
uint32_t numWaitEvents,
|
||||||
ze_event_handle_t *waitEventHandles));
|
ze_event_handle_t *phWaitEvents));
|
||||||
|
|
||||||
ADDMETHOD_NOBASE(appendLaunchKernelIndirect, ze_result_t, ZE_RESULT_SUCCESS,
|
ADDMETHOD_NOBASE(appendLaunchKernelIndirect, ze_result_t, ZE_RESULT_SUCCESS,
|
||||||
(ze_kernel_handle_t kernelHandle,
|
(ze_kernel_handle_t kernelHandle,
|
||||||
|
|
|
@ -784,41 +784,5 @@ HWTEST_F(CommandListAppendLaunchKernel, givenInvalidEventListWhenAppendLaunchCoo
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, returnValue);
|
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, returnValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(CommandListAppendLaunchKernel, givenImmediateCommandListWhenAppendLaunchCooperativeKernelUsingFlushTaskThenExpectCorrectExecuteCall, IsAtLeastSkl) {
|
|
||||||
createKernel();
|
|
||||||
|
|
||||||
MockCommandListImmediateHw<gfxCoreFamily> cmdList;
|
|
||||||
cmdList.isFlushTaskSubmissionEnabled = true;
|
|
||||||
cmdList.cmdListType = CommandList::CommandListType::TYPE_IMMEDIATE;
|
|
||||||
cmdList.csr = device->getNEODevice()->getDefaultEngine().commandStreamReceiver;
|
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
|
||||||
|
|
||||||
ze_group_count_t groupCount{1, 1, 1};
|
|
||||||
ze_result_t returnValue;
|
|
||||||
|
|
||||||
returnValue = cmdList.appendLaunchCooperativeKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
|
|
||||||
EXPECT_EQ(0u, cmdList.executeCommandListImmediateCalledCount);
|
|
||||||
EXPECT_EQ(1u, cmdList.executeCommandListImmediateWithFlushTaskCalledCount);
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(CommandListAppendLaunchKernel, givenImmediateCommandListWhenAppendLaunchCooperativeKernelNotUsingFlushTaskThenExpectCorrectExecuteCall, IsAtLeastSkl) {
|
|
||||||
createKernel();
|
|
||||||
|
|
||||||
MockCommandListImmediateHw<gfxCoreFamily> cmdList;
|
|
||||||
cmdList.isFlushTaskSubmissionEnabled = false;
|
|
||||||
cmdList.cmdListType = CommandList::CommandListType::TYPE_IMMEDIATE;
|
|
||||||
cmdList.csr = device->getNEODevice()->getDefaultEngine().commandStreamReceiver;
|
|
||||||
cmdList.initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
|
|
||||||
|
|
||||||
ze_group_count_t groupCount{1, 1, 1};
|
|
||||||
ze_result_t returnValue;
|
|
||||||
|
|
||||||
returnValue = cmdList.appendLaunchCooperativeKernel(kernel->toHandle(), &groupCount, nullptr, 0, nullptr);
|
|
||||||
EXPECT_EQ(1u, cmdList.executeCommandListImmediateCalledCount);
|
|
||||||
EXPECT_EQ(0u, cmdList.executeCommandListImmediateWithFlushTaskCalledCount);
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|
Loading…
Reference in New Issue