-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Module:DocumentationLack of clarity or potential improvements for docsLack of clarity or potential improvements for docstriagedIssue has been triaged by maintainersIssue has been triaged by maintainers
Description
I tried to execute two parallel infer with one context and two stream, but i got the Error bellowed:
\cudaDeconvolutionRunner.cpp (295) - Cudnn Error in nvinfer1::rt::cuda::DeconvolutionRunner::execute: 8 (CUDNN_STATUS_EXECUTION_FAILED)
[10/24/2020-15:52:49] [E] [TRT] FAILED_EXECUTION: Unknown exception
[10/24/2020-15:52:49] [E] [TRT] C:\source\rtSafe\safeContext.cpp (133) - Cudnn Error in nvinfer1::rt::CommonContext::configure: 7 (CUDNN_STATUS_MAPPING_ERROR)
the code for executing two parallel infer (the execution of enqueueV2() are asynchronously) with one context and two stream are followed:
cudaStream_t streamS{ NULL };
cudaStreamCreate(&streamS);
cudaStream_t streamS2{ NULL };
cudaStreamCreate(&streamS2);
auto context = SampleUniquePtr<nvinfer1::IExecutionContext>(mEngine->createExecutionContext());
if (!context)
{
return false;
}
// Read the input data into the managed buffers
assert(mParams.inputTensorNames.size() == 1);
if (!processInput(buffers))
{
return false;
}
processInput(buffers2);
// Memcpy from host input buffers to device input buffers
//***buffers.copyInputToDevice();
buffers.copyInputToDeviceAsync(streamS);
buffers2.copyInputToDeviceAsync(streamS2);
std::cout << "before execute inter time (ms):" << (clock() - start_) << "\n";
bool status = true;
clock_t a = clock();
for (unsigned i = 0; i < 100; ++i) {
//context->executeV2(buffers.getDeviceBindings().data()); //calculate the prediction result.
context->enqueueV2(buffers.getDeviceBindings().data(), streamS, nullptr);
context->enqueueV2(buffers2.getDeviceBindings().data(), streamS2, nullptr);
}
Can someone gives me some advice for paralleling infer with the code?
Environment
Windows OS + TensorRT 7.1.3 + one 2060super GPU
Metadata
Metadata
Assignees
Labels
Module:DocumentationLack of clarity or potential improvements for docsLack of clarity or potential improvements for docstriagedIssue has been triaged by maintainersIssue has been triaged by maintainers