MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DispatchImplicit

Method DispatchImplicit

tensorflow/lite/delegates/gpu/cl/cl_command_queue.cc:54–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54Status CLCommandQueue::DispatchImplicit(const CLKernel& kernel, int3 grid,
55 int3 work_group_size, CLEvent* event) {
56 std::vector<size_t> local(3);
57 std::vector<size_t> global(3);
58 for (int i = 0; i < 3; ++i) {
59 local[i] = work_group_size[i];
60 global[i] = AlignByN(grid[i], work_group_size[i]);
61 }
62 cl_event resulting_event;
63 const int error_code =
64 clEnqueueNDRangeKernel(queue_, kernel.kernel(), 3, nullptr, global.data(),
65 local.data(), 0, nullptr, &resulting_event);
66 *event = CLEvent(resulting_event);
67 if (error_code != CL_SUCCESS) {
68 return UnknownError(absl::StrCat("Failed to clEnqueueNDRangeKernel - ",
69 CLErrorCodeToString(error_code)));
70 }
71 return OkStatus();
72}
73
74Status CLCommandQueue::DispatchImplicit(const CLKernel& kernel, int3 grid,
75 int3 work_group_size) {

Callers 15

AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80
AddToQueueMethod · 0.80

Calls 12

AlignByNFunction · 0.85
CLEventClass · 0.85
CLErrorCodeToStringFunction · 0.85
OkStatusFunction · 0.85
UnknownErrorFunction · 0.50
StrCatFunction · 0.50
kernelMethod · 0.45
dataMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
SetNameMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected