Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#pragma once
 
#include <string>
#include <atomic>
 
#include "core/common/inlined_containers_fwd.h"
#include "core/session/onnxruntime_c_api.h"
#include "core/framework/config_options.h"
 
namespace onnxruntime {
namespace lora {
class LoraAdapter;
}
}  // namespace onnxruntime
 
/**
 * Configuration information for a Run call.
 */
struct OrtRunOptions {
  /// Log severity.  See https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/common/logging/severity.h
  /// Default = -1 (use the log severity from the InferenceSession that the Run is for).
  int run_log_severity_level = -1;
  int run_log_verbosity_level = 0;  ///< VLOG level if debug build and run_log_severity_level is 0 (VERBOSE).
  std::string run_tag;              ///< A tag for the Run() calls using this.
 
  // Set to 'true' to ensure the termination of all the outstanding Run() calls
  // that use this OrtRunOptions instance. Some of the outstanding Run() calls may
  // be forced to terminate with an error status.
  bool terminate = false;
 
  // Set to 'true' to run only the nodes from feeds to required fetches.
  // So it is possible that only some of the nodes are executed.
  bool only_execute_path_to_fetches = false;
 
  // Set to 'true' to enable profiling for this run.
  bool enable_profiling = false;
 
  // File prefix for profiling result for this run.
  // The actual filename will be: <profile_file_prefix>_<timestamp>.json
  // Only used when enable_profiling is true.
  std::basic_string<ORTCHAR_T> profile_file_prefix = ORT_TSTR("onnxruntime_run_profile");
 
#ifdef ENABLE_TRAINING
  // Used by onnxruntime::training::TrainingSession. This class is now deprecated.
  // Delete training_mode when TrainingSession is deleted.
  // Set to 'true' to run in training mode.
  bool training_mode = true;
#endif
 
  // Stores the configurations for this run
  // To add a configuration value to this specific run, call OrtApis::AddRunConfigEntry
  // To get a configuration value, call OrtApis::GetRunConfigEntry
  // The configuration keys and value formats are defined in
  // /include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h
  onnxruntime::ConfigOptions config_options;
 
  onnxruntime::InlinedVector<const onnxruntime::lora::LoraAdapter*> active_adapters;
 
  // Optional sync stream for external resource import.
  // When set, the EP uses this stream for execution, enabling proper
  // synchronization with imported external semaphores.
  OrtSyncStream* sync_stream = nullptr;
 
  OrtRunOptions() = default;
  ~OrtRunOptions() = default;
};
 
namespace onnxruntime {
using RunOptions = ::OrtRunOptions;
}  // namespace onnxruntime