Hi,
I installed PyTorch for AMD ROCm™ using this
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2
and ran a simple code
import os
import torch
os.environ[“CUDA_VISIBLE_DEVICES”]=“0,1” # ‘0’ is the NVIDIA GPU card, ‘1’ is AMD radeon GPU
t1 = torch.zeros(2,3, device=‘cuda:1’)
But got this error
RuntimeError: Unexpected error from hipGetDeviceCount(). Did you run some cuda functions before calling NumHipDevices() that might have already set an error? Error 101: hipErrorInvalidDevice
Could you help?
Thanks