pytorch
04b06c96 - [ONNX] Use optional op to keep None in results for ONNX internal tests (#84789)

Commit
2 years ago
[ONNX] Use optional op to keep None in results for ONNX internal tests (#84789) All this time, PyTorch and ONNX has different strategy for None in output. And in internal test, we flatten the torch outputs to see if the rest of them matched. However, this doesn't work anymore in scripting after Optional node is introduced, since some of None would be kept. #83184 forces script module to keep all Nones from Pytorch, but in ONNX, the model only keeps the ones generated with Optional node, and deletes those meaningless None. This PR uses Optional node to keep those meaningless None in output as well, so when it comes to script module result comparison, Pytorch and ONNX should have the same amount of Nones. Pull Request resolved: https://github.com/pytorch/pytorch/pull/84789 Approved by: https://github.com/BowenBao
Author
Committer
Parents
Loading