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

Method load

mlx/export.cpp:494–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492 }
493
494 std::shared_ptr<Primitive> load(Reader& is) {
495 auto stream = resolve_stream(deserialize<Stream>(is));
496 auto name = deserialize<std::string>(is);
497 if (auto it = factory.find(name); it != factory.end()) {
498 return it->second.deserialize(is, stream);
499 } else {
500 throw std::invalid_argument(
501 "[import_function] Unable to deserialize primitive " + name);
502 }
503 };
504
505 std::pair<std::string, std::vector<StateT>> extract_state(
506 const std::shared_ptr<Primitive>& p) {

Calls 2

findMethod · 0.45
endMethod · 0.45