Skip to content

Add export_function and export_to_dot#591

Merged
sydneyrenee merged 1 commit intomainfrom
feature/export-ops
Mar 25, 2026
Merged

Add export_function and export_to_dot#591
sydneyrenee merged 1 commit intomainfrom
feature/export-ops

Conversation

@sydneyrenee
Copy link
Copy Markdown
Contributor

Summary

  • export_function(file, fn, args): Serialize a function trace to a file for later import via import_function
  • export_to_dot(...arrays): Render a computation graph as a Graphviz DOT format string

Closes #271 (export_function)
Closes #272 (export_to_dot)

Note: #273 (exporter class) is left open - the stateful FunctionExporter class requires ObjectWrap for proper N-API lifecycle management, which is a separate piece of work.

Test plan

  • export_function + import_function roundtrip
  • export_to_dot returns valid DOT string with digraph
  • Full suite: 241 passing, 9 pending

export_function: serialize a function trace to a file for later import.
export_to_dot: render a computation graph as a Graphviz DOT string.
@sydneyrenee sydneyrenee merged commit 93f66e7 into main Mar 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement mlx.core.export_to_dot() Implement mlx.core.export_function()

1 participant