Hi,
The issue here is not with the fft but the torch.prod operation that does not support autograd for complex inputs at the moment.
Complex autograd is work in progress but you can open a feature request on github if you need it now.