How torch.fft.fft works in autograd?

Hi,
In autograd, what math is used to compute the gradient of fft?
#an example
import torch
asd = torch.linspace(1,100,100).view(-1,1)
x3 = asd.repeat(1,100)
yobs3 = torch.fft.fft(x3**2,n=1024,dim=1)+2.0
yobs3
x3.requires_grad=True
y3 = torch.fft.fft(x3**2,n=1024,dim=1)
y3
loss3 = torch.sum((y3-yobs3)**2)
loss3.backward()
print(x3.grad)