Update inference.cpp [bug in case of cudaEnable = false] (#18831)
Signed-off-by: pmermigkas <62157711+pmermigkas@users.noreply.github.com>
This commit is contained in:
parent
60d6d011fd
commit
729ef7f270
1 changed files with 1 additions and 1 deletions
|
|
@ -107,11 +107,11 @@ char* YOLO_V8::CreateSession(DL_INIT_PARAM& iParams) {
|
|||
iouThreshold = iParams.iouThreshold;
|
||||
imgSize = iParams.imgSize;
|
||||
modelType = iParams.modelType;
|
||||
cudaEnable = iParams.cudaEnable;
|
||||
env = Ort::Env(ORT_LOGGING_LEVEL_WARNING, "Yolo");
|
||||
Ort::SessionOptions sessionOption;
|
||||
if (iParams.cudaEnable)
|
||||
{
|
||||
cudaEnable = iParams.cudaEnable;
|
||||
OrtCUDAProviderOptions cudaOption;
|
||||
cudaOption.device_id = 0;
|
||||
sessionOption.AppendExecutionProvider_CUDA(cudaOption);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue