| 354 | } |
| 355 | |
| 356 | Status InferenceContext::AddToQueue(CLCommandQueue* queue) { |
| 357 | if (need_manual_release_) { |
| 358 | if (prev_enqueue_start_point_.is_valid()) { |
| 359 | prev_enqueue_start_point_.Wait(); |
| 360 | } |
| 361 | RETURN_IF_ERROR(queue->EnqueueEvent(&prev_enqueue_start_point_)); |
| 362 | } |
| 363 | for (auto& node : nodes_) { |
| 364 | RETURN_IF_ERROR(node.operations[0]->AddToQueue(queue)); |
| 365 | } |
| 366 | if (need_flush_) { |
| 367 | clFlush(queue->queue()); |
| 368 | } |
| 369 | return OkStatus(); |
| 370 | } |
| 371 | |
| 372 | Status InferenceContext::Profile(ProfilingCommandQueue* queue, |
| 373 | ProfilingInfo* result) { |