Hello,
When trying to invoke the pytorch inference code from c++ using python binding the code gets hung indefinitely in torch.load(model, map_location=“cuda:0”) for GPU models. However for cpu models I have no issue.
Although the GPU model hangs if invoked via python -bindings, the same inference code run successfully for both GPU and CPU models when invoked via python interpreter.
Following is the detail of my setup:
Installation command: conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
nvcc version:
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
nvidia-smi:
Screenshot from 2020-05-24 13-12-02727×331 35.9 KB
Any clue?