HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_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 <string>
7 #include <atomic>
8 #include "core/session/onnxruntime_c_api.h"
9 #include "core/framework/config_options.h"
10 
11 /**
12  * Configuration information for a Run call.
13  */
14 struct OrtRunOptions {
15  /// Log severity. See https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/common/logging/severity.h
16  /// Default = -1 (use the log severity from the InferenceSession that the Run is for).
18  int run_log_verbosity_level = 0; ///< VLOG level if debug build and run_log_severity_level is 0 (VERBOSE).
19  std::string run_tag; ///< A tag for the Run() calls using this.
20 
21  // Set to 'true' to ensure the termination of all the outstanding Run() calls
22  // that use this OrtRunOptions instance. Some of the outstanding Run() calls may
23  // be forced to terminate with an error status.
24  bool terminate = false;
25 
26  // Set to 'true' to run only the nodes from feeds to required fetches.
27  // So it is possible that only some of the nodes are executed.
29 
30 #ifdef ENABLE_TRAINING
31  // Used by onnxruntime::training::TrainingSession. This class is now deprecated.
32  // Delete training_mode when TrainingSession is deleted.
33  // Set to 'true' to run in training mode.
34  bool training_mode = true;
35 #endif
36 
37  // Stores the configurations for this run
38  // To add an configuration to this specific run, call OrtApis::AddRunConfigEntry
39  // The configuration keys and value formats are defined in
40  // /include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h
41  onnxruntime::ConfigOptions config_options;
42 
43  OrtRunOptions() = default;
44  ~OrtRunOptions() = default;
45 };
46 
47 namespace onnxruntime {
49 } // namespace onnxruntime
int run_log_severity_level
Definition: run_options.h:17
int run_log_verbosity_level
VLOG level if debug build and run_log_severity_level is 0 (VERBOSE).
Definition: run_options.h:18
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
std::string run_tag
A tag for the Run() calls using this.
Definition: run_options.h:19
~OrtRunOptions()=default
OrtRunOptions()=default
bool only_execute_path_to_fetches
Definition: run_options.h:28
onnxruntime::ConfigOptions config_options
Definition: run_options.h:41