mmdeploy
mmdeploy copied to clipboard
[Bug] run device is wrong
Checklist
- [X] I have searched related issues but cannot get the expected help.
- [X] 2. I have read the FAQ documentation but cannot get the expected help.
- [X] 3. The bug has not been fixed in the latest version.
Describe the bug
import torch from mmdeploy.backend.tensorrt import TRTWrapper engine_file = 'tensorrt/edvr_new_batch20.trt' model = TRTWrapper(engine_file,device_id=1) inputs = dict(input=torch.randn(2,3, 3, 288, 352).cuda()) outputs = model(inputs) print(outputs)
I set gpu device=1,but run device is 0
Reproduction
import torch from mmdeploy.backend.tensorrt import TRTWrapper engine_file = 'tensorrt/edvr_new_batch20.trt' model = TRTWrapper(engine_file,device_id=1) inputs = dict(input=torch.randn(2,3, 3, 288, 352).cuda()) outputs = model(inputs) print(outputs)
Environment
openmim 0.3.9
mmcv 2.0.0rc4
mmdeploy 1.3.1
mmdeploy-runtime-gpu 1.3.1
tensorrt 8.5.1.7
Error traceback
No response