set is_qat properly when fusing model
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/175 D33833203 adds `is_qat` argument to the fuser method, more details in https://fb.workplace.com/groups/2322282031156145/permalink/5026297484087906/. As results, MV's `fuse_utils.fuse_model` then becomes two functions: the original one is for non-qat; a new one `fuse_utils.fuse_model_qat` is for qat. For D2 (https://github.com/facebookresearch/d2go/commit/7992f91324aee6ae59795063a007c6837e60cdb8)Go in most cases, `is_qat` can be inferred from `cfg.QUANTIZATION.QAT.ENABLED`, therefore we can extend the `fuse_model` to also take `is_qat` as parameter, and set it accordingly. This diff updates all the call sites which is covered by unit tests. Those call sites include: - default quantization APIs in d2go/modeling/quantization.py - customized quantization APIs from individual meta-arch - unit test itself Reviewed By: tglik, jerryzh168 Differential Revision: D34112650 fbshipit-source-id: 026c309f603bee71d887e39aa4efee6477db731b
Showing
Please register or sign in to comment