pytorch
766889b6 - ONNX: fix bug in export of ops involving torch.bool type (#40006)

Commit
4 years ago
ONNX: fix bug in export of ops involving torch.bool type (#40006) Summary: When an op involves creating a tensor of a certain type (such as torch.ones(...)), the tracer creates a `prim::Constant` node with an integer value representing the type. The mapping from the torch type to integers maps: ``` torch.complex32 -> 8 torch.complex64 -> 9 torch.complex128 -> 10 torch.bool -> 11 ``` However, when the ONNX exporter maps back the integer to torch type, 10 is mapped to bool, 9 is mapped to complex128 and 8 is mapped to complex64. Pull Request resolved: https://github.com/pytorch/pytorch/pull/40006 Reviewed By: hl475 Differential Revision: D22158019 Pulled By: houseroad fbshipit-source-id: 42fbd6b56566017ff03382c4faf10d30ffde3802
Author
Parents
Loading