microsoft / onnxscript

ONNX Script enables developers to naturally author ONNX functions and models using a subset of Python.
https://onnxscript.ai/
MIT License
287 stars 54 forks source link

Libcst code generation #900

Open justinchuby opened 1 year ago

justinchuby commented 1 year ago
BowenBao commented 1 year ago

Let's consider this too https://github.com/microsoft/onnxscript/issues/806. And should we inline small tensors, like the one in your example for Use value_ints etc. to replace make_tensor calls?

gramalingam commented 1 year ago
  • Remove assignment and return the last expression

Since this is fairly generic, I wonder if we can just use some standard python tools as a post-processing cleanup (rather than implement it ourselves)?