mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-09 00:30:53 +00:00
* Share thread pools between devices * make tests reuse device * Change cpu thread pool options for dml sessions to use 1 thread with no spinning * fix test failure * Update missing type constraints for dft * Add comment and rename inference session parameter * default missing causing inconsistent test behavior Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
34 lines
No EOL
1,011 B
C++
34 lines
No EOL
1,011 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#include "OnnxruntimeSessionBuilder.h"
|
|
|
|
namespace _winml {
|
|
|
|
class OnnxruntimeEngineFactory;
|
|
|
|
class OnnxruntimeCpuSessionBuilder : public Microsoft::WRL::RuntimeClass<
|
|
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
|
|
IOrtSessionBuilder> {
|
|
public:
|
|
HRESULT RuntimeClassInitialize(OnnxruntimeEngineFactory* engine_factory);
|
|
|
|
HRESULT STDMETHODCALLTYPE CreateSessionOptions(
|
|
OrtSessionOptions** options) override;
|
|
|
|
HRESULT STDMETHODCALLTYPE CreateSession(
|
|
OrtSessionOptions* options,
|
|
OrtThreadPool* inter_op_thread_pool,
|
|
OrtThreadPool* intra_op_thread_pool,
|
|
OrtSession** session) override;
|
|
|
|
HRESULT STDMETHODCALLTYPE Initialize(
|
|
OrtSession* session) override;
|
|
|
|
private:
|
|
Microsoft::WRL::ComPtr<OnnxruntimeEngineFactory> engine_factory_;
|
|
};
|
|
|
|
} // namespace _winml
|