Update optimize_for_mobile to preserve node's debug information (#63106)
authorSalil Desai <salilsdesai@fb.com>
Wed, 1 Sep 2021 21:08:02 +0000 (14:08 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Sep 2021 21:34:20 +0000 (14:34 -0700)
commit86c96542914bf9b3dfda0c7f6373fd13b48c6b97
treeab1d77667e2f8d0763e0b70ce4c87e0d0e4b4bb1
parent15ff25d1fc212c36cf472f988cf0e709420cd248
Update optimize_for_mobile to preserve node's debug information (#63106)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63106

Propagate debug info to the re-written nodes in the graph.

Test Plan:
- Clone open source repo and build
- ``` python3 test/test_jit.py TestOptimizeForMobilePreserveDebugInfo ```
- Tests pass

Reviewed By: kimishpatel

Differential Revision: D28654659

fbshipit-source-id: 2d7c87f2fb95a3be53246375f35639bbd97c237e
test/jit/test_optimize_for_mobile_preserve_debug_info.py [new file with mode: 0644]
test/test_jit.py
torch/csrc/jit/passes/xnnpack_rewrite.cpp