mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-21 19:18:55 +00:00
### Description
Modifications to support 2GB+ checkpoint & Upgrading Flatbuffers
### Motivation and Context
This PR includes changes that will make ort handle 2GB+ checkpoints.
To do that we need to upgrade flatbuffers to 23.5.9 -
https://github.com/google/flatbuffers/pull/7945
- Modified the commitHash and the hash for the new version
- Removed the patch for rust generator's unused variable warning as it
is no longer producing this - [Check it out
here](d121e09d89/src/idl_gen_rust.cpp)
- Updated the VerifyField calls with alignment values that were
introduced in the new version.
---------
Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#include "core/common/flatbuffers.h"
|
|
|
|
#include "core/graph/op_identifier.h"
|
|
|
|
#include "core/common/status.h"
|
|
#include "core/graph/graph.h"
|
|
#include "core/graph/onnx_protobuf.h"
|
|
|
|
namespace onnxruntime {
|
|
|
|
namespace fbs::utils {
|
|
|
|
#if !defined(ORT_MINIMAL_BUILD)
|
|
|
|
Status SaveOpIdentifierOrtFormat(flatbuffers::FlatBufferBuilder& builder,
|
|
const onnxruntime::OpIdentifier& op_id,
|
|
flatbuffers::Offset<flatbuffers::String>& fbs_op_id_str);
|
|
|
|
#endif // !defined(ORT_MINIMAL_BUILD)
|
|
|
|
Status LoadOpIdentifierOrtFormat(const flatbuffers::String& fbs_op_id_str,
|
|
onnxruntime::OpIdentifier& op_id);
|
|
|
|
} // namespace fbs::utils
|
|
|
|
namespace utils {
|
|
|
|
inline onnxruntime::OpIdentifier MakeOpId(const Node& node) {
|
|
return onnxruntime::OpIdentifier{node.Domain(), node.OpType(), node.SinceVersion()};
|
|
}
|
|
|
|
#if !defined(ORT_MINIMAL_BUILD)
|
|
|
|
inline onnxruntime::OpIdentifier MakeOpId(const ONNX_NAMESPACE::OpSchema& op_schema) {
|
|
return onnxruntime::OpIdentifier{op_schema.domain(), op_schema.Name(), op_schema.SinceVersion()};
|
|
}
|
|
|
|
#endif // !defined(ORT_MINIMAL_BUILD)
|
|
|
|
} // namespace utils
|
|
|
|
} // namespace onnxruntime
|