1、优化识别切分效果,增加报警信息

This commit is contained in:
Mr.V 2024-08-12 09:44:49 +08:00
parent f18e10f8f3
commit 57b5178413
1 changed files with 2 additions and 2 deletions

View File

@ -113,8 +113,8 @@ void Inference::doInference(IExecutionContext& context, cudaStream_t& stream, vo
void Inference::doInferenceV2(IExecutionContext& context, cudaStream_t& stream, void **buffers, unsigned int outputIndex, float* output, int outputSize, int batchSize)
{
context.enqueue(batchSize, buffers, stream, nullptr);
//context.enqueueV2(buffers, stream, nullptr);
// context.enqueue(batchSize, buffers, stream, nullptr);
context.enqueueV2(buffers, stream, nullptr);
CUDA_CHECK(cudaMemcpyAsync(output, buffers[outputIndex], batchSize * outputSize * sizeof(float), cudaMemcpyDeviceToHost, stream));
cudaStreamSynchronize(stream);
}