pytorch
124ae597 - [quant] Fixing the conversion of the quantizable RNN (#63879)

Commit
3 years ago
[quant] Fixing the conversion of the quantizable RNN (#63879) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63879 Quantizable RNN had a bug, where the `from_observed` was an instance method, instead of a class method. This caused the `tq.convert` to fail. This fixes the issue by making the `from_observed` a classmethod. The tests were passing before because the unittests were not using the custom module path, but a conventional `from_float`, which is also supported. Test Plan: `buck test mode/dev //caffe2/test:quantization -- test_custom_module_lstm` ``` buck test mode/dev //caffe2/test:quantization -- test_custom_module_lstm Parsing buck files: finished in 0.5 sec Downloaded 0/2 artifacts, 0.00 bytes, 100.0% cache miss (for updated rules) Building: finished in 9.2 sec (100%) 12622/12622 jobs, 2/12622 updated Total time: 9.7 sec More details at https://www.internalfb.com/intern/buck/build/0d87b987-649f-4d06-b0e2-97b5077 Tpx test run coordinator for Facebook. See https://fburl.com/tpx for details. Running with tpx session id: cb99305f-65c9-438b-a99f-a0a2a3089778 Trace available for this run at /tmp/tpx-20210824-115652.540356/trace.log Started reporting to test run: https://www.internalfb.com/intern/testinfra/testrun/5066549645030046 ✓ ListingSuccess: caffe2/test:quantization - main (12.550) ✓ Pass: caffe2/test:quantization - test_custom_module_lstm (quantization.core.test_quantized_op.TestQuantizedOps) (174.867) Summary Pass: 1 ListingSuccess: 1 If you need help understanding your runs, please follow the wiki: https://fburl.com/posting_in_tpx_users Finished test run: https://www.internalfb.com/intern/testinfra/testrun/5066549645030046 ``` Reviewed By: jerryzh168, mtl67 Differential Revision: D30520473 fbshipit-source-id: bc5d0b5bb079fd146e2614dd42526fc7d4d4f3c6
Author
Zafar Takhirov
Parents
Loading