tft icon indicating copy to clipboard operation
tft copied to clipboard

Use TFT with GPU

Open vidarsumo opened this issue 3 years ago • 3 comments

I tested TFT on a Azure DSVM which has CUDA and cuDNN installed (https://docs.microsoft.com/en-us/azure/machine-learning/data-science-virtual-machine/tools-included) but it did not use the GPU (V100). Do I have to do something so TFT uses the GPU?

vidarsumo avatar Aug 27 '22 11:08 vidarsumo

Hello @vidarsumo Looking for device = in the code gives you the clue that the code seems pretty complete in sending all tensor to device = "gpu" everywhere. But we may have miss something. Currently the CI/CD workflow of the package is not run on GPU. But on cloud, there is always a chance that the GPU may not be detected depending on virtualization stack. Can you confirm

  1. you get the expected result from torch::cuda_is_available() and torch::cuda_device_count()
  2. you configured an explicit device = "cuda" in the tft config parameter ? Hope it helps

cregouby avatar Sep 13 '22 16:09 cregouby

torch::cuda_is_available() is FALSE so I need to check on that. But I did not find anything in the code where I could set device = "gpu".

vidarsumo avatar Sep 17 '22 17:09 vidarsumo

Hello @vidarsumo Sorry, my mistake, device = "cuda" is not available on the user API, and is poorly used and configured in the code. We definitively need to improve on that.

cregouby avatar Sep 20 '22 07:09 cregouby