HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cuda_provider_options.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 
4 #pragma once
5 
6 #include "onnxruntime_c_api.h"
7 #include "core/framework/arena_extend_strategy.h"
8 
9 /// <summary>
10 /// Options for the CUDA provider that are passed to SessionOptionsAppendExecutionProvider_CUDA_V2.
11 /// Please note that this struct is *similar* to OrtCUDAProviderOptions but only to be used internally.
12 /// Going forward, new cuda provider options are to be supported via this struct and usage of the publicly defined
13 /// OrtCUDAProviderOptions will be deprecated over time.
14 /// User can only get the instance of OrtCUDAProviderOptionsV2 via CreateCUDAProviderOptions.
15 /// </summary>
17  int device_id; // cuda device id.
18  int has_user_compute_stream; // indicator of user specified CUDA compute stream.
19  void* user_compute_stream; // user specified CUDA compute stream.
20  int do_copy_in_default_stream; // flag specifying if the default stream is to be used for copying.
21  OrtCudnnConvAlgoSearch cudnn_conv_algo_search; // cudnn algo search enum.
22  size_t gpu_mem_limit; // BFC Arena memory limit for CUDA.
23  // (will be overridden by contents of `default_memory_arena_cfg` is it exists)
24  onnxruntime::ArenaExtendStrategy arena_extend_strategy; // BFC Arena extension strategy.
25  // (will be overridden by contents of `default_memory_arena_cfg` is it exists)
26  OrtArenaCfg* default_memory_arena_cfg; // BFC Arena config flags.
27  int cudnn_conv_use_max_workspace; // flag specifying if maximum workspace can be used in cudnn conv algo search.
28  int enable_cuda_graph; // flag specifying if the CUDA graph is to be captured for the model.
29  int cudnn_conv1d_pad_to_nc1d; // flag specifying if pad Conv1D's input [N,C,D] to [N,C,1,D] or [N,C,D,1].
30  int tunable_op_enabled; // flag specifying if TunableOp is enabled.
31 };
OrtCudnnConvAlgoSearch cudnn_conv_algo_search
OrtCudnnConvAlgoSearch
Algorithm to use for cuDNN Convolution Op.
Options for the CUDA provider that are passed to SessionOptionsAppendExecutionProvider_CUDA_V2. Please note that this struct is similar to OrtCUDAProviderOptions but only to be used internally. Going forward, new cuda provider options are to be supported via this struct and usage of the publicly defined OrtCUDAProviderOptions will be deprecated over time. User can only get the instance of OrtCUDAProviderOptionsV2 via CreateCUDAProviderOptions.
onnxruntime::ArenaExtendStrategy arena_extend_strategy