mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Fix build break from removing custom ORT onnx protobuf (#4904)
Exclude parsing of json config in model (also excludes json parsing library)
This commit is contained in:
parent
71d8846635
commit
14c691030f
4 changed files with 19 additions and 3 deletions
|
|
@ -46,6 +46,8 @@ class OpSchema {};
|
|||
#endif
|
||||
|
||||
#include "onnx/onnx_pb.h"
|
||||
#include "onnx/onnx-operators_pb.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ IExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
#else
|
||||
ORT_UNUSED_PARAMETER(graph);
|
||||
ORT_UNUSED_PARAMETER(kernel_registries);
|
||||
ORT_NOT_IMPLEMENTED("IExecutionProvider::GetCapability is not supported in this build.");
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
common::Status IExecutionProvider::Sync() const { return Status::OK(); };
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#if !defined(ORT_MINIMAL_BUILD)
|
||||
|
||||
#include "core/session/inference_session_utils.h"
|
||||
|
||||
namespace onnxruntime {
|
||||
|
|
@ -36,7 +38,7 @@ static Status SetInterOpNumThreads(SessionOptions& session_options,
|
|||
}
|
||||
|
||||
LOGS(logger, INFO) << "Setting inter_op_num_threads to " << value;
|
||||
session_options.inter_op_param.thread_pool_size= value;
|
||||
session_options.inter_op_param.thread_pool_size = value;
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
|
@ -220,3 +222,5 @@ Status InferenceSessionUtils::ParseRunOptionsFromModelProto(RunOptions& /*run_op
|
|||
}
|
||||
|
||||
} // namespace onnxruntime
|
||||
|
||||
#endif // !defined(ORT_MINIMAL_BUILD)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,18 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
// Currently everything here is unused in a minimal build.
|
||||
// Leaving the file included in case there are other InferenceSession utils needed in a minimal build, as this would
|
||||
// be the best place to add them.
|
||||
|
||||
#if !defined(ORT_MINIMAL_BUILD)
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/session/inference_session.h"
|
||||
#include "core/framework/session_options.h"
|
||||
#include "core/common/common.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 28020)
|
||||
|
|
@ -53,3 +61,5 @@ class InferenceSessionUtils {
|
|||
};
|
||||
|
||||
} // namespace onnxruntime
|
||||
|
||||
#endif // !defined(ORT_MINIMAL_BUILD)
|
||||
|
|
|
|||
Loading…
Reference in a new issue