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()

you should get a xla gpu device. You can take a look at this colab (xla/resnet18-training.ipynb at e660482795cbf394b1ae4b29ee079a33a7a056be · pytorch/xla · GitHub)