mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

[Bug] run device is wrong

Open Winnie202 opened this issue 1 year ago • 0 comments

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 2024-04-26 18-52-33屏幕截图

2024-04-26 18-54-34屏幕截图

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

Winnie202 avatar Apr 26 '24 10:04 Winnie202