Thank you for your reply! I am not compiling anything. I am just using a python code from GitHub and running it the way it is, with the exception of adding .cuda() to some of the parameters. Here is the link: https://github.com/tonyduan/normalizing-flows 3 As I said, adding .cuda() woks just fine on the other machine, but not on the one I am using right now. However the machine I am using right now, handles .cuda() for other scripts (I ran lots of code on GPU on this machine), I am not sure what is wrong with this particular one.