MCPcopy Create free account
hub / github.com/ml-explore/mlx / commit

Method commit

mlx/backend/cuda/worker.cpp:44–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void Worker::commit(cudaStream_t stream) {
45 // Move pending tasks into tasks
46 if (pending_tasks_.empty()) {
47 return;
48 }
49 {
50 std::lock_guard lock(mtx_);
51 // Move pending tasks into ready tasks
52 worker_tasks_[++committed_batch_] = std::move(pending_tasks_);
53 }
54 signal_event_.record(stream);
55 signal_event_.wait(signal_stream_);
56 CHECK_CUDA_ERROR(cudaLaunchHostFunc(signal_stream_, signal, this));
57}
58
59void Worker::thread_fn() {
60 while (!stop_) {

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected