pytorch / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
https://pytorch.org
Other
82.12k stars 22.08k forks source link

DISABLED test_flash_attention_vs_math_ref_grads_batch_size_1_seq_len_q_1024_seq_len_k_1024_head_dim_21_is_causal_False_dropout_p_0_22_float16_scale0_cuda_float16 (__main__.TestSDPACudaOnlyCUDA) #131456

Open pytorch-bot[bot] opened 1 month ago

pytorch-bot[bot] commented 1 month ago

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 3 workflow(s) with 3 failures and 3 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:

  1. Click on the workflow logs linked above
  2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
  3. 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_False_dropout_p_0_22_float16_scale0_cuda_float16
  4. 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([[[[-1.6060e-03, -4.5128e-03, -8.9359e-04, ..., 4.6577e-03, 1.3173e-05, -9.0408e-03], [ 5.0240e-03, -1.6270e-03, -1.8406e-03, ..., -2.4452e-03, 2.4605e-03, -1.1368e-03], [-5.1880e-03, -7.3385e-04, -8.9264e-03, ..., 5.6152e-03, 2.0859e-02, -1.4587e-02], ..., [-7.1678e-03, -3.1686e-04, -8.7204e-03, ..., 1.6460e-03, -1.0424e-03, -5.9128e-03], [-5.3024e-03, 2.7332e-03, 7.8735e-03, ..., 1.7481e-03, 2.9526e-03, 2.1400e-03], [-2.0289e-04, -4.3640e-03, -5.5733e-03, ..., 1.6165e-03, -4.3564e-03, -2.5539e-03]], [[ 4.2267e-03, -3.5744e-03, -9.6359e-03, ..., -5.8031e-04, 6.8855e-04, -3.2158e-03], [-4.1676e-04, -4.8981e-03, -5.0545e-03, ..., 3.2368e-03, -6.0196e-03, -4.2343e-03], [ 5.6381e-03, -6.4611e-04, -3.8948e-03, ..., 1.3065e-03, 1.8692e-03, 4.8904e-03], ..., [ 6.0959e-03, 1.1345e-02, -4.6082e-03, ..., 2.5291e-03, -4.2610e-03, 3.4370e-03], [ 6.5613e-03, -6.9084e-03, 3.4180e-03, ..., -6.3419e-04, -6.7444e-03, -2.7695e-03], [ 8.8024e-04, 6.3820e-03, -4.5242e-03, ..., 4.1733e-03, -5.1270e-03, -3.3641e-04]], [[-5.4626e-03, -4.9353e-04, -3.2082e-03, ..., -4.9095e-03, -5.9175e-04, 1.3229e-02], [ 2.2640e-03, -4.5357e-03, -1.5335e-03, ..., 2.5959e-03, -7.0724e-03, 3.7861e-04], [-3.0193e-03, 2.9182e-03, 2.8300e-04, ..., 3.0231e-03, -5.2643e-03, 1.3893e-02], ..., [ 4.6425e-03, -2.8248e-03, -5.2643e-03, ..., 3.7308e-03, 4.1542e-03, 1.0557e-03], [ 7.8430e-03, -2.4853e-03, 7.6714e-03, ..., -4.0793e-04, 2.2221e-03, -2.6474e-03], [-3.8986e-03, -2.7142e-03, 2.1992e-03, ..., 1.5860e-03, 3.9177e-03, -1.9073e-04]], [[-2.3861e-03, 6.9313e-03, 4.5738e-03, ..., -3.4332e-03, 6.1531e-03, -3.6125e-03], [ 5.6992e-03, 8.7585e-03, -4.9706e-03, ..., 4.3678e-04, 3.5172e-03, -7.2708e-03], [ 2.1248e-03, -2.5787e-03, -6.1264e-03, ..., 5.7697e-04, -2.9964e-03, 3.8815e-03], ..., [ 2.8305e-03, -1.3530e-05, 3.3932e-03, ..., 1.2413e-02, 7.6342e-04, 6.3171e-03], [-1.0490e-03, 1.4473e-02, -5.3253e-03, ..., -3.3355e-04, 2.7771e-03, -9.4452e-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([[[[-1.5860e-03, -4.4899e-03, -8.7500e-04, ..., 4.6768e-03, 3.3617e-05, -9.0179e-03], [ 5.0087e-03, -1.6413e-03, -1.8578e-03, ..., -2.4624e-03, 2.4433e-03, -1.1539e-03], [-5.1689e-03, -7.1335e-04, -8.9035e-03, ..., 5.6381e-03, 2.0889e-02, -1.4565e-02], ..., [-7.2136e-03, -3.6955e-04, -8.7662e-03, ..., 1.5955e-03, -1.0948e-03, -5.9624e-03], [-5.3024e-03, 2.7351e-03, 7.8735e-03, ..., 1.7509e-03, 2.9526e-03, 2.1439e-03], [-1.5628e-04, -4.3182e-03, -5.5237e-03, ..., 1.6651e-03, -4.3106e-03, -2.5024e-03]], [[ 4.2038e-03, -3.6011e-03, -9.6588e-03, ..., -6.0463e-04, 6.6280e-04, -3.2406e-03], [-4.7016e-04, -4.9515e-03, -5.1117e-03, ..., 3.1834e-03, -6.0730e-03, -4.2877e-03], [ 5.6725e-03, -6.1846e-04, -3.8643e-03, ..., 1.3361e-03, 1.8997e-03, 4.9210e-03], ..., [ 6.0883e-03, 1.1337e-02, -4.6158e-03, ..., 2.5234e-03, -4.2648e-03, 3.4332e-03], [ 6.5651e-03, -6.9008e-03, 3.4237e-03, ..., -6.3038e-04, -6.7406e-03, -2.7657e-03], [ 8.7500e-04, 6.3782e-03, -4.5319e-03, ..., 4.1656e-03, -5.1308e-03, -3.4070e-04]], [[-5.4932e-03, -5.2404e-04, -3.2387e-03, ..., -4.9400e-03, -6.2704e-04, 1.3191e-02], [ 2.2602e-03, -4.5395e-03, -1.5354e-03, ..., 2.5883e-03, -7.0763e-03, 3.7503e-04], [-3.0537e-03, 2.8820e-03, 2.4724e-04, ..., 2.9888e-03, -5.3024e-03, 1.3855e-02], ..., [ 4.6272e-03, -2.8439e-03, -5.2834e-03, ..., 3.7117e-03, 4.1351e-03, 1.0376e-03], [ 7.7934e-03, -2.5349e-03, 7.6218e-03, ..., -4.6015e-04, 2.1744e-03, -2.6951e-03], [-3.8853e-03, -2.6989e-03, 2.2163e-03, ..., 1.6041e-03, 3.9330e-03, -1.7619e-04]], [[-2.3956e-03, 6.9199e-03, 4.5624e-03, ..., -3.4428e-03, 6.1417e-03, -3.6240e-03], [ 5.7297e-03, 8.7967e-03, -4.9400e-03, ..., 4.6802e-04, 3.5477e-03, -7.2365e-03], [ 2.2278e-03, -2.4738e-03, -6.0272e-03, ..., 6.7377e-04, -2.8934e-03, 3.9825e-03], ..., [ 2.7714e-03, -6.9618e-05, 3.3340e-03, ..., 1.2360e-02, 7.0620e-04, 6.2599e-03], [-1.0433e-03, 1.4488e-02, -5.3215e-03, ..., -3.2687e-04, 2.7866e-03, -9.4452e-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.004000000189989805, 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_False_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

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @clee2000

pytorch-bot[bot] commented 1 month ago
Hello there! From the DISABLED prefix in this issue title, it looks like you are attempting to disable a test in PyTorch CI. The information I have parsed is below: * Test name: `test_flash_attention_vs_math_ref_grads_batch_size_1_seq_len_q_1024_seq_len_k_1024_head_dim_21_is_causal_False_dropout_p_0_22_float16_scale0_cuda_float16 (__main__.TestSDPACudaOnlyCUDA)` * Platforms for which to skip the test: linux * Disabled by `pytorch-bot[bot]` Within ~15 minutes, `test_flash_attention_vs_math_ref_grads_batch_size_1_seq_len_q_1024_seq_len_k_1024_head_dim_21_is_causal_False_dropout_p_0_22_float16_scale0_cuda_float16 (__main__.TestSDPACudaOnlyCUDA)` will be disabled in PyTorch CI for these platforms: linux. Please verify that your test name looks correct, e.g., `test_cuda_assert_async (__main__.TestCuda)`. To modify the platforms list, please include a line in the issue body, like below. The default action will disable the test for all platforms if no platforms list is specified. ``` Platforms: case-insensitive, list, of, platforms ``` We currently support the following platforms: asan, dynamo, inductor, linux, mac, macos, rocm, slow, win, windows.