NVIDIA-AI-IOT / trt_pose

Real-time pose estimation accelerated with NVIDIA TensorRT
MIT License
974 stars 291 forks source link

trt_pose is not utilizing GPU #150

Open ksh0522 opened 2 years ago

ksh0522 commented 2 years ago

Hi, I insatlled trt_pose and run sample code Howerver it took too long running time. I checked GPU resource by JTOP while running the code, and I found that jetson nano doesn't use GPU while running.

I'm using pytorch 1.8 torchvision 0.9.0 jetpack 4.6 CUDA 10.2.300 opencv 4.5.4 compiled CUDA : YES TensorRT 8.0.1.6 and swap memory 8GB

when I checked running time by using below code,

model_trt = TRTModule() model_trt.load_state_dict(torch.load(OPTIMIZED_MODEL))

t0 = time.time() torch.cuda.current_stream().synchronize() for i in range(50): y = model_trt(data) torch.cuda.current_stream().synchronize() t1 = time.time()

print(50.0 / (t1 - t0))

it reported value : 5~ 6

I think it should be more than 10, but it's low

I think that's because it's not using GPU resource.

How can I solve this problem?