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

Function eval

mlx/transforms.cpp:330–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void eval(std::vector<array> outputs) {
331 if (outputs.empty()) {
332 return;
333 }
334
335 if (std::none_of(outputs.begin(), outputs.end(), [](array& x) {
336 return x.status() == array::Status::unscheduled;
337 })) {
338 for (auto& x : outputs) {
339 x.wait();
340 }
341 return;
342 }
343
344 eval_impl(std::move(outputs), false).wait();
345}
346
347std::pair<std::vector<array>, std::vector<array>> vjp(
348 const std::function<std::vector<array>(const std::vector<array>&)>& fun,

Callers 1

eval_implFunction · 0.70

Calls 5

eval_implFunction · 0.85
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected