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

Function primitive_state

mlx/export.cpp:296–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294
295template <typename T>
296std::vector<StateT> primitive_state(const Primitive& p) {
297 std::vector<StateT> state;
298 if constexpr (has_state<T>) {
299 extract_state(static_cast<const T&>(p).state(), state);
300 }
301 return state;
302}
303
304template <typename T>
305std::shared_ptr<T> deserialize_primitive(Reader& is, Stream s) {

Callers

nothing calls this directly

Calls 2

extract_stateFunction · 0.85
stateMethod · 0.45

Tested by

no test coverage detected