So I built PyTorch and torch_xla following these discussions and I can import torch and torch_xla but I can’t get any devices to work. When I call xla_device() I get an error saying “Missing XLA configuration”. I want to run on GPU ideally. If I call xla_device(devkind=‘GPU’) the call just hangs (no clue if thats a valid device kind but I thought I’d give it a try).
I’m not really sure how to debug further here. It seems like everything built correctly but something in my environment isn’t configured correctly. I’m not sure how to find out what that is however. Any thoughts?
The contributing build instructions never said anything about that. That environment variable is just empty on my side (if it is normally set as a part of the build process somehow, its no longer set in my environment)
I’m using dual 3090s, nvidia-smi returns the following
Can you share the text of the build output with USE_CUDA=1 set explicitly during the build? You might also want to build with --cmake to make sure the results/cmake output are shown during the build.
Issues · pytorch/xla · GitHub would be a better place to ask pt/xla related questions. For you question I think you need to export GPU_NUM_DEVICES=2 if you want to use both of your GPU. For the device type if you do
import torch_xla.core.xla_model as xm
device = xm.xla_device()