mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
In the old exporter we allow users to define a symbolic() method to bypass JIT tracing for a block of logic. We can allow users to do similar things by creating symbolic ops at export. This PR implements `torch.onnx.ops.symbolic` and `torch.onnx.ops.symbolic_multi_out` to allow users to create onnx nodes symbolically with pt2 & fx. The custom pytorch ops were designed such that the attributes are encoded to be part of a valid fx op. Users provide shape and dtype for the meta function to produce the currect fake tensor during export. An example is  Pull Request resolved: https://github.com/pytorch/pytorch/pull/148905 Approved by: https://github.com/titaiwangms
12 lines
179 B
ReStructuredText
12 lines
179 B
ReStructuredText
torch.onnx.ops
|
|
==============
|
|
|
|
.. automodule:: torch.onnx.ops
|
|
|
|
Operators
|
|
---------
|
|
|
|
.. autofunction:: torch.onnx.ops.symbolic
|
|
|
|
.. autofunction:: torch.onnx.ops.symbolic_multi_out
|