-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Platforms: linux
This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.
Over the past 3 hours, it has been determined flaky in 2 workflow(s) with 6 failures and 2 successes.
Debugging instructions (after clicking on the recent samples link):
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
- Click on the workflow logs linked above
- Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
- Grep for
test_flash_attention_vs_math_ref_grads_batch_size_1_seq_len_q_1024_seq_len_k_1024_head_dim_21_is_causal_True_dropout_p_0_22_float16_scale0_cuda_float16
- There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.
Sample error message
Traceback (most recent call last):
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1228, in not_close_error_metas
pair.compare()
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_comparison.py", line 710, in compare
self._compare_values(actual, expected)
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_comparison.py", line 837, in _compare_values
compare_fn(
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1016, in _compare_regular_values_close
matches = torch.isclose(
RuntimeError: atol must be greater than or equal to zero, but got nan
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/lib/jenkins/workspace/test/test_transformers.py", line 3039, in test_flash_attention_vs_math_ref_grads
self.assertEqual(query.grad, query_ref.grad.to(query.grad.dtype),
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3682, in assertEqual
error_metas = not_close_error_metas(
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1234, in not_close_error_metas
raise RuntimeError(
RuntimeError: Comparing
TensorOrArrayPair(
id=(),
actual=tensor([[[[-3.0577e-05, -1.3709e-06, -1.6034e-05, ..., -4.4167e-05,
-2.5630e-06, -3.7193e-05],
[ 1.5533e-02, -5.8060e-03, -2.6283e-03, ..., 3.2867e-02,
-4.2236e-02, 1.9226e-02],
[-3.1616e-02, -4.5044e-02, 4.3457e-02, ..., 1.6882e-01,
1.2842e-01, 1.4885e-02],
...,
[-7.0381e-03, -3.9482e-04, -8.4991e-03, ..., 2.1000e-03,
-7.2908e-04, -6.3744e-03],
[-5.5504e-03, 3.2063e-03, 7.5035e-03, ..., 1.2159e-03,
2.5597e-03, 1.6136e-03],
[-2.0289e-04, -4.3640e-03, -5.5733e-03, ..., 1.6165e-03,
-4.3564e-03, -2.5539e-03]],
[[ 4.9472e-05, 1.1086e-05, 5.3048e-06, ..., 8.7619e-06,
7.5102e-06, 1.1027e-05],
[ 3.6240e-03, 1.1238e-02, 7.9880e-03, ..., 9.7275e-03,
1.3168e-02, 1.1314e-02],
[-4.9561e-02, -8.9478e-02, -5.1575e-02, ..., -1.1066e-01,
-1.2354e-01, -1.0883e-01],
...,
[ 6.1188e-03, 1.1284e-02, -4.6043e-03, ..., 2.7180e-03,
-3.8376e-03, 2.9182e-03],
[ 6.6719e-03, -7.0152e-03, 3.4924e-03, ..., -7.2718e-04,
-6.7711e-03, -2.8648e-03],
[ 8.8024e-04, 6.3820e-03, -4.5242e-03, ..., 4.1733e-03,
-5.1270e-03, -3.3641e-04]],
[[-1.4067e-05, -3.5822e-05, -4.6015e-05, ..., -2.0146e-05,
-1.8239e-05, -3.0994e-05],
[-9.4055e-02, -9.9731e-02, -2.0996e-02, ..., -2.4368e-02,
-1.1914e-01, 2.0410e-01],
[ 8.5999e-02, -2.9785e-02, -1.3354e-01, ..., 2.2903e-02,
9.2346e-02, -7.8491e-02],
...,
[ 4.5357e-03, -2.8477e-03, -5.3215e-03, ..., 3.6945e-03,
4.1199e-03, 9.4318e-04],
[ 7.9346e-03, -2.9736e-03, 7.4425e-03, ..., -2.6917e-04,
1.9798e-03, -2.5005e-03],
[-3.8986e-03, -2.7142e-03, 2.1992e-03, ..., 1.5860e-03,
3.9177e-03, -1.9073e-04]],
[[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00,
0.0000e+00, 0.0000e+00],
[-1.1072e-01, 3.2471e-02, 6.0303e-02, ..., 1.0461e-01,
4.5502e-02, -9.9792e-03],
[-4.1473e-02, 1.1249e-01, 2.9495e-02, ..., 1.4478e-01,
8.4045e-02, 4.0283e-03],
...,
[ 2.6608e-03, -1.0532e-04, 3.3970e-03, ..., 1.2558e-02,
7.6914e-04, 6.1874e-03],
[-1.2074e-03, 1.4450e-02, -5.3673e-03, ..., -3.2973e-04,
2.8343e-03, -9.5291e-03],
[-2.0087e-04, -2.4281e-03, 3.9215e-03, ..., -5.6076e-03,
-8.8120e-03, -3.7212e-03]]]], device='cuda:0', dtype=torch.float16),
expected=tensor([[[[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00,
0.0000e+00, 0.0000e+00],
[ 1.5640e-02, -5.7831e-03, -2.5444e-03, ..., 3.2990e-02,
-4.2114e-02, 1.9348e-02],
[-3.1677e-02, -4.5074e-02, 4.3427e-02, ..., 1.6882e-01,
1.2842e-01, 1.4809e-02],
...,
[-7.0190e-03, -3.7479e-04, -8.4763e-03, ..., 2.1210e-03,
-7.0953e-04, -6.3553e-03],
[-5.5580e-03, 3.2005e-03, 7.4959e-03, ..., 1.2102e-03,
2.5539e-03, 1.6060e-03],
[-1.5628e-04, -4.3182e-03, -5.5237e-03, ..., 1.6651e-03,
-4.3106e-03, -2.5024e-03]],
[[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00,
0.0000e+00, 0.0000e+00],
[ 3.6983e-03, 1.1276e-02, 8.0109e-03, ..., 9.7580e-03,
1.3206e-02, 1.1345e-02],
[-4.9683e-02, -8.9539e-02, -5.1636e-02, ..., -1.1066e-01,
-1.2354e-01, -1.0889e-01],
...,
[ 6.0997e-03, 1.1261e-02, -4.6234e-03, ..., 2.6989e-03,
-3.8567e-03, 2.9011e-03],
[ 6.6872e-03, -6.9962e-03, 3.5114e-03, ..., -7.1192e-04,
-6.7558e-03, -2.8477e-03],
[ 8.7500e-04, 6.3782e-03, -4.5319e-03, ..., 4.1656e-03,
-5.1308e-03, -3.4070e-04]],
[[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00,
0.0000e+00, 0.0000e+00],
[-9.3994e-02, -9.9487e-02, -2.0752e-02, ..., -2.4261e-02,
-1.1902e-01, 2.0410e-01],
[ 8.6121e-02, -2.9510e-02, -1.3330e-01, ..., 2.3071e-02,
9.2529e-02, -7.8308e-02],
...,
[ 4.5853e-03, -2.8000e-03, -5.2757e-03, ..., 3.7403e-03,
4.1656e-03, 9.8705e-04],
[ 7.9269e-03, -2.9831e-03, 7.4348e-03, ..., -2.7657e-04,
1.9741e-03, -2.5082e-03],
[-3.8853e-03, -2.6989e-03, 2.2163e-03, ..., 1.6041e-03,
3.9330e-03, -1.7619e-04]],
[[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00,
0.0000e+00, 0.0000e+00],
[-1.1072e-01, 3.2471e-02, 6.0303e-02, ..., 1.0461e-01,
4.5502e-02, -9.9792e-03],
[-4.1504e-02, 1.1243e-01, 2.9434e-02, ..., 1.4478e-01,
8.3984e-02, 3.9673e-03],
...,
[ 2.6760e-03, -8.8751e-05, 3.4122e-03, ..., 1.2573e-02,
7.8535e-04, 6.2027e-03],
[-1.2016e-03, 1.4458e-02, -5.3635e-03, ..., -3.2330e-04,
2.8419e-03, -9.5215e-03],
[-1.9443e-04, -2.4185e-03, 3.9291e-03, ..., -5.6038e-03,
-8.8043e-03, -3.7117e-03]]]], device='cuda:0', dtype=torch.float16),
rtol=0.001,
atol=nan,
equal_nan=True,
check_device=False,
check_dtype=True,
check_layout=False,
check_stride=False,
)
resulted in the unexpected exception above. If you are a user and see this message during normal operation please file an issue at https://github.com/pytorch/pytorch/issues. If you are a developer and working on the comparison functions, please except the previous error and raise an expressive `ErrorMeta` instead.
To execute this test, run the following from the base repo dir:
python test/test_transformers.py -k TestSDPACudaOnlyCUDA.test_flash_attention_vs_math_ref_grads_batch_size_1_seq_len_q_1024_seq_len_k_1024_head_dim_21_is_causal_True_dropout_p_0_22_float16_scale0_cuda_float16
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
Test file path: test_transformers.py
ConnectionTimeoutError: Connect timeout for 5000ms, GET https://raw.githubusercontent.com/pytorch/pytorch/main/test/test_transformers.py -2 (connected: false, keepalive socket: false, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}
cc @clee2000