Preserve naming for inputs/outputs with observer insertion (#18713)
authorNishant Pandit <npandit@fb.com>
Sun, 7 Apr 2019 03:56:17 +0000 (20:56 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 7 Apr 2019 04:01:21 +0000 (21:01 -0700)
commit1ffa358fcad4c15eeb13fbbc3020071c3e6510f0
treea1feb9f9fcf4a9da59eac93857f86b8118e81458
parent34382e428fb94ae121dde78ae6a07e1814e75525
Preserve naming for inputs/outputs with observer insertion (#18713)

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

  - Quantizer observer node output is hooked up to following node
which mutates the naming for input/output. This is not desired and
required because observer op can be a sync node

  - Quantizer is aimed for quantizing tensors so we should insert observer
op for Values that are type tensor

Reviewed By: zafartahirov

Differential Revision: D14715916

fbshipit-source-id: feca04c65a43103b46084d3548998498b19ee599
torch/csrc/jit/passes/quantization.cpp