Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

段错误是什么情况? #30

Open
CGump opened this issue Feb 24, 2022 · 5 comments
Open

段错误是什么情况? #30

CGump opened this issue Feb 24, 2022 · 5 comments

Comments

@CGump
Copy link

CGump commented Feb 24, 2022

很奇怪,配置和模型都是ok的,运行的时候报段错误是为啥?

yolov5_trt_create  ... 
yolov5_trt_create  cuda engine... 
[02/24/2022-16:18:59] [W] [TRT] Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
yolov5_trt_create  buffer ... 
yolov5_trt_create  stream ... 
yolov5_trt_create  done ... 
create yolov5-trt , instance = 0x555e4d644810
[02/24/2022-16:18:59] [W] [TRT] Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
[02/24/2022-16:18:59] [E] [TRT] INVALID_ARGUMENT: Cannot find binding of given name: input
[02/24/2022-16:18:59] [E] [TRT] INVALID_ARGUMENT: Cannot find binding of given name: output
delay_proress:3ms, delay_infer:3ms
段错误 (核心已转储)
@CGump
Copy link
Author

CGump commented Feb 24, 2022

定位问题可能出在cudaMemcpyAsync,目前还不是很了解这块,是输入的两个参数问题吗?

void FeatureTensor::doInference(float* inputBuffer, float* outputBuffer) {   
    cudaMemcpyAsync(buffers[inputIndex], inputBuffer, inputStreamSize * sizeof(float), cudaMemcpyHostToDevice, cudaStream);
    Dims4 inputDims{curBatchSize, 3, imgShape.height, imgShape.width};
    context->setBindingDimensions(0, inputDims);
    
    context->enqueueV2(buffers, cudaStream, nullptr);
    cudaMemcpyAsync(outputBuffer, buffers[outputIndex], outputStreamSize * sizeof(float), cudaMemcpyDeviceToHost, cudaStream);
    // cudaStreamSynchronize(cudaStream);
}

@CGump
Copy link
Author

CGump commented Feb 24, 2022

运行环境:rtx2080ti,ubuntu18.04,tensorrt 7.0-cuda10.2-cudnn7.6.5

@CGump
Copy link
Author

CGump commented Feb 24, 2022

deepsort的模型和yolov5的模型各自都是正常运行的。然后,我也查看了第一帧yolov5的结果,vector中存放了20个,yolo模型应该是正常识别的,问题就是DS这一步,这就很迷惑了……

@CGump
Copy link
Author

CGump commented Feb 25, 2022

在另一台tensorrt7.2.3+cuda11.1+cudnn8.1上搞定了,这个问题还是没解决。难道是cuda10和11的差异导致?

@knightdby
Copy link

@CGump 所以问题解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants