Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a ONNX to ONNX Script code generator based on libcst #873

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 13, 2023

  1. Implement a ONNX to ONNX Script code generator based on libcst

    - Adds some general codegen utilities based on libcst
    
    - Implements an ONNX to ONNX Script generator: the base converter
      produces ONNX Script that is very 1:1 with the structure of ONNX,
      and transformers are implemented to raise the generated code to
      more idiomatic Python that ONNX Script supports; this commit
      provides support for raising to Python binary operators and raising
      Constant/make_tensor to supported Python constants; more transformers
      need to be implemented, but this commit can be used as a guide.
    
    - Adds a new top-level command line interface, allowing the code
      generator to be invoked:
    
      python -m onnxscript convert model.onnx
    abock committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    99a2f51 View commit details
    Browse the repository at this point in the history