pytorch
c0d81aa7 - Use fx.replace_pattern for removing empty_like+fill in nvFuser+PrimTorch execution (#89132)

Commit
2 years ago
Use fx.replace_pattern for removing empty_like+fill in nvFuser+PrimTorch execution (#89132) I learned about `torch.fx.replace_pattern` and it's a cleaner way of removing unnecessary tensor materialization from the graph coming from tracing C++ code `1 - tensor`. Test: ``` python -m pytest test/test_prims.py -k "test_silu_backward_no_filled_tensor" ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/89132 Approved by: https://github.com/mruberry, https://github.com/jjsjann123
Author
Committer
Parents
Loading