-
Notifications
You must be signed in to change notification settings - Fork 47
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 torchscript as a graph backend #273
Comments
1/11 meeting log:
Future consideration:
|
Just noting down a question here, hopefully our meeting later today will answer that: is the intention to have: (i) a way of building torch IR using pythonic syntax (just like onnxscript), or I am guessing it should be (i). In particular, do we ever expect core onnxscript to call the torch evaluator? I am assuming not. |
@titaiwangms for now, an aten function can be called like from onnxscript.function_libs.torch_aten import ops
ops.core.aten_add() |
ops doesn't have module core, could you check on that? I am importing |
An evaluator using onnxscript API to build graph using torchscript (we will have our own graph to replace torchscript.) works with pytorch/pytorch#92717 1. Op object triggers graph_eval instead of eval to begin op insertion for the graph (Need to figure out how to keep both functionality if they need to stay on the same API.) 2. TorchscriptEvaluator serves as a manager of input/output graph. In this demo, both of them are torchscript, so this class seems simple (should be more complicated depending on ONNX graph builder API and format requirements). 3. tensor.py is not modified because onnxscript does not really use the graph value. That is, it will only have to be compatible with graph builder type only in the future implementation. Fixes #273 --------- Co-authored-by: AllenTiTaiWang <titaiwang@microsoft.com>
To use onnxscript APIs for constructing graphs in pytorch, we would like to create a version that uses torchscript as the graph IR. To do this, we probably need
Evaluator
that callsg.op
to add ops and functions as nodesTensor
that wraps around thetorch.Value
sThe text was updated successfully, but these errors were encountered: