8000 Fixes bias not working when not qkv has diff size by ZhiyuanChen · Pull Request #66544 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Fixes bias not working when not qkv has diff size #66544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ZhiyuanChen
Copy link
Contributor

Fixes #{issue number}

@pytorch-probot
Copy link
CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/ZhiyuanChen/pytorch/blob/9999f21ae6bfbd6d74a90c396c83047abbee2111/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-bionic-py3.6-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/xla ✅ triggered
linux-vulkan-bionic-py3.6-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/vulkan ✅ triggered
linux-xenial-cuda11.3-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux ✅ triggered
linux-xenial-py3.6-clang7-asan ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/sanitizers ✅ triggered
linux-xenial-py3.6-clang7-onnx ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/onnx ✅ triggered
linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux ✅ 8000 triggered
linux-xenial-py3.6-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/win ✅ triggered
Skipped Workflows
libtorch-linux-xenial-cuda10.2-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow 🚫 skipped
linux-xenial-cuda10.2-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow 🚫 skipped
parallelnative-linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux 🚫 skipped
periodic-libtorch-linux-xenial-cuda11.1-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-xenial-cuda10.2-py3-gcc7-slow-gradcheck ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled, ciflow/slow, ciflow/slow-gradcheck 🚫 skipped
periodic-linux-xenial-cuda11.1-py3.6-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.1-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
puretorch-linux-xenial-py3.6-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux 🚫 skipped

You can add a comment to the PR and tag @pytorchbot with the following commands:
# ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun

# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow

For more information, please take a look at the CI Flow Wiki.

@facebook-github-bot
Copy link
Contributor
facebook-github-bot commented Oct 13, 2021

🔗 Helpful links

❌ 11 New Failures

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

Expand to see more
  • 11/11 failures introduced in this PR

🕵️ 11 new failures recognized by patterns

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

See GitHub Actions build pull / linux-focal-py3.7-clang7-asan / test (default, 5, 5, linux.2xlarge) (1/11)

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

2022-08-09T18:48:23.9086392Z RuntimeError: test_quantization failed!
2022-08-09T18:48:22.9215214Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.core.test_utils.TestUtils-20220809181747.xml
2022-08-09T18:48:22.9219210Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.fx.test_numeric_suite_fx.TestFXGraphMatcherModels-20220809181747.xml
2022-08-09T18:48:22.9233416Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.core.test_quantized_op.TestQNNPackOps-20220809181747.xml
2022-08-09T18:48:22.9237542Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.dbr.test_quantize_dbr.TestQuantizeDBRModels-20220809181747.xml
2022-08-09T18:48:22.9242985Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.eager.test_quantize_eager_ptq.TestQuantizeEagerONNXExport-20220809181747.xml
2022-08-09T18:48:23.9078081Z Traceback (most recent call last):
2022-08-09T18:48:23.9078371Z   File "test/run_test.py", line 974, in <module>
2022-08-09T18:48:23.9081837Z     main()
2022-08-09T18:48:23.9082127Z   File "test/run_test.py", line 952, in main
2022-08-09T18:48:23.9085993Z     raise RuntimeError(err_message)
2022-08-09T18:48:23.9086392Z RuntimeError: test_quantization failed!
2022-08-09T18:48:24.4214181Z 
2022-08-09T18:48:24.4214465Z real	30m50.119s
2022-08-09T18:48:24.4215015Z user	37m18.045s
2022-08-09T18:48:24.4215264Z sys	1m38.544s
2022-08-09T18:48:24.4246889Z ##[error]Process completed with exit code 1.
2022-08-09T18:48:24.4288380Z Prepare all required actions
2022-08-09T18:48:24.4288697Z Getting action download info
2022-08-09T18:48:24.6082623Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-09T18:48:24.6082843Z with:
2022-08-09T18:48:24.6083166Z   github-token: ***

See GitHub Actions build pull / linux-bionic-py3_7-clang8-xla / test (xla, 1, 1, linux.2xlarge) (2/11)

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

2022-08-09T19:33:41.1439472Z FAIL [0.002s]: tes...ht_none_xla_float64 (__main__.TestNNDeviceTypeXLA)
2022-08-09T19:32:53.8188961Z   test_upsamplingNearest3d_correctness_xla (__main__.TestNNDeviceTypeXLA) ... ok (45.501s)
2022-08-09T19:32:53.8200896Z   test_upsamplingNearest3d_launch_config_xla (__main__.TestNNDeviceTypeXLA) ... skip: Only runs on cuda (0.001s)
2022-08-09T19:32:58.7520393Z   test_upsamplingNearest3d_xla (__main__.TestNNDeviceTypeXLA) ... ok (4.932s)
2022-08-09T19:32:58.9598516Z   test_upsamplingNearestExact1d_correctness_xla (__main__.TestNNDeviceTypeXLA) ... ok (0.208s)
2022-08-09T19:32:59.1490409Z   test_upsamplingNearestExact1d_rescale_xla (__main__.TestNNDeviceTypeXLA) ... ok (0.189s)
2022-08-09T19:33:01.5878164Z   test_upsamplingNearestExact2d_correctness_xla (__main__.TestNNDeviceTypeXLA) ... ok (2.439s)
2022-08-09T19:33:41.1398191Z   test_upsamplingNearestExact3d_correctness_xla (__main__.TestNNDeviceTypeXLA) ... ok (39.552s)
2022-08-09T19:33:41.1436070Z   test_variable_sequence_xla (__main__.TestNNDeviceTypeXLA) ... skip: skipped on XLA (0.004s)
2022-08-09T19:33:41.1436598Z 
2022-08-09T19:33:41.1436711Z ======================================================================
2022-08-09T19:33:41.1439472Z FAIL [0.002s]: test_multihead_attn_in_proj_weight_none_xla_float64 (__main__.TestNNDeviceTypeXLA)
2022-08-09T19:33:41.1440006Z ----------------------------------------------------------------------
2022-08-09T19:33:41.1440407Z Traceback (most recent call last):
2022-08-09T19:33:41.1441127Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T19:33:41.1441655Z     result = test(self, **param_kwargs)
2022-08-09T19:33:41.1442370Z   File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T19:33:41.1442705Z     return func(*args, **kwargs)
2022-08-09T19:33:41.1443005Z   File "/var/lib/jenkins/workspace/xla/test/../../test/test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T19:33:41.1443280Z     mha(query, key, key)
2022-08-09T19:33:41.1443652Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in _call_impl
2022-08-09T19:33:41.1443939Z     return forward_call(*input, **kwargs)

See GitHub Actions build pull / win-vs2019-cpu-py3 / test (default, 1, 2, windows.4xlarge) (3/11)

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

2022-08-09T19:14:12.9195243Z RuntimeError: test_quantization failed!
2022-08-09T19:14:12.2231303Z Generated XML report: test-reports\python-unittest\test_quantization\TEST-quantization.core.test_utils.TestUtils-20220809190541.xml
2022-08-09T19:14:12.2231835Z Generated XML report: test-reports\python-unittest\test_quantization\TEST-quantization.fx.test_numeric_suite_fx.TestFXGraphMatcherModels-20220809190541.xml
2022-08-09T19:14:12.2232412Z Generated XML report: test-reports\python-unittest\test_quantization\TEST-quantization.core.test_quantized_op.TestQNNPackOps-20220809190541.xml
2022-08-09T19:14:12.2232977Z Generated XML report: test-reports\python-unittest\test_quantization\TEST-quantization.dbr.test_quantize_dbr.TestQuantizeDBRModels-20220809190541.xml
2022-08-09T19:14:12.2233585Z Generated XML report: test-reports\python-unittest\test_quantization\TEST-quantization.eager.test_quantize_eager_ptq.TestQuantizeEagerONNXExport-20220809190541.xml
2022-08-09T19:14:12.9193946Z Traceback (most recent call last):
2022-08-09T19:14:12.9194345Z   File "run_test.py", line 974, in <module>
2022-08-09T19:14:12.9194565Z     main()
2022-08-09T19:14:12.9194785Z   File "run_test.py", line 952, in main
2022-08-09T19:14:12.9195013Z     raise RuntimeError(err_message)
2022-08-09T19:14:12.9195243Z RuntimeError: test_quantization failed!
2022-08-09T19:14:13.1318496Z 
2022-08-09T19:14:13.1319010Z (base) C:\actions-runner\_work\pytorch\pytorch\test>if ERRORLEVEL 1 goto fail 
2022-08-09T19:14:13.1321146Z 
2022-08-09T19:14:13.1321394Z (base) C:\actions-runner\_work\pytorch\pytorch\test>exit /b 1 
2022-08-09T19:14:13.1376735Z ##[error]Process completed with exit code 1.
2022-08-09T19:14:13.1512109Z Prepare all required actions
2022-08-09T19:14:13.1512625Z Getting action download info
2022-08-09T19:14:13.3494433Z Download action repository 'nick-fields/retry@71062288b76e2b6214ebde0e673ce0de1755740a' (SHA:71062288b76e2b6214ebde0e673ce0de1755740a)
2022-08-09T19:14:13.5850010Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-09T19:14:13.5850237Z with:

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (dynamo, 2, 2, linux.2xlarge) (4/11)

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

2022-08-09T18:22:51.3275230Z FAIL [0.002s]: tes...ht_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:22:51.3270290Z     _multihead_attn_test_helper(add_zero_attn=True)
2022-08-09T18:22:51.3270880Z   File "test_nn.py", line 5879, in _multihead_attn_test_helper
2022-08-09T18:22:51.3271253Z     average_attn_weights=average_attn_weights)
2022-08-09T18:22:51.3272037Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 5081, in multi_head_attention_forward
2022-08-09T18:22:51.3272732Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T18:22:51.3273736Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 4816, in _in_projection
2022-08-09T18:22:51.3274358Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T18:22:51.3274691Z AssertionError: expecting query bias shape of (9,), but got torch.Size([14])
2022-08-09T18:22:51.3274863Z 
2022-08-09T18:22:51.3274945Z ======================================================================
2022-08-09T18:22:51.3275230Z FAIL [0.002s]: test_multihead_attn_in_proj_weight_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:22:51.3275617Z ----------------------------------------------------------------------
2022-08-09T18:22:51.3275876Z Traceback (most recent call last):
2022-08-09T18:22:51.3276274Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T18:22:51.3276635Z     result = test(self, **param_kwargs)
2022-08-09T18:22:51.3277016Z   File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T18:22:51.3277280Z     return func(*args, **kwargs)
2022-08-09T18:22:51.3277529Z   File "test_nn.py", line 20871, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:22:51.3277767Z     @dtypes(torch.double)
2022-08-09T18:22:51.3278012Z   File "test_nn.py", line 20871, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:22:51.3278233Z     @dtypes(torch.double)

See GitHub Actions build pull / linux-focal-py3.7-gcc7 / test (default, 2, 2, linux.2xlarge) (5/11)

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

2022-08-09T18:16:07.2751793Z FAIL [0.002s]: tes...ht_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:16:07.2748706Z     _multihead_attn_test_helper(add_zero_attn=True)
2022-08-09T18:16:07.2748983Z   File "test_nn.py", line 5879, in _multihead_attn_test_helper
2022-08-09T18:16:07.2749257Z     average_attn_weights=average_attn_weights)
2022-08-09T18:16:07.2749672Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 5081, in multi_head_attention_forward
2022-08-09T18:16:07.2750064Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T18:16:07.2750518Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 4816, in _in_projection
2022-08-09T18:16:07.2750873Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T18:16:07.2751209Z AssertionError: expecting query bias shape of (12,), but got torch.Size([8])
2022-08-09T18:16:07.2751390Z 
2022-08-09T18:16:07.2751490Z ======================================================================
2022-08-09T18:16:07.2751793Z FAIL [0.002s]: test_multihead_attn_in_proj_weight_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:16:07.2752187Z ----------------------------------------------------------------------
2022-08-09T18:16:07.2752459Z Traceback (most recent call last):
2022-08-09T18:16:07.2752893Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T18:16:07.2753216Z     result = test(self, **param_kwargs)
2022-08-09T18:16:07.2753600Z   File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T18:16:07.2753891Z     return func(*args, **kwargs)
2022-08-09T18:16:07.2754157Z   File "test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:16:07.2754391Z     mha(query, key, key)
2022-08-09T18:16:07.2754761Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in _call_impl
2022-08-09T18:16:07.2755057Z     return forward_call(*input, **kwargs)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (crossref, 1, 2, linux.2xlarge) (6/11)

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

2022-08-09T18:17:50.9714205Z FAIL [0.003s]: tes...ht_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:17:50.9709064Z     return f(self, *args, **kwargs)
2022-08-09T18:17:50.9709728Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 882, in __torch_function__
2022-08-09T18:17:50.9710185Z     r = func(*args, **kwargs)
2022-08-09T18:17:50.9710819Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 5081, in multi_head_attention_forward
2022-08-09T18:17:50.9711487Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T18:17:50.9712195Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 4816, in _in_projection
2022-08-09T18:17:50.9712772Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T18:17:50.9713310Z AssertionError: expecting query bias shape of (12,), but got torch.Size([8])
2022-08-09T18:17:50.9713595Z 
2022-08-09T18:17:50.9713750Z ======================================================================
2022-08-09T18:17:50.9714205Z FAIL [0.003s]: test_multihead_attn_in_proj_weight_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:17:50.9714842Z ----------------------------------------------------------------------
2022-08-09T18:17:50.9715267Z Traceback (most recent call last):
2022-08-09T18:17:50.9715950Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T18:17:50.9716458Z     result = test(self, **param_kwargs)
2022-08-09T18:17:50.9717095Z   File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T18:17:50.9717554Z     return func(*args, **kwargs)
2022-08-09T18:17:50.9717945Z   File "test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:17:50.9718357Z     mha(query, key, key)
2022-08-09T18:17:50.9718944Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in _call_impl
2022-08-09T18:17:50.9719417Z     return forward_call(*input, **kwargs)

See GitHub Actions build pull / win-vs2019-cpu-py3 / test (default, 2, 2, windows.4xlarge) (7/11)

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

2022-08-09T19:07:42.3260426Z FAIL [0.000s]: tes...ht_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T19:07:42.3255922Z     _multihead_attn_test_helper(add_zero_attn=True)
2022-08-09T19:07:42.3256343Z   File "test_nn.py", line 5868, in _multihead_attn_test_helper
2022-08-09T19:07:42.3256776Z     result, result_weight = torch.nn.functional.multi_head_attention_forward(
2022-08-09T19:07:42.3257412Z   File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\nn\functional.py", line 5081, in multi_head_attention_forward
2022-08-09T19:07:42.3258007Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T19:07:42.3258610Z   File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\nn\functional.py", line 4816, in _in_projection
2022-08-09T19:07:42.3259177Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T19:07:42.3259648Z AssertionError: expecting query bias shape of (12,), but got torch.Size([8])
2022-08-09T19:07:42.3259895Z 
2022-08-09T19:07:42.3260031Z ======================================================================
2022-08-09T19:07:42.3260426Z FAIL [0.000s]: test_multihead_attn_in_proj_weight_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T19:07:42.3260894Z ----------------------------------------------------------------------
2022-08-09T19:07:42.3261259Z Traceback (most recent call last):
2022-08-09T19:07:42.3261833Z   File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\testing\_internal\common_device_type.py", line 377, in instantiated_test
2022-08-09T19:07:42.3262319Z     result = test(self, **param_kwargs)
2022-08-09T19:07:42.3262849Z   File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\autograd\grad_mode.py", line 27, in decorate_context
2022-08-09T19:07:42.3263309Z     return func(*args, **kwargs)
2022-08-09T19:07:42.3263824Z   File "test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T19:07:42.3264146Z     mha(query, key, key)
2022-08-09T19:07:42.3264645Z   File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\nn\modules\module.py", line 1186, in _call_impl
2022-08-09T19:07:42.3265189Z     return forward_call(*input, **kwargs)

See GitHub Actions build pull / linux-focal-py3.7-gcc7 / test (default, 1, 2, linux.2xlarge) (8/11)

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

2022-08-09T18:37:08.4429714Z RuntimeError: test_quantization failed!
2022-08-09T18:37:07.6751576Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.bc.test_backward_compatibility.TestSerialization-20220809182804.xml
2022-08-09T18:37:07.6772210Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.core.test_quantized_module.TestStaticQuantizedModule-20220809182804.xml
2022-08-09T18:37:07.6786112Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.fx.test_subgraph_rewriter.TestSubgraphRewriter-20220809182804.xml
2022-08-09T18:37:07.6790232Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.core.test_utils.TestUtils-20220809182804.xml
2022-08-09T18:37:07.6795123Z Generated XML report: test-reports/python-unittest/test_quantization/TEST-quantization.eager.test_quantize_eager_ptq.TestQuantizeEagerONNXExport-20220809182804.xml
2022-08-09T18:37:08.4425600Z Traceback (most recent call last):
2022-08-09T18:37:08.4426071Z   File "test/run_test.py", line 974, in <module>
2022-08-09T18:37:08.4427348Z     main()
2022-08-09T18:37:08.4427752Z   File "test/run_test.py", line 952, in main
2022-08-09T18:37:08.4429281Z     raise RuntimeError(err_message)
2022-08-09T18:37:08.4429714Z RuntimeError: test_quantization failed!
2022-08-09T18:37:08.7829589Z 
2022-08-09T18:37:08.7830266Z real	23m10.911s
2022-08-09T18:37:08.7830763Z user	99m7.379s
2022-08-09T18:37:08.7831619Z sys	2m51.574s
2022-08-09T18:37:08.7863410Z ##[error]Process completed with exit code 1.
2022-08-09T18:37:08.7910196Z Prepare all required actions
2022-08-09T18:37:08.7910499Z Getting action download info
2022-08-09T18:37:09.0040401Z ##[group]Run ./.github/actions/get-workflow-job-id
2022-08-09T18:37:09.0040626Z with:
2022-08-09T18:37:09.0040967Z   github-token: ***

See GitHub Actions build pull / linux-focal-py3.7-clang7-asan / test (default, 3, 5, linux.2xlarge) (9/11)

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

2022-08-09T18:25:18.6532576Z FAIL [0.003s]: tes...ht_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:25:18.6529691Z     _multihead_attn_test_helper(add_zero_attn=True)
2022-08-09T18:25:18.6529935Z   File "test_nn.py", line 5879, in _multihead_attn_test_helper
2022-08-09T18:25:18.6530184Z     average_attn_weights=average_attn_weights)
2022-08-09T18:25:18.6530586Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 5081, in multi_head_attention_forward
2022-08-09T18:25:18.6530956Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T18:25:18.6531367Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 4816, in _in_projection
2022-08-09T18:25:18.6531716Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T18:25:18.6532038Z AssertionError: expecting query bias shape of (12,), but got torch.Size([8])
2022-08-09T18:25:18.6532209Z 
2022-08-09T18:25:18.6532291Z ======================================================================
2022-08-09T18:25:18.6532576Z FAIL [0.003s]: test_multihead_attn_in_proj_weight_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:25:18.6533219Z ----------------------------------------------------------------------
2022-08-09T18:25:18.6533595Z Traceback (most recent call last):
2022-08-09T18:25:18.6534223Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T18:25:18.6534688Z     result = test(self, **param_kwargs)
2022-08-09T18:25:18.6535094Z   File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T18:25:18.6535359Z     return func(*args, **kwargs)
2022-08-09T18:25:18.6535606Z   File "test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:25:18.6535918Z     mha(query, key, key)
2022-08-09T18:25:18.6536273Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in _call_impl
2022-08-09T18:25:18.6536543Z     return forward_call(*input, **kwargs)

See GitHub Actions build pull / linux-bionic-cuda11.6-py3.10-gcc7 / test (default, 3, 4, linux.4xlarge.nvidia.gpu) (10/11)

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

2022-08-09T18:46:44.2486090Z FAIL [0.002s]: tes..._none_cuda_float64 (__main__.TestNNDeviceTypeCUDA)
2022-08-09T18:46:44.2481778Z     return forward_call(*input, **kwargs)
2022-08-09T18:46:44.2482283Z   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/activation.py", line 1144, in forward
2022-08-09T18:46:44.2482739Z     attn_output, attn_output_weights = F.multi_head_attention_forward(
2022-08-09T18:46:44.2483292Z   File "/opt/conda/lib/python3.10/site-packages/torch/nn/functional.py", line 5081, in multi_head_attention_forward
2022-08-09T18:46:44.2483800Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T18:46:44.2484379Z   File "/opt/conda/lib/python3.10/site-packages/torch/nn/functional.py", line 4816, in _in_projection
2022-08-09T18:46:44.2484838Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T18:46:44.2485292Z AssertionError: expecting query bias shape of (128,), but got torch.Size([75])
2022-08-09T18:46:44.2485541Z 
2022-08-09T18:46:44.2485684Z ======================================================================
2022-08-09T18:46:44.2486090Z FAIL [0.002s]: test_multihead_attn_in_proj_weight_none_cuda_float64 (__main__.TestNNDeviceTypeCUDA)
2022-08-09T18:46:44.2486596Z ----------------------------------------------------------------------
2022-08-09T18:46:44.2486953Z Traceback (most recent call last):
2022-08-09T18:46:44.2487477Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 1907, in wrapper
2022-08-09T18:46:44.2488201Z     method(*args, **kwargs)
2022-08-09T18:46:44.2488867Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T18:46:44.2489290Z     result = test(self, **param_kwargs)
2022-08-09T18:46:44.2489931Z   File "/opt/conda/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T18:46:44.2490305Z     return func(*args, **kwargs)
2022-08-09T18:46:44.2490699Z   File "/var/lib/jenkins/workspace/test/test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:46:44.2491071Z     mha(query, key, key)

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (default, 2, 2, linux.2xlarge) (11/11)

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

2022-08-09T18:17:19.4344239Z FAIL [0.002s]: tes...ht_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:17:19.4339294Z     _multihead_attn_test_helper(add_zero_attn=True)
2022-08-09T18:17:19.4339733Z   File "test_nn.py", line 5879, in _multihead_attn_test_helper
2022-08-09T18:17:19.4340165Z     average_attn_weights=average_attn_weights)
2022-08-09T18:17:19.4340848Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 5081, in multi_head_attention_forward
2022-08-09T18:17:19.4341468Z     q, k, v = _in_projection(query, key, value, q_proj_weight, k_proj_weight, v_proj_weight, b_q, b_k, b_v)
2022-08-09T18:17:19.4342203Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 4816, in _in_projection
2022-08-09T18:17:19.4342794Z     assert b_q is None or b_q.shape == (Eq,), f"expecting query bias shape of {(Eq,)}, but got {b_q.shape}"
2022-08-09T18:17:19.4343327Z AssertionError: expecting query bias shape of (12,), but got torch.Size([8])
2022-08-09T18:17:19.4343618Z 
2022-08-09T18:17:19.4343769Z ======================================================================
2022-08-09T18:17:19.4344239Z FAIL [0.002s]: test_multihead_attn_in_proj_weight_none_cpu_float64 (__main__.TestNNDeviceTypeCPU)
2022-08-09T18:17:19.4344895Z ----------------------------------------------------------------------
2022-08-09T18:17:19.4345320Z Traceback (most recent call last):
2022-08-09T18:17:19.4346022Z   File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 377, in instantiated_test
2022-08-09T18:17:19.4346537Z     result = test(self, **param_kwargs)
2022-08-09T18:17:19.4347162Z   File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
2022-08-09T18:17:19.4347628Z     return func(*args, **kwargs)
2022-08-09T18:17:19.4348042Z   File "test_nn.py", line 20880, in test_multihead_attn_in_proj_weight_none
2022-08-09T18:17:19.4348416Z     mha(query, key, key)
2022-08-09T18:17:19.4349019Z   File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in _call_impl
2022-08-09T18:17:19.4349490Z     return forward_call(*input, **kwargs)

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@bdhirsh bdhirsh added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 13, 2021
Copy link
Contributor
@jbschlosser jbschlosser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Do you mind adding a test as well in test/test_nn.py for the case of diff size qkv + bias?

@ZhiyuanChen
Copy link
Contributor Author

Thanks for the fix! Do you mind adding a test as well in test/test_nn.py for the case of diff size qkv + bias?

sure thing, i'll try to add it this week~

@github-actions
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 21, 2022
@ZhiyuanChen ZhiyuanChen force-pushed the patch-9 branch 2 times, most recently from b53ea7b to a26839b Compare June 16, 2022 04:37
@ZhiyuanChen
Copy link
Contributor Author

Hi @jbschlosser
Sorry this "week" is a bit toooo long ... Could you plz have a look if I get the test right?

@jbschlosser
Copy link
Contributor

@ZhiyuanChen Haha no problem! Unfortunately, based on the CI checks, it does look like the test is failing

@github-actions github-actions bot closed this Jul 16, 2022
@ZhiyuanChen
Copy link
Contributor Author

@ZhiyuanChen Haha no problem! Unfortunately, based on the CI checks, it does look like the test is failing

could you please reopen this pr so that i can look into it?

@jbschlosser jbschlosser reopened this Aug 9, 2022
@jbschlosser jbschlosser removed the Stale label Aug 9, 2022
@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@linux-foundation-easycla
Copy link
linux-foundation-easycla bot commented Oct 4, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ZhiyuanChen / name: Zhiyuan Chen (2e5a1cb)

@github-actions
Copy link
Contributor
github-actions bot commented Dec 3, 2022

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Dec 3, 2022
@pytorch-bot
Copy link
pytorch-bot bot commented Dec 13, 2022
< 8000 form class="js-comment-update" id="issuecomment-1348417951-edit-form" data-turbo="false" action="/pytorch/pytorch/issue_comments/1348417951" accept-charset="UTF-8" method="post">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed open source Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0