trunk/9d4b149c1eac79a8c40d279c90f2c7115a7602d8: Document that backward gradients have undefined strides (#195210)
- PyTorch: 211 events in the last 90 days
- PyTorch: 208th Release in the last 90 days
- Previous: earlier the same day · trunk/6060fdb0ae15b62cf04fd50d20fabf2eb84f33b2: Fix FakeTensor wrapping for meta tensor constructor (#186188)
What happened
In #194719 a triton_op backward kernel silently computed wrong gradients: torch.cat's backward passes each input a non-contiguous narrow view of the upstream gradient, and the kernel indexed the grads assuming they shared the forward output's contiguous layout. Nothing in the docs states that the autograd engine may do this, and neither gradcheck nor opcheck can surface it (both only exercise contiguous grad_outputs…
Summary assembled by rule from the sources below