MCPcopy Create free account
hub / github.com/XpuOS/xsched / XCommandListAppendLaunchKernel

Function XCommandListAppendLaunchKernel

platforms/levelzero/shim/src/shim.cpp:175–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175ze_result_t XCommandListAppendLaunchKernel(ze_command_list_handle_t hCommandList, ze_kernel_handle_t hKernel, const ze_group_count_t *pLaunchFuncArgs, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)
176{
177 KernelArgsManager::Instance().Freeze(hKernel);
178
179 if (ImmediateCommandListManager::Instance().Exists(hCommandList)) {
180 auto xq = HwQueueManager::GetXQueue(GetHwQueueHandle(hCommandList));
181 if (xq == nullptr) {
182 ZE_ASSERT(KernelArgsManager::Instance().Set(hKernel));
183 return Driver::CommandListAppendLaunchKernel(hCommandList, hKernel, pLaunchFuncArgs, hSignalEvent, numWaitEvents, phWaitEvents);
184 }
185 auto cmd = std::make_shared<ZeKernelCommand>(hCommandList, hKernel, pLaunchFuncArgs, hSignalEvent, numWaitEvents, phWaitEvents);
186 g_event_to_cmd.Add(hSignalEvent, cmd);
187 xq->Submit(cmd);
188 XDEBG("XCommandListAppendLaunchKernel(cmd_list: %p, kernel: %p) immediate submitted", hCommandList, hKernel);
189 return ZE_RESULT_SUCCESS;
190 }
191
192 ZE_ASSERT(KernelArgsManager::Instance().Set(hKernel));
193 return CommandListManager::Instance().Append(hCommandList, [&](ze_command_list_handle_t cmd_list) {
194 if (hSignalEvent != nullptr) g_event_to_cmdlist.Add(hSignalEvent, cmd_list);
195 return Driver::CommandListAppendLaunchKernel(cmd_list, hKernel, pLaunchFuncArgs, hSignalEvent, numWaitEvents, phWaitEvents);
196 });
197}
198
199ze_result_t XFenceDestroy(ze_fence_handle_t hFence)
200{

Callers

nothing calls this directly

Calls 7

FreezeMethod · 0.80
SubmitMethod · 0.80
AppendMethod · 0.80
GetHwQueueHandleFunction · 0.50
ExistsMethod · 0.45
SetMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected