>>> x=torch.randn(3, 3, dtype=torch.cfloat, requires_grad=True)
>>> y=x.trace()
>>> y.backward()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chourdiaanjali/pytorch2/torch/tensor.py", line 225, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/chourdiaanjali/pytorch2/torch/autograd/__init__.py", line 147, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
RuntimeError: _th_index_fill_ not supported on CPUType for ComplexFloat
I ran the code below after locally rebasing on #50380 and adding
tracetoGRADIENT_IMPLEMENTED_FOR_COMPLEXingen_variable_type.py.cc @ezyang @anjali411 @dylanbespalko @mruberry