mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-26 03:00:54 +00:00
Clean up OPTIONAL name conflict workarounds in ort_training. (#3622)
* Clean up OPTIONAL name conflict workarounds. * Cleanup unnecessory header files onnx_protobuf.h Co-authored-by: Sherlock Huang
This commit is contained in:
parent
d3a2ac5c5c
commit
b518cb2a7a
20 changed files with 1 additions and 29 deletions
|
|
@ -4,15 +4,11 @@
|
|||
#include "core/common/safeint.h"
|
||||
#include "core/framework/allocator.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#ifdef OPTIONAL
|
||||
#undef OPTIONAL
|
||||
#endif
|
||||
#include "core/framework/utils.h"
|
||||
#include "core/session/ort_apis.h"
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
namespace onnxruntime {
|
||||
|
||||
// private helper for calculation so SafeInt usage doesn't bleed into the public allocator.h header
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#include "core/framework/execution_provider.h"
|
||||
#include "core/graph/constants.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "core/providers/cpu/cpu_provider_factory.h"
|
||||
#include <atomic>
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "cpu_execution_provider.h"
|
||||
#include "core/session/abi_session_options_impl.h"
|
||||
#include "core/session/ort_apis.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/providers/dnnl/dnnl_provider_factory.h"
|
||||
#include <atomic>
|
||||
#include "dnnl_execution_provider.h"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/session/environment.h"
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#include "core/graph/constants.h"
|
||||
#include "core/graph/op.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#include "core/framework/allocator.h"
|
||||
#include "test_utils.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#include "test/framework/test_utils.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#include "core/framework/allocator.h"
|
||||
#include "core/optimizer/insert_cast_transformer.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
#include "core/framework/execution_provider.h"
|
||||
#include "core/providers/cpu/cpu_execution_provider.h"
|
||||
|
|
|
|||
|
|
@ -6,13 +6,8 @@
|
|||
#include "gtest/gtest.h"
|
||||
|
||||
#include "core/platform/env.h"
|
||||
#include "test/framework/test_utils.h"
|
||||
|
||||
// Windows.h reserves the word OPTIONAL in macro, which introduces
|
||||
// conflict on variables declared from onnx external library. Currently workaround
|
||||
// this by re-ordering the included files.
|
||||
// TODO: undefine OPTIONAL in path_lib.h and move path_lib.h to the first include
|
||||
#include "core/platform/path_lib.h"
|
||||
#include "test/framework/test_utils.h"
|
||||
|
||||
namespace onnxruntime {
|
||||
namespace test {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/session/inference_session.h"
|
||||
#include "test/util/include/default_providers.h"
|
||||
#include "test/providers/compare_provider_test_utils.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/common/logging/logging.h"
|
||||
#include "core/common/optional.h"
|
||||
#include "core/framework/allocatormgr.h"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include "core/graph/constants.h"
|
||||
#include "core/graph/graph_nodes.h"
|
||||
#include "core/graph/node_arg.h"
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "orttraining/core/graph/gradient_schema_defs.h"
|
||||
#include "orttraining/core/graph/gradient_builder_base.h"
|
||||
#include "core/optimizer/graph_transformer_mgr.h"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include "core/graph/graph.h"
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "orttraining/core/graph/graph_augmenter.h"
|
||||
#include "onnx/defs/attr_proto_util.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
#include "orttraining/core/graph/mixed_precision_transformer.h"
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/graph/graph_utils.h"
|
||||
#include "core/graph/graph_viewer.h"
|
||||
#include "orttraining/core/graph/gradient_builder_base.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
|
||||
#include "orttraining/core/session/training_session.h"
|
||||
|
||||
#include "core/framework/data_transfer_utils.h"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
#include "cxxopts.hpp"
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/common/logging/logging.h"
|
||||
#include "core/common/logging/sinks/clog_sink.h"
|
||||
#include "core/platform/env.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <vector>
|
||||
#include <math.h>
|
||||
#include "constant.h"
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/framework/callback.h"
|
||||
#include "core/framework/ml_value.h"
|
||||
#include "core/framework/framework_common.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "core/session/inference_session.h"
|
||||
#include "core/graph/model.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "core/graph/onnx_protobuf.h"
|
||||
#include "test/framework/test_utils.h"
|
||||
#include "test/capturing_sink.h"
|
||||
#include "test/test_environment.h"
|
||||
|
|
|
|||
Loading…
Reference in a new issue