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

Method print_functions

mlx/export.cpp:571–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 }
570
571 void print_functions(std::ostream& os) {
572 int n = 1;
573 for (auto& [_, vec] : table) {
574 for (auto& fun : vec) {
575 auto npos = fun.inputs.size() - fun.kwarg_keys.size();
576 os << " " << n++ << ". Function with " << npos
577 << " positional inputs and " << fun.kwarg_keys.size()
578 << " keyword inputs:\n";
579 for (int j = 0; j < fun.inputs.size(); ++j) {
580 auto& in = fun.inputs[j];
581 if (j < npos) {
582 os << " " << j + 1 << ": ";
583 } else {
584 os << " \"" << fun.kwarg_keys[j - npos] << "\": ";
585 }
586 os << in.shape() << " " << in.dtype() << "\n";
587 }
588 }
589 }
590 }
591
592 private:
593 bool match(

Callers 1

operator()Method · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected