pytorch
be0b415a - [ONNX] Set shape/type into torchscript (#96349)

Commit
1 year ago
[ONNX] Set shape/type into torchscript (#96349) Fixes https://github.com/pytorch/pytorch/pull/95676#issuecomment-1460588229 PS: It doesn't seem the exported ONNX_proto having type now. I wonder if there was a ONNX pass doing this for us (converting torch dtype to onnx dtype during exporting.) Type promotion issue would be raised with an error if we want to set type ```python onnxscript_value.dtype = expected_value.dtype ``` onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Shape inference error(s): (op_type:aten_add, node name: aten_add_1): [ShapeInferenceError] (op_type:Add, node name: n3): B has inconsistent type tensor(int64) Pull Request resolved: https://github.com/pytorch/pytorch/pull/96349 Approved by: https://github.com/justinchuby, https://github.com/wschin
Author
Committer
Parents
Loading