shouxieai / infer

A new tensorrt integrate. Easy to integrate many tasks
MIT License
376 stars 76 forks source link

During preprocessing image, error reported in "warp_affine_bilinear_and_normalize_plane_kernel" #6

Closed ghmchen closed 1 year ago

ghmchen commented 1 year ago

I get error message :"[yolo.cu:339]: CUDA Runtime error💥 cudaPeekAtLastError() # too many resources requested for launch, code = cudaErrorLaunchOutOfResources [ 701 ]" It points to the Kernal function: _checkKernel(warp_affine_bilinear_and_normalize_plane_kernel << <grid, block, 0, stream >> > (src, src_line_size, src_width, src_height, dst, dst_width, dst_height, const_value, matrix_23, norm)); There is no problem with the kernal function at simple_yolo.cu (The previous version). Capture

shouxieai commented 1 year ago

This may be caused by your device being weak and limiting the blockDim to less than 1024. This can be queried via deviceQuery program. You can change 32 to 16 and 31 to 15 in either gridDim or blockDim to reduce the resource requirements.

ghmchen commented 1 year ago

Hi Shouxieal, Yes, my laptop video card is weak. after modifing the blockDim as you suggested, it works like a charm!