Open jeanfeydy opened 9 months ago
Hi @jeanfeydy ,
I think you are right ; this torch.cuda.is_available()
command probably comes from before we implemented keopscore.
Maybe I left it because I was thinking that we need torch.cuda.is_available()
to be True in any case, but I don't think it is the case : we may be able to use the Gpu in the "from host" mode when cuda is detected as available by keops, but not by PyTorch for some extra reason.
So I am just testing your fix now ; we will see if it runs ok.
Hi @joanglaunes,
I hope that you are doing well! With @Louis-Pujol, we just realized that KeOps is currently broken on configurations where:
nvrtc.h
is missing.torch.cuda.is_available() == True
.This is due to this line in
pykeops.torch.__init__.py
, that overridespykeops.config.gpu_available
(that isFalse
) withtorch.cuda.is_available()
(that isTrue
). KeOps then tries to compile formulas using the GPU, which doesn't work sincenvrtc.h
is not available.As far as I can tell, a simple fix would just be to remove this line... But since you wrote it back in 2022, I assume that it is there for a reason. What do you think?
Best regards, Jean