pytorch
9d389b1d - [ONNX] Preprocess index_put with bool inputs to masked_scatter/masked_fill (#45584)

Commit
5 years ago
[ONNX] Preprocess index_put with bool inputs to masked_scatter/masked_fill (#45584) Summary: When the input to an indexing operation is a boolean, for example array[True] = value, the subsequent index_put node formed needs to be converted to masked_scatter/masked_fill node based on the type of val the indexing node is equated. If that value is just a single scalar, then we use the masked_fill functionality and if value is a tensor of appropriate size, we use the masked_scatter functionality. Fixes https://github.com/pytorch/pytorch/issues/34054 Pull Request resolved: https://github.com/pytorch/pytorch/pull/45584 Reviewed By: VitalyFedyunin Differential Revision: D24116921 Pulled By: bzinodev fbshipit-source-id: ebd66e06d62e15f0d49c8191d9997f55edfa520e
Author
shubhambhokare1
Parents
Loading