14 struct OrtThreadingOptions;
15 namespace onnxruntime {
33 static Status Create(std::unique_ptr<logging::LoggingManager> logging_manager,
34 std::unique_ptr<Environment>& environment,
35 const OrtThreadingOptions* tp_options =
nullptr,
36 bool create_global_thread_pools =
false);
39 return logging_manager_.get();
42 void SetLoggingManager(std::unique_ptr<onnxruntime::logging::LoggingManager> logging_manager) {
43 logging_manager_ = std::move(logging_manager);
47 return intra_op_thread_pool_.get();
51 return inter_op_thread_pool_.get();
55 return create_global_thread_pools_;
74 return shared_allocators_;
93 Status Initialize(std::unique_ptr<logging::LoggingManager> logging_manager,
94 const OrtThreadingOptions* tp_options =
nullptr,
95 bool create_global_thread_pools =
false);
97 std::unique_ptr<logging::LoggingManager> logging_manager_;
98 std::unique_ptr<onnxruntime::concurrency::ThreadPool> intra_op_thread_pool_;
99 std::unique_ptr<onnxruntime::concurrency::ThreadPool> inter_op_thread_pool_;
100 bool create_global_thread_pools_{
false};
101 std::vector<AllocatorPtr> shared_allocators_;
const std::vector< AllocatorPtr > & GetRegisteredSharedAllocators() const
GLsizei const GLchar *const * string
Status CreateAndRegisterAllocator(const OrtMemoryInfo &mem_info, const OrtArenaCfg *arena_cfg=nullptr)
void SetLoggingManager(std::unique_ptr< onnxruntime::logging::LoggingManager > logging_manager)
The logging manager. Owns the log sink and potentially provides a default Logger instance. Provides filtering based on a minimum LogSeverity level, and of messages with DataType::User if enabled.
Status UnregisterAllocator(const OrtMemoryInfo &mem_info)
Status CreateAndRegisterAllocatorV2(const std::string &provider_type, const OrtMemoryInfo &mem_info, const std::unordered_map< std::string, std::string > &options, const OrtArenaCfg *arena_cfg=nullptr)
std::shared_ptr< IAllocator > AllocatorPtr
onnxruntime::concurrency::ThreadPool * GetIntraOpThreadPool() const
logging::LoggingManager * GetLoggingManager() const
Status RegisterAllocator(AllocatorPtr allocator)
bool EnvCreatedWithGlobalThreadPools() const
onnxruntime::concurrency::ThreadPool * GetInterOpThreadPool() const
static Status Create(std::unique_ptr< logging::LoggingManager > logging_manager, std::unique_ptr< Environment > &environment, const OrtThreadingOptions *tp_options=nullptr, bool create_global_thread_pools=false)