Skip to content

[quant][fx][graphmode][fix] Only insert observers for fixed qparam ops#53330

Closed
jerryzh168 wants to merge 2 commits intogh/jerryzh168/568/basefrom
gh/jerryzh168/568/head
Closed

[quant][fx][graphmode][fix] Only insert observers for fixed qparam ops#53330
jerryzh168 wants to merge 2 commits intogh/jerryzh168/568/basefrom
gh/jerryzh168/568/head

Conversation

@jerryzh168
Copy link
Copy Markdown
Contributor

@jerryzh168 jerryzh168 commented Mar 5, 2021

Stack from ghstack:

Summary:
Fixed a condition check for fixed qparam ops, previously we were including CopyNodes as well

Test Plan:
python test/test_quantization.py TestQuantizeFxOps.test_fixed_qparams_ops_fp16

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D26836867

Summary:
Fixed a condition check for fixed qparam ops, previously we were including CopyNodes as well

Test Plan:
python test/test_quantization.py TestQuantizeFxOps.test_fixed_qparams_ops_fp16

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Mar 5, 2021

💊 CI failures summary and remediations

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


  • 15/15 failures possibly* introduced in this PR
    • 2/15 non-scanned 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_coverage_test2 (1/13)

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

Mar 10 21:43:10 RuntimeError: test_ops failed!
Mar 10 21:43:09   File "test_ops.py", line 10, in <module>
Mar 10 21:43:09     from torch.testing._internal.common_methods_invocations import \
Mar 10 21:43:09   File "/opt/conda/lib/python3.8/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2451, in <module>
Mar 10 21:43:09     OpInfo('eig',
Mar 10 21:43:09 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 21:43:10 Traceback (most recent call last):
Mar 10 21:43:10   File "test/run_test.py", line 1073, in <module>
Mar 10 21:43:10     main()
Mar 10 21:43:10   File "test/run_test.py", line 1052, in main
Mar 10 21:43:10     raise RuntimeError(err_message)
Mar 10 21:43:10 RuntimeError: test_ops failed!
Mar 10 21:43:10 
Mar 10 21:43:10 real	0m6.336s
Mar 10 21:43:10 user	0m4.416s
Mar 10 21:43:10 sys	0m0.713s
Mar 10 21:43:10 + cleanup
Mar 10 21:43:10 + retcode=1
Mar 10 21:43:10 + set +x
Mar 10 21:43:10 =================== sccache compilation log ===================
Mar 10 21:43:10 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 21:43:10 Compile requests                      28

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_jit_legacy_test (2/13)

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

Mar 10 23:00:01 RuntimeError: test_jit_legacy failed!
Mar 10 23:00:01   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/jit_metaprogramming_utils.py", line 5, in <module>
Mar 10 23:00:01     from torch.testing._internal.common_methods_invocations import non_differentiable, create_input, \
Mar 10 23:00:01   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 23:00:01     skipCUDAIfRocm
Mar 10 23:00:01 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 23:00:01 Traceback (most recent call last):
Mar 10 23:00:01   File "test/run_test.py", line 1073, in <module>
Mar 10 23:00:01     main()
Mar 10 23:00:01   File "test/run_test.py", line 1052, in main
Mar 10 23:00:01     raise RuntimeError(err_message)
Mar 10 23:00:01 RuntimeError: test_jit_legacy failed!
Mar 10 23:00:02 + cleanup
Mar 10 23:00:02 + retcode=1
Mar 10 23:00:02 + set +x
Mar 10 23:00:02 =================== sccache compilation log ===================
Mar 10 23:00:02 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 23:00:02 Compile requests                      0
Mar 10 23:00:02 Compile requests executed             0
Mar 10 23:00:02 Cache hits                            0
Mar 10 23:00:02 Cache misses                          0
Mar 10 23:00:02 Cache timeouts                        0

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (3/13)

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

Mar 10 21:10:36 RuntimeError: test_autograd failed!
Mar 10 21:10:36   File "test_autograd.py", line 42, in <module>
Mar 10 21:10:36     from torch.testing._internal.common_methods_invocations import (method_tests,
Mar 10 21:10:36   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 21:10:36     skipCUDAIfRocm
Mar 10 21:10:36 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 21:10:36 Traceback (most recent call last):
Mar 10 21:10:36   File "test/run_test.py", line 1073, in <module>
Mar 10 21:10:36     main()
Mar 10 21:10:36   File "test/run_test.py", line 1052, in main
Mar 10 21:10:36     raise RuntimeError(err_message)
Mar 10 21:10:36 RuntimeError: test_autograd failed!
Mar 10 21:10:36 + cleanup
Mar 10 21:10:36 + retcode=1
Mar 10 21:10:36 + set +x
Mar 10 21:10:36 =================== sccache compilation log ===================
Mar 10 21:10:36 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 21:10:36 Compile requests                     28
Mar 10 21:10:36 Compile requests executed            26
Mar 10 21:10:36 Cache hits                            2
Mar 10 21:10:36 Cache hits (C/C++)                    2
Mar 10 21:10:36 Cache misses                         24

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

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

RuntimeError: test_jit_fuser_te failed!
  File "C:\Users\circleci\project\build\win_tmp\build\torch\testing\_internal\jit_metaprogramming_utils.py", line 5, in <module>
    from torch.testing._internal.common_methods_invocations import non_differentiable, create_input, \
  File "C:\Users\circleci\project\build\win_tmp\build\torch\testing\_internal\common_methods_invocations.py", line 2460, in <module>
    skipCUDAIfRocm
TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Traceback (most recent call last):
  File "run_test.py", line 1073, in <module>
    main()
  File "run_test.py", line 1052, in main
    raise RuntimeError(err_message)
RuntimeError: test_jit_fuser_te failed!

(base) C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1 
+ cleanup
+ retcode=1
+ set +x


Exited with code exit status 1

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_test1 (5/13)

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

RuntimeError: test_jit failed!
  File "C:\Users\circleci\project\build\win_tmp\build\torch\testing\_internal\jit_metaprogramming_utils.py", line 5, in <module>
    from torch.testing._internal.common_methods_invocations import non_differentiable, create_input, \
  File "C:\Users\circleci\project\build\win_tmp\build\torch\testing\_internal\common_methods_invocations.py", line 2460, in <module>
    skipCUDAIfRocm
TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Traceback (most recent call last):
  File "run_test.py", line 1073, in <module>
    main()
  File "run_test.py", line 1052, in main
    raise RuntimeError(err_message)
RuntimeError: test_jit failed!

(base) C:\Users\circleci\project\test>if ERRORLEVEL 1 exit /b 1 
+ cleanup
+ retcode=1
+ set +x


Exited with code exit status 1

See CircleCI build pytorch_linux_bionic_py3_8_gcc9_coverage_test1 (6/13)

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

Mar 10 21:42:43 RuntimeError: test_autograd failed!
Mar 10 21:42:42   File "test_autograd.py", line 42, in <module>
Mar 10 21:42:42     from torch.testing._internal.common_methods_invocations import (method_tests,
Mar 10 21:42:42   File "/opt/conda/lib/python3.8/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2451, in <module>
Mar 10 21:42:42     OpInfo('eig',
Mar 10 21:42:42 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 21:42:43 Traceback (most recent call last):
Mar 10 21:42:43   File "test/run_test.py", line 1073, in <module>
Mar 10 21:42:43     main()
Mar 10 21:42:43   File "test/run_test.py", line 1052, in main
Mar 10 21:42:43     raise RuntimeError(err_message)
Mar 10 21:42:43 RuntimeError: test_autograd failed!
Mar 10 21:42:43 
Mar 10 21:42:43 real	0m5.611s
Mar 10 21:42:43 user	0m3.790s
Mar 10 21:42:43 sys	0m0.776s
Mar 10 21:42:43 + cleanup
Mar 10 21:42:43 + retcode=1
Mar 10 21:42:43 + set +x
Mar 10 21:42:43 =================== sccache compilation log ===================
Mar 10 21:42:43 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 21:42:43 Compile requests                      28

See CircleCI build pytorch_linux_xenial_py3_clang5_asan_test2 (7/13)

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

Mar 10 22:10:31 RuntimeError: test_ops failed!
Mar 10 22:10:30   File "test_ops.py", line 10, in <module>
Mar 10 22:10:30     from torch.testing._internal.common_methods_invocations import \
Mar 10 22:10:30   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 22:10:30     skipCUDAIfRocm
Mar 10 22:10:30 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 22:10:31 Traceback (most recent call last):
Mar 10 22:10:31   File "test/run_test.py", line 1073, in <module>
Mar 10 22:10:31     main()
Mar 10 22:10:31   File "test/run_test.py", line 1052, in main
Mar 10 22:10:31     raise RuntimeError(err_message)
Mar 10 22:10:31 RuntimeError: test_ops failed!
Mar 10 22:10:31 + cleanup
Mar 10 22:10:31 + retcode=1
Mar 10 22:10:31 + set +x
Mar 10 22:10:31 =================== sccache compilation log ===================
Mar 10 22:10:31 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 22:10:31 Compile requests                      28
Mar 10 22:10:31 Compile requests executed             26
Mar 10 22:10:31 Cache hits                             2
Mar 10 22:10:31 Cache hits (C/C++)                     2
Mar 10 22:10:31 Cache misses                          24

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_jit_legacy_test (8/13)

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

Mar 10 21:06:44 RuntimeError: test_jit_legacy failed!
Mar 10 21:06:43   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/jit_metaprogramming_utils.py", line 5, in <module>
Mar 10 21:06:43     from torch.testing._internal.common_methods_invocations import non_differentiable, create_input, \
Mar 10 21:06:43   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 21:06:43     skipCUDAIfRocm
Mar 10 21:06:43 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 21:06:44 Traceback (most recent call last):
Mar 10 21:06:44   File "test/run_test.py", line 1073, in <module>
Mar 10 21:06:44     main()
Mar 10 21:06:44   File "test/run_test.py", line 1052, in main
Mar 10 21:06:44     raise RuntimeError(err_message)
Mar 10 21:06:44 RuntimeError: test_jit_legacy failed!
Mar 10 21:06:44 + cleanup
Mar 10 21:06:44 + retcode=1
Mar 10 21:06:44 + set +x
Mar 10 21:06:44 =================== sccache compilation log ===================
Mar 10 21:06:44 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 21:06:44 Compile requests                      0
Mar 10 21:06:44 Compile requests executed             0
Mar 10 21:06:44 Cache hits                            0
Mar 10 21:06:44 Cache misses                          0
Mar 10 21:06:44 Cache timeouts                        0

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_test1 (9/13)

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

Mar 10 23:03:54 RuntimeError: test_autograd failed!
Mar 10 23:03:54   File "test_autograd.py", line 42, in <module>
Mar 10 23:03:54     from torch.testing._internal.common_methods_invocations import (method_tests,
Mar 10 23:03:54   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 23:03:54     skipCUDAIfRocm
Mar 10 23:03:54 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 23:03:54 Traceback (most recent call last):
Mar 10 23:03:54   File "test/run_test.py", line 1073, in <module>
Mar 10 23:03:54     main()
Mar 10 23:03:54   File "test/run_test.py", line 1052, in main
Mar 10 23:03:54     raise RuntimeError(err_message)
Mar 10 23:03:54 RuntimeError: test_autograd failed!
Mar 10 23:03:55 + cleanup
Mar 10 23:03:55 + retcode=1
Mar 10 23:03:55 + set +x
Mar 10 23:03:55 =================== sccache compilation log ===================
Mar 10 23:03:55 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 23:03:55 Compile requests                     64
Mar 10 23:03:55 Compile requests executed            38
Mar 10 23:03:55 Cache hits                            2
Mar 10 23:03:55 Cache hits (C/C++)                    2
Mar 10 23:03:55 Cache misses                         36

See CircleCI build pytorch_linux_bionic_py3_6_clang9_test (10/13)

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

Mar 10 21:32:07 RuntimeError: test_jit failed!
Mar 10 21:32:06   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/jit_metaprogramming_utils.py", line 5, in <module>
Mar 10 21:32:06     from torch.testing._internal.common_methods_invocations import non_differentiable, create_input, \
Mar 10 21:32:06   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 21:32:06     skipCUDAIfRocm
Mar 10 21:32:06 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 21:32:07 Traceback (most recent call last):
Mar 10 21:32:07   File "test/run_test.py", line 1073, in <module>
Mar 10 21:32:07     main()
Mar 10 21:32:07   File "test/run_test.py", line 1052, in main
Mar 10 21:32:07     raise RuntimeError(err_message)
Mar 10 21:32:07 RuntimeError: test_jit failed!
Mar 10 21:32:07 
Mar 10 21:32:07 real	8m59.079s
Mar 10 21:32:07 user	16m51.540s
Mar 10 21:32:07 sys	1m48.085s
Mar 10 21:32:07 + cleanup
Mar 10 21:32:07 + retcode=1
Mar 10 21:32:07 + set +x
Mar 10 21:32:07 =================== sccache compilation log ===================
Mar 10 21:32:07 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 21:32:07 Compile requests                      28

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_test2 (11/13)

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

Mar 10 23:05:16 RuntimeError: test_ops failed!
Mar 10 23:05:16   File "test_ops.py", line 10, in <module>
Mar 10 23:05:16     from torch.testing._internal.common_methods_invocations import \
Mar 10 23:05:16   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 23:05:16     skipCUDAIfRocm
Mar 10 23:05:16 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 23:05:16 Traceback (most recent call last):
Mar 10 23:05:16   File "test/run_test.py", line 1073, in <module>
Mar 10 23:05:16     main()
Mar 10 23:05:16   File "test/run_test.py", line 1052, in main
Mar 10 23:05:16     raise RuntimeError(err_message)
Mar 10 23:05:16 RuntimeError: test_ops failed!
Mar 10 23:05:17 + cleanup
Mar 10 23:05:17 + retcode=1
Mar 10 23:05:17 + set +x
Mar 10 23:05:17 =================== sccache compilation log ===================
Mar 10 23:05:17 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 23:05:17 Compile requests                     64
Mar 10 23:05:17 Compile requests executed            38
Mar 10 23:05:17 Cache hits                            2
Mar 10 23:05:17 Cache hits (C/C++)                    2
Mar 10 23:05:17 Cache misses                         36

See CircleCI build pytorch_macos_10_13_py3_test (12/13)

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

Mar 10 21:27:50 RuntimeError: test_jit failed!
Mar 10 21:27:50   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/jit_metaprogramming_utils.py", line 5, in <module>
Mar 10 21:27:50     from torch.testing._internal.common_methods_invocations import non_differentiable, create_input, \
Mar 10 21:27:50   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 21:27:50     skipCUDAIfRocm
Mar 10 21:27:50 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 21:27:50 Traceback (most recent call last):
Mar 10 21:27:50   File "test/run_test.py", line 1073, in <module>
Mar 10 21:27:50     main()
Mar 10 21:27:50   File "test/run_test.py", line 1052, in main
Mar 10 21:27:50     raise RuntimeError(err_message)
Mar 10 21:27:50 RuntimeError: test_jit failed!
Mar 10 21:27:50 + cleanup
Mar 10 21:27:50 + retcode=1
Mar 10 21:27:50 + set +x


Exited with code exit status 1

See CircleCI build pytorch_linux_xenial_py3_clang5_asan_test1 (13/13)

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

Mar 10 22:08:27 RuntimeError: test_autograd failed!
Mar 10 22:08:27   File "test_autograd.py", line 42, in <module>
Mar 10 22:08:27     from torch.testing._internal.common_methods_invocations import (method_tests,
Mar 10 22:08:27   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_methods_invocations.py", line 2460, in <module>
Mar 10 22:08:27     skipCUDAIfRocm
Mar 10 22:08:27 TypeError: __init__() got an unexpected keyword argument 'supports_tensor_out'
Mar 10 22:08:27 Traceback (most recent call last):
Mar 10 22:08:27   File "test/run_test.py", line 1073, in <module>
Mar 10 22:08:27     main()
Mar 10 22:08:27   File "test/run_test.py", line 1052, in main
Mar 10 22:08:27     raise RuntimeError(err_message)
Mar 10 22:08:27 RuntimeError: test_autograd failed!
Mar 10 22:08:27 + cleanup
Mar 10 22:08:27 + retcode=1
Mar 10 22:08:27 + set +x
Mar 10 22:08:27 =================== sccache compilation log ===================
Mar 10 22:08:28 =========== If your build fails, please take a look at the log above for possible reasons ===========
Mar 10 22:08:28 Compile requests                      28
Mar 10 22:08:28 Compile requests executed             26
Mar 10 22:08:28 Cache hits                             2
Mar 10 22:08:28 Cache hits (C/C++)                     2
Mar 10 22:08:28 Cache misses                          24

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 to the (internal) Dr. CI Users group.

jerryzh168 added a commit that referenced this pull request Mar 5, 2021
Summary:
Fixed a condition check for fixed qparam ops, previously we were including CopyNodes as well

Test Plan:
python test/test_quantization.py TestQuantizeFxOps.test_fixed_qparams_ops_fp16

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 8a24aaf
Pull Request resolved: #53330
…d qparam ops"

Summary:
Fixed a condition check for fixed qparam ops, previously we were including CopyNodes as well

Test Plan:
python test/test_quantization.py TestQuantizeFxOps.test_fixed_qparams_ops_fp16

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 0584fd9.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/568/head branch March 14, 2021 14:14
xsacha pushed a commit to xsacha/pytorch that referenced this pull request Mar 31, 2021
pytorch#53330)

Summary:
Pull Request resolved: pytorch#53330

Fixed a condition check for fixed qparam ops, previously we were including CopyNodes as well

Test Plan:
python test/test_quantization.py TestQuantizeFxOps.test_fixed_qparams_ops_fp16

Imported from OSS

Reviewed By: vkuzo

Differential Revision: D26836867

fbshipit-source-id: 8c486155244f852e675a938c3f4237f26505671c
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
pytorch#53330)

Summary:
Pull Request resolved: pytorch#53330

Fixed a condition check for fixed qparam ops, previously we were including CopyNodes as well

Test Plan:
python test/test_quantization.py TestQuantizeFxOps.test_fixed_qparams_ops_fp16

Imported from OSS

Reviewed By: vkuzo

Differential Revision: D26836867

fbshipit-source-id: 8c486155244f852e675a938c3f4237f26505671c
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.

3 participants