Skip to content

Conversation

@z-a-f
Copy link

@z-a-f z-a-f commented Jun 14, 2020

Stack from ghstack:

Differential Revision: D22158980

@z-a-f z-a-f requested review from jamesr66a and jerryzh168 June 14, 2020 04:54
z-a-f pushed a commit that referenced this pull request Jun 14, 2020
ghstack-source-id: 73dfafa
Pull Request resolved: #40003
@dr-ci
Copy link

dr-ci bot commented Jun 14, 2020

💊 CI failures summary and remediations

As of commit feb0ca9 (more details on the Dr. CI page):


  • 16/16 failures possibly* introduced in this PR
    • 3/16 non-CircleCI failure(s)

🕵️ 13 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_bionic_py3_8_gcc9_test (1/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:38:00 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 08:38:00 test_optimize_for_mobile (__main__.TestOptimizer) ... /opt/conda/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /var/lib/jenkins/workspace/c10/core/TensorImpl.h:837.) 
Aug 12 08:38:00   return callable(*args, **kwargs) 
Aug 12 08:38:00 ok 
Aug 12 08:38:00 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:38:00 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:38:00 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:38:00 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:38:00 ok 
Aug 12 08:38:00  
Aug 12 08:38:00 ====================================================================== 
Aug 12 08:38:00 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 08:38:00 ---------------------------------------------------------------------- 
Aug 12 08:38:00 Traceback (most recent call last): 
Aug 12 08:38:00   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 08:38:00     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 08:38:00   File "/opt/conda/lib/python3.8/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 08:38:00     expected = expected.expand_as(actual) 
Aug 12 08:38:00 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 08:38:00  
Aug 12 08:38:00 ---------------------------------------------------------------------- 
Aug 12 08:38:00 Ran 4 tests in 0.820s 

See CircleCI build pytorch_linux_xenial_py3_clang5_asan_test2 (2/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 09:07:20 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 09:07:18 test_optimize_for_mobile (__main__.TestOptimizer) ... /opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /var/lib/jenkins/workspace/c10/core/TensorImpl.h:840.) 
Aug 12 09:07:18   return callable(*args, **kwargs) 
Aug 12 09:07:18 ok 
Aug 12 09:07:19 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:07:19 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:07:19 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:07:19 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:07:20 ok 
Aug 12 09:07:20  
Aug 12 09:07:20 ====================================================================== 
Aug 12 09:07:20 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 09:07:20 ---------------------------------------------------------------------- 
Aug 12 09:07:20 Traceback (most recent call last): 
Aug 12 09:07:20   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 09:07:20     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 09:07:20   File "/opt/conda/lib/python3.6/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 09:07:20     expected = expected.expand_as(actual) 
Aug 12 09:07:20 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 09:07:20  
Aug 12 09:07:20 ---------------------------------------------------------------------- 
Aug 12 09:07:20 Ran 4 tests in 3.977s 

See CircleCI build pytorch_macos_10_13_py3_test (3/13)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Aug 12 01:50:13 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 01:50:12 test_optimize_for_mobile (__main__.TestOptimizer) ... /Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  ../c10/core/TensorImpl.h:840.) 
Aug 12 01:50:12   return callable(*args, **kwargs) 
Aug 12 01:50:12 ok 
Aug 12 01:50:13 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 01:50:13 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 01:50:13 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 01:50:13 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 01:50:13 ok 
Aug 12 01:50:13  
Aug 12 01:50:13 ====================================================================== 
Aug 12 01:50:13 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 01:50:13 ---------------------------------------------------------------------- 
Aug 12 01:50:13 Traceback (most recent call last): 
Aug 12 01:50:13   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 01:50:13     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 01:50:13   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 01:50:13     expected = expected.expand_as(actual) 
Aug 12 01:50:13 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 01:50:13  
Aug 12 01:50:13 ---------------------------------------------------------------------- 
Aug 12 01:50:13 Ran 4 tests in 1.342s 

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_ge_config_simple_test (4/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:36:52 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 08:36:51 test_optimize_for_mobile (__main__.TestOptimizer) ... /opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /var/lib/jenkins/workspace/c10/core/TensorImpl.h:840.) 
Aug 12 08:36:51   return callable(*args, **kwargs) 
Aug 12 08:36:51 ok 
Aug 12 08:36:52 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:36:52 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:36:52 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:36:52 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:36:52 ok 
Aug 12 08:36:52  
Aug 12 08:36:52 ====================================================================== 
Aug 12 08:36:52 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 08:36:52 ---------------------------------------------------------------------- 
Aug 12 08:36:52 Traceback (most recent call last): 
Aug 12 08:36:52   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 08:36:52     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 08:36:52   File "/opt/conda/lib/python3.6/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 08:36:52     expected = expected.expand_as(actual) 
Aug 12 08:36:52 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 08:36:52  
Aug 12 08:36:52 ---------------------------------------------------------------------- 
Aug 12 08:36:52 Ran 4 tests in 0.995s 

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (5/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:35:31 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 08:35:31 test_optimize_for_mobile (__main__.TestOptimizer) ... /opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /var/lib/jenkins/workspace/c10/core/TensorImpl.h:840.) 
Aug 12 08:35:31   return callable(*args, **kwargs) 
Aug 12 08:35:31 ok 
Aug 12 08:35:31 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:35:31 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:35:31 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:35:31 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:35:31 ok 
Aug 12 08:35:31  
Aug 12 08:35:31 ====================================================================== 
Aug 12 08:35:31 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 08:35:31 ---------------------------------------------------------------------- 
Aug 12 08:35:31 Traceback (most recent call last): 
Aug 12 08:35:31   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 08:35:31     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 08:35:31   File "/opt/conda/lib/python3.6/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 08:35:31     expected = expected.expand_as(actual) 
Aug 12 08:35:31 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 08:35:31  
Aug 12 08:35:31 ---------------------------------------------------------------------- 
Aug 12 08:35:31 Ran 4 tests in 0.902s 

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_test2 (6/13)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

RuntimeError: test_quantization failed!
Generated XML report: test-reports\python-unittest\TEST-quantization.test_quantized_tensor.TestQuantizedTensor-20200812085916.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_workflow_module.TestRecordHistogramObserver-20200812085916.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_backward_compatibility.TestSerialization-20200812085916.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_quantized_module.TestStaticQuantizedModule-20200812085916.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_quantized_op.TestQNNPackOps-20200812085916.xml 
Traceback (most recent call last): 
  File "run_test.py", line 716, in <module> 
    main() 
  File "run_test.py", line 705, in main 
    raise RuntimeError(err) 
RuntimeError: test_quantization failed! 
 
(base) circleci@PACKER-5F0EEC91 C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

See CircleCI build caffe2_onnx_ort2_py3_6_clang7_ubuntu16_04_test (7/13)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_small_model FAILED [ 99%]
Aug 12 08:43:05 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_cat PASSED [ 99%] 
Aug 12 08:43:05 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_max_pool2d PASSED [ 99%] 
Aug 12 08:43:05 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_qconv_model FAILED [ 99%] 
Aug 12 08:43:05 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_qlinear_model PASSED [ 99%] 
Aug 12 08:43:05 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_add PASSED [ 99%] 
Aug 12 08:43:05 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_relu PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_sigmoid PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_reshape PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_sequential FAILED [ 99%] 
Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_slice PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_small_model FAILED [ 99%] 
Aug 12 08:43:06 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_upsample PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_verify.py::TestVerify::test_dynamic_model_structure PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_verify.py::TestVerify::test_embedded_constant_difference PASSED [ 99%] 
Aug 12 08:43:06 test/onnx/test_verify.py::TestVerify::test_explicit_test_args PASSED     [ 99%] 
Aug 12 08:43:06 test/onnx/test_verify.py::TestVerify::test_jumbled_params PASSED         [ 99%] 
Aug 12 08:43:06 test/onnx/test_verify.py::TestVerify::test_modifying_params PASSED       [ 99%] 
Aug 12 08:43:06 test/onnx/test_verify.py::TestVerify::test_result_different PASSED       [100%] 
Aug 12 08:43:06  
Aug 12 08:43:06 =================================== FAILURES =================================== 
Aug 12 08:43:06 ______________________ TestQuantizedOps.test_qconv_model _______________________ 

See CircleCI build pytorch_linux_backward_compatibility_check_test (8/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:16:34 The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not.
Aug 12 08:16:34 processing existing schema:  __str__(__torch__.torch.classes._TorchScriptTesting._StackString _0) -> (str _0) 
Aug 12 08:16:34 processing existing schema:  __init__(__torch__.torch.classes._TorchScriptTesting._PickleTester _0, int[] _1) -> (None _0) 
Aug 12 08:16:34 processing existing schema:  __getstate__(__torch__.torch.classes._TorchScriptTesting._PickleTester _0) -> (int[] _0) 
Aug 12 08:16:34 processing existing schema:  __setstate__(__torch__.torch.classes._TorchScriptTesting._PickleTester _0, int[] _1) -> (None _0) 
Aug 12 08:16:34 processing existing schema:  top(__torch__.torch.classes._TorchScriptTesting._PickleTester _0) -> (int _0) 
Aug 12 08:16:34 processing existing schema:  pop(__torch__.torch.classes._TorchScriptTesting._PickleTester _0) -> (int _0) 
Aug 12 08:16:34 processing existing schema:  get(__torch__.torch.classes._TorchScriptTesting._LiteInterpreterTest _0, Tensor _1) -> (str _0) 
Aug 12 08:16:34 processing existing schema:  __getstate__(__torch__.torch.classes._TorchScriptTesting._LiteInterpreterTest _0) -> (int _0) 
Aug 12 08:16:34 processing existing schema:  __setstate__(__torch__.torch.classes._TorchScriptTesting._LiteInterpreterTest _0, int _1) -> (None _0) 
Aug 12 08:16:34 processing existing schema:  __init__(__torch__.torch.classes.dist_rpc.WorkerInfo _0, str _1, int _2) -> (None _0) 
Aug 12 08:16:34 The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not.  
Aug 12 08:16:34  
Aug 12 08:16:34 Broken ops: [ 
Aug 12 08:16:34 	__getstate__(__torch__.torch.classes.quantized.Conv2dPackedParamsBase _0) -> ((Tensor, Tensor?, Tensor[], Tensor[], Tensor[], Tensor) _0) 
Aug 12 08:16:34 	__setstate__(__torch__.torch.classes.quantized.Conv2dPackedParamsBase _0, (Tensor, Tensor?, Tensor[], Tensor[], Tensor[], Tensor) _1) -> (None _0) 
Aug 12 08:16:34 	__getstate__(__torch__.torch.classes.quantized.Conv3dPackedParamsBase _0) -> ((Tensor, Tensor?, Tensor[], Tensor[], Tensor[], Tensor) _0) 
Aug 12 08:16:34 	__setstate__(__torch__.torch.classes.quantized.Conv3dPackedParamsBase _0, (Tensor, Tensor?, Tensor[], Tensor[], Tensor[], Tensor) _1) -> (None _0) 
Aug 12 08:16:34 ] 
Aug 12 08:16:34 + cleanup 
Aug 12 08:16:34 + retcode=1 
Aug 12 08:16:34 + set +x 

See CircleCI build caffe2_onnx_main_py3_6_clang7_ubuntu16_04_test (9/13)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:43:42 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_small_model FAILED [ 99%]
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_cat PASSED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_max_pool2d PASSED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_qconv_model FAILED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_qlinear_model PASSED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_add PASSED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_relu PASSED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_sigmoid PASSED [ 99%] 
Aug 12 08:43:41 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_reshape PASSED [ 99%] 
Aug 12 08:43:42 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_sequential FAILED [ 99%] 
Aug 12 08:43:42 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_slice PASSED [ 99%] 
Aug 12 08:43:42 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_small_model FAILED [ 99%] 
Aug 12 08:43:42 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_upsample PASSED [ 99%] 
Aug 12 08:43:42 test/onnx/test_verify.py::TestVerify::test_dynamic_model_structure PASSED [ 99%] 
Aug 12 08:43:42 test/onnx/test_verify.py::TestVerify::test_embedded_constant_difference PASSED [ 99%] 
Aug 12 08:43:42 test/onnx/test_verify.py::TestVerify::test_explicit_test_args PASSED     [ 99%] 
Aug 12 08:43:42 test/onnx/test_verify.py::TestVerify::test_jumbled_params PASSED         [ 99%] 
Aug 12 08:43:42 test/onnx/test_verify.py::TestVerify::test_modifying_params PASSED       [ 99%] 
Aug 12 08:43:42 test/onnx/test_verify.py::TestVerify::test_result_different PASSED       [100%] 
Aug 12 08:43:42  
Aug 12 08:43:42 =================================== FAILURES =================================== 
Aug 12 08:43:42 ______________________ TestQuantizedOps.test_qconv_model _______________________ 

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_test (10/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 09:27:09 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 09:27:08 test_optimize_for_mobile (__main__.TestOptimizer) ... /opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /var/lib/jenkins/workspace/c10/core/TensorImpl.h:840.) 
Aug 12 09:27:08   return callable(*args, **kwargs) 
Aug 12 09:27:08 ok 
Aug 12 09:27:09 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:27:09 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:27:09 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:27:09 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 09:27:09 ok 
Aug 12 09:27:09  
Aug 12 09:27:09 ====================================================================== 
Aug 12 09:27:09 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 09:27:09 ---------------------------------------------------------------------- 
Aug 12 09:27:09 Traceback (most recent call last): 
Aug 12 09:27:09   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 09:27:09     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 09:27:09   File "/opt/conda/lib/python3.6/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 09:27:09     expected = expected.expand_as(actual) 
Aug 12 09:27:09 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 09:27:09  
Aug 12 09:27:09 ---------------------------------------------------------------------- 
Aug 12 09:27:09 Ran 4 tests in 0.952s 

See CircleCI build pytorch_linux_bionic_py3_6_clang9_test (11/13)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:39:36 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer)
Aug 12 08:39:36 test_optimize_for_mobile (__main__.TestOptimizer) ... /opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py:115: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /var/lib/jenkins/workspace/c10/core/TensorImpl.h:840.) 
Aug 12 08:39:36   return callable(*args, **kwargs) 
Aug 12 08:39:36 ok 
Aug 12 08:39:36 test_quantized_conv_no_asan_failures (__main__.TestOptimizer) ... Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:39:36 Error in QNNPACK: failed to create convolution with 1x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:39:36 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:39:36 Error in QNNPACK: failed to create convolution with 0x0 dilation: dilation dimensions must be non-zero 
Aug 12 08:39:36 ok 
Aug 12 08:39:36  
Aug 12 08:39:36 ====================================================================== 
Aug 12 08:39:36 ERROR: test_hoist_conv_packed_params (__main__.TestOptimizer) 
Aug 12 08:39:36 ---------------------------------------------------------------------- 
Aug 12 08:39:36 Traceback (most recent call last): 
Aug 12 08:39:36   File "test_mobile_optimizer.py", line 334, in test_hoist_conv_packed_params 
Aug 12 08:39:36     torch.testing.assert_allclose(m_res, m_optim_res, rtol=1e-2, atol=1e-3) 
Aug 12 08:39:36   File "/opt/conda/lib/python3.6/site-packages/torch/testing/__init__.py", line 207, in assert_allclose 
Aug 12 08:39:36     expected = expected.expand_as(actual) 
Aug 12 08:39:36 RuntimeError: The expanded size of the tensor (4) must match the existing size (3) at non-singleton dimension 3.  Target sizes: [4, 1, 4, 4].  Tensor sizes: [4, 1, 3, 3] 
Aug 12 08:39:36  
Aug 12 08:39:36 ---------------------------------------------------------------------- 
Aug 12 08:39:36 Ran 4 tests in 0.818s 

See CircleCI build pytorch_windows_vs2019_py36_cuda11.0_test2 (12/13)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

RuntimeError: test_quantization failed!
Generated XML report: test-reports\python-unittest\TEST-quantization.test_quantized_tensor.TestQuantizedTensor-20200812092418.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_workflow_module.TestRecordHistogramObserver-20200812092418.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_backward_compatibility.TestSerialization-20200812092418.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_quantized_module.TestStaticQuantizedModule-20200812092418.xml 
Generated XML report: test-reports\python-unittest\TEST-quantization.test_quantized_op.TestQNNPackOps-20200812092418.xml 
Traceback (most recent call last): 
  File "run_test.py", line 716, in <module> 
    main() 
  File "run_test.py", line 705, in main 
    raise RuntimeError(err) 
RuntimeError: test_quantization failed! 
 
(base) circleci@PACKER-5F0EEC91 C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1  
+ cleanup
+ retcode=1
+ set +x

See CircleCI build caffe2_onnx_ort1_py3_6_clang7_ubuntu16_04_test (13/13)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Aug 12 08:45:58 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_small_model FAILED [ 99%]
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_cat PASSED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_max_pool2d PASSED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_qconv_model FAILED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_qlinear_model PASSED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_add PASSED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_relu PASSED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_quantized_sigmoid PASSED [ 99%] 
Aug 12 08:45:57 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_reshape PASSED [ 99%] 
Aug 12 08:45:58 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_sequential FAILED [ 99%] 
Aug 12 08:45:58 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_slice PASSED [ 99%] 
Aug 12 08:45:58 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_small_model FAILED [ 99%] 
Aug 12 08:45:58 test/onnx/test_pytorch_onnx_caffe2_quantized.py::TestQuantizedOps::test_upsample PASSED [ 99%] 
Aug 12 08:45:58 test/onnx/test_verify.py::TestVerify::test_dynamic_model_structure PASSED [ 99%] 
Aug 12 08:45:58 test/onnx/test_verify.py::TestVerify::test_embedded_constant_difference PASSED [ 99%] 
Aug 12 08:45:58 test/onnx/test_verify.py::TestVerify::test_explicit_test_args PASSED     [ 99%] 
Aug 12 08:45:58 test/onnx/test_verify.py::TestVerify::test_jumbled_params PASSED         [ 99%] 
Aug 12 08:45:58 test/onnx/test_verify.py::TestVerify::test_modifying_params PASSED       [ 99%] 
Aug 12 08:45:58 test/onnx/test_verify.py::TestVerify::test_result_different PASSED       [100%] 
Aug 12 08:45:58  
Aug 12 08:45:58 =================================== FAILURES =================================== 
Aug 12 08:45:58 ______________________ TestQuantizedOps.test_qconv_model _______________________ 

Extra GitHub checks: 2 failed


ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 116 times.

@z-a-f z-a-f requested a review from apaszke as a code owner June 14, 2020 23:46
z-a-f pushed a commit that referenced this pull request Jun 15, 2020
ghstack-source-id: 1d06944
Pull Request resolved: #40003
z-a-f pushed a commit that referenced this pull request Jun 15, 2020
ghstack-source-id: e4d483f
Pull Request resolved: #40003
@raghuramank100 raghuramank100 requested a review from dreiss June 15, 2020 16:55
vkuzo added a commit that referenced this pull request Aug 22, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 23, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 23, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 23, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 24, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 24, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 24, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 24, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 24, 2020
…ackedParam"


Note: this is a debug copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 24, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):
* verify that saving and loading models with https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be works
* TODO before land: add test coverage for loading v1 models
* TODO before land: verify numerics do not change
* TODO before land: verify all combinations of (trace, script) x (bias, no_bias) work


Note: this is a newer copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 25, 2020
…dParam"


This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):
* verify that saving and loading models with https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be works
* TODO before land: add test coverage for loading v1 models
* TODO before land: verify numerics do not change
* TODO before land: verify all combinations of (trace, script) x (bias, no_bias) work


Note: this is a newer copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 25, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):
* verify that saving and loading models with https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be works
* TODO before land: add test coverage for loading v1 models
* TODO before land: verify numerics do not change
* TODO before land: verify all combinations of (trace, script) x (bias, no_bias) work


Note: this is a newer copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 25, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land: 
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 25, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land: 
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land: 
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land: 
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land: 
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land: 
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79

// TODO before land:
// figure out forward compatibility
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
…onvPackedParam"


This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 26, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 27, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 27, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 27, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 28, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 28, 2020
This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

For a short forward compatibility period, we keep the `__getstate__` function with the old format,
while `__getstate__` knows about both old and new format.  The next PR in the stack will be landed
some period after this PR, and will switch `__getstate__` to the new format.

Note: the bc test cases were generated with the `v2` format, to allow manual testing of the `v2`
code in this PR.

Test plan:

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be 

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// test that numerics on quantized MobileNetV2 do not change:
// https://gist.github.com/vkuzo/d593385a88c30e22f46eba4248070c79
```

Note: this is a newer copy of #40003

Differential Revision: [D23347832](https://our.internmc.facebook.com/intern/diff/D23347832)

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request Aug 28, 2020
Summary:
Pull Request resolved: #43086

This PR changes the format of `ConvPackedParam` in a nearly backwards-compatible way:
* a new format is introduced which has more flexibility and a lower on-disk size
* custom pickle functions are added to `ConvPackedParams` which know how to load the old format
* the custom pickle functions are **not** BC because the output type of `__getstate__` has changed.  We expect this to be acceptable as no user flows are actually broken (loading a v1 model with v2 code works), which is why we whitelist the failure.

Test plan (TODO finalize):

```
// adhoc testing of saving v1 and loading in v2: https://gist.github.com/vkuzo/f3616c5de1b3109cb2a1f504feed69be

// test that loading models with v1 conv params format works and leads to the same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph

// test that saving and loading models with v2 conv params format works and leads to same numerics
python test/test_quantization.py TestSerialization.test_conv2d_graph_v2
python test/test_quantization.py TestSerialization.test_conv2d_nobias_graph_v2

// TODO before land:
// test numerics for a real model
// test legacy ONNX path
```

Note: this is a newer copy of #40003

Test Plan: Imported from OSS

Reviewed By: dreiss

Differential Revision: D23347832

Pulled By: vkuzo

fbshipit-source-id: 06bbe4666421ebad25dc54004c3b49a481d3cc92
@z-a-f z-a-f closed this Jun 8, 2021
@facebook-github-bot facebook-github-bot deleted the gh/z-a-f/36/head branch July 9, 2021 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants