Open pytorch-bot[bot] opened 1 month ago
Another case of trunk flakiness has been found here. Reopening issue. The list of platforms [linux] does not appear to contain all the recently affected platforms [linux, slow]. Adding [slow].
Another case of trunk flakiness has been found here. The list of platforms [linux, slow] appears to contain all the recently affected platforms [linux]. Either the change didn't propogate fast enough or disable bot might be broken.
Another case of trunk flakiness has been found here. The list of platforms [linux, slow] appears to contain all the recently affected platforms [linux]. Either the change didn't propogate fast enough or disable bot might be broken.
Platforms: linux, slow
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 2 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:
test_flash_attention_vs_math_ref_grads_batch_size_1_seq_len_q_1024_seq_len_k_1024_head_dim_192_is_causal_True_dropout_p_0_0_bfloat16_scale_l1_cuda_bfloat16
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.9791e-08, -1.3679e-08, -3.5623e-08, ..., -2.3283e-08, -7.0315e-08, -5.7742e-08], [ 1.3638e-04, 2.1362e-04, 1.6975e-04, ..., 2.0409e-04, 1.6975e-04, 4.6968e-05], [ 1.5945e-03, 1.1978e-03, -1.0300e-04, ..., 3.9291e-04, -2.8381e-03, 2.3804e-03], ..., [-3.1471e-05, -2.1362e-04, 6.5267e-06, ..., 9.4414e-05, 1.5640e-04, 4.9591e-05], [ 4.0054e-05, -6.9618e-05, -9.2030e-05, ..., 1.7166e-04, 1.3542e-04, 1.1253e-04], [ 3.3230e-06, -1.0347e-04, 2.3991e-06, ..., 2.1553e-04, 2.3746e-04, 1.3828e-04]], [[-6.5658e-08, -5.0059e-08, -7.0941e-10, ..., -9.5461e-08, -8.6729e-09, -8.5682e-08], [ 1.3504e-03, 1.6861e-03, -4.2114e-03, ..., 9.2697e-04, -1.0910e-03, 1.6594e-04], [ 4.6158e-04, 7.6294e-04, -9.0790e-04, ..., 2.4033e-04, -1.1778e-04, 6.8188e-05], ..., [ 1.4877e-04, -1.4973e-04, -2.4986e-04, ..., -1.0371e-05, -1.3542e-04, -1.7524e-05], [ 1.0347e-04, -1.8501e-04, -7.0572e-05, ..., -8.9169e-05, -1.3530e-05, 3.4332e-05], [ 1.0300e-04, -7.4863e-05, -1.4496e-04, ..., 8.7738e-05, 5.9843e-05, 7.2122e-06]], [[-2.9802e-08, -7.2177e-08, -8.1956e-08, ..., -2.6776e-08, -2.9104e-08, -5.5414e-08], [-1.3351e-03, 3.3379e-04, 1.1673e-03, ..., 8.7261e-05, -4.1389e-04, -5.1880e-04], [-1.1520e-03, -3.0212e-03, -2.5482e-03, ..., 3.8147e-03, 2.3193e-03, -3.4332e-03], ..., [ 5.6028e-05, -7.7724e-05, 7.9870e-06, ..., -1.0300e-04, 1.4842e-05, 1.7166e-04], [ 6.3419e-05, -5.4359e-05, -2.4199e-05, ..., -4.2617e-06, 2.7895e-05, 1.4496e-04], [ 7.7248e-05, -2.8610e-05, -5.8889e-05, ..., -3.8147e-05, 7.1049e-05, 1.3351e-04]], [[-4.0280e-08, -6.7521e-08, -5.8208e-08, ..., -3.4226e-08, -6.4261e-08, -1.9209e-08], [-6.1035e-04, 3.2234e-04, -1.1349e-04, ..., -1.4687e-04, 2.2030e-04, -1.9836e-04], [ 3.0899e-04, -9.9182e-05, -8.1635e-04, ..., -3.8719e-04, -5.8746e-04, 4.9210e-04], ..., [ 4.2439e-05, 3.9101e-05, 1.8597e-04, ..., 2.9087e-05, -1.3351e-05, 7.5340e-05], [ 5.1737e-05, 1.8954e-05, 7.0095e-05, ..., -2.2531e-05, -4.7684e-05, 3.9577e-05], [ 4.1164e-07, 2.1338e-05, 2.5368e-04, ..., 5.6326e-06, 2.6375e-06, 4.8637e-05]]]], device='cuda:0', dtype=torch.bfloat16), expected=tensor([[[[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00, 0.0000e+00, 0.0000e+00], [ 4.6492e-05, 9.7275e-05, 4.2915e-05, ..., 7.8678e-05, -5.7220e-06, -5.5075e-05], [ 1.5793e-03, 1.1826e-03, -1.2112e-04, ..., 3.7384e-04, -2.8534e-03, 2.3499e-03], ..., [-4.1008e-05, -2.2316e-04, -2.9951e-06, ..., 8.4877e-05, 1.4591e-04, 4.0054e-05], [ 3.8445e-06, -1.0681e-04, -1.3065e-04, ..., 1.3542e-04, 9.6798e-05, 7.4863e-05], [-1.3053e-05, -1.2064e-04, -1.4722e-05, ..., 1.9836e-04, 2.1935e-04, 1.2064e-04]], [[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00, 0.0000e+00, 0.0000e+00], [ 1.4877e-03, 1.7700e-03, -4.0894e-03, ..., 1.1520e-03, -1.0452e-03, 3.8338e-04], [ 3.8147e-04, 6.7139e-04, -1.0147e-03, ..., 1.3256e-04, -1.7834e-04, -4.5538e-05], ..., [ 1.6212e-04, -1.3733e-04, -2.3842e-04, ..., 2.3395e-06, -1.2302e-04, -4.5300e-06], [ 1.1015e-04, -1.7834e-04, -6.3896e-05, ..., -8.2016e-05, -6.7949e-06, 4.1246e-05], [ 1.1444e-04, -6.2943e-05, -1.3256e-04, ..., 9.9182e-05, 7.1526e-05, 1.8835e-05]], [[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00, 0.0000e+00, 0.0000e+00], [-1.4725e-03, 1.8120e-04, 1.0376e-03, ..., 2.9325e-05, -5.0354e-04, -6.7139e-04], [-1.1902e-03, -3.0518e-03, -2.5940e-03, ..., 3.7994e-03, 2.2888e-03, -3.4790e-03], ..., [ 4.6968e-05, -8.6784e-05, -7.7859e-07, ..., -1.1158e-04, 5.7220e-06, 1.6308e-04], [ 3.1233e-05, -8.6308e-05, -5.6505e-05, ..., -3.6001e-05, -4.9770e-06, 1.1206e-04], [ 3.9577e-05, -6.4850e-05, -9.6321e-05, ..., -7.4387e-05, 3.3617e-05, 9.6321e-05]], [[ 0.0000e+00, 0.0000e+00, 0.0000e+00, ..., 0.0000e+00, 0.0000e+00, 0.0000e+00], [-4.6349e-04, 4.5395e-04, 3.2663e-05, ..., -5.4598e-05, 3.5286e-04, -1.3638e-04], [ 3.3188e-04, -7.0572e-05, -8.0109e-04, ..., -3.7575e-04, -5.6839e-04, 5.0735e-04], ..., [ 4.7125e-07, -4.0531e-06, 1.4400e-04, ..., -1.3649e-05, -5.5552e-05, 3.3379e-05], [ 2.2411e-05, -1.0788e-05, 4.0770e-05, ..., -5.1975e-05, -7.6771e-05, 1.0490e-05], [-3.2902e-05, -1.2577e-05, 2.2030e-04, ..., -2.7776e-05, -3.0756e-05, 1.5497e-05]]]], device='cuda:0', dtype=torch.bfloat16), rtol=0.016, 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_192_is_causal_True_dropout_p_0_0_bfloat16_scale_l1_cuda_bfloat16 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