I have read the simple tutorial (https://pytorch.org/tutorials/advanced/cpp_export.html). And the doc just tells me using the following code to using gpu:
However, I have several gpus on my server, and I want to use the specific gpu, for example gpu 0. Just like the following python code:
device = torch.device("cuda:0") model.to(device)
Could you give me some advice? Thanks a lot.