Interestingly, I had a small example of a tensor on the gpu being added to a constant and that worked. But then, the backward operation on the picture above did not. Apparently my Torch installation was not entirely broken per say.
I solved it based on what was said in
I uninstalled cuda from /usr/local/ and rebuilt my conda environment and that error no longer happens.