mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
20 lines
781 B
C++
20 lines
781 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#include "utils.h"
|
|
#include <limits>
|
|
|
|
OrtCUDAProviderOptions CreateDefaultOrtCudaProviderOptionsWithCustomStream(void* cuda_compute_stream) {
|
|
OrtCUDAProviderOptions cuda_options;
|
|
|
|
cuda_options.device_id = 0;
|
|
cuda_options.cudnn_conv_algo_search = OrtCudnnConvAlgoSearch::OrtCudnnConvAlgoSearchExhaustive;
|
|
cuda_options.gpu_mem_limit = std::numeric_limits<size_t>::max();
|
|
cuda_options.arena_extend_strategy = 0;
|
|
cuda_options.do_copy_in_default_stream = true;
|
|
cuda_options.has_user_compute_stream = cuda_compute_stream != nullptr ? 1 : 0;
|
|
cuda_options.user_compute_stream = cuda_compute_stream;
|
|
cuda_options.default_memory_arena_cfg = nullptr;
|
|
|
|
return cuda_options;
|
|
}
|