Skip to content

Commit a6f0923

Browse files
guoyu-wangtianleiwu
authored andcommitted
Fix for CUDA build break
1 parent 90e132c commit a6f0923

File tree

8 files changed

+60
-5
lines changed

8 files changed

+60
-5
lines changed

include/onnxruntime/core/graph/graph.h

+14-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "core/common/path.h"
1616
#include "core/common/status.h"
1717
#include "core/common/logging/logging.h"
18-
#include "core/flatbuffers/ort.fbs.h"
1918
#include "core/graph/basic_types.h"
2019
#include "core/graph/constants.h"
2120
#include "core/graph/graph_nodes.h"
@@ -24,12 +23,26 @@
2423
#include "core/graph/function.h"
2524
#include "gsl/gsl"
2625

26+
namespace flatbuffers {
27+
class FlatBufferBuilder;
28+
template <typename T>
29+
struct Offset;
30+
} // namespace flatbuffers
31+
2732
namespace onnxruntime {
2833
class Graph;
2934
struct IndexedSubGraph;
3035
class Model;
3136
class OpSignature;
3237

38+
namespace experimental {
39+
namespace fbs {
40+
struct Graph;
41+
struct Node;
42+
struct NodeEdge;
43+
} // namespace fbs
44+
} // namespace experimental
45+
3346
/**
3447
@class Node
3548
Class representing a node in the graph.

onnxruntime/core/framework/session_state.cc

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include "core/common/logging/logging.h"
99
#include "core/common/safeint.h"
10+
#include "core/flatbuffers/ort.fbs.h"
1011
#include "core/framework/allocator.h"
1112
#include "core/framework/node_index_info.h"
1213
#include "core/framework/op_kernel.h"

onnxruntime/core/framework/session_state.h

+12-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "core/common/common.h"
1414
#include "core/common/logging/logging.h"
1515
#include "core/common/profiler.h"
16-
#include "core/flatbuffers/ort.fbs.h"
1716
#include "core/framework/allocation_planner.h"
1817
#include "core/framework/callback.h"
1918
#include "core/framework/data_transfer_manager.h"
@@ -33,8 +32,20 @@
3332
#include "core/platform/path_lib.h"
3433
#include "core/platform/threadpool.h"
3534

35+
namespace flatbuffers {
36+
class FlatBufferBuilder;
37+
template <typename T>
38+
struct Offset;
39+
} // namespace flatbuffers
40+
3641
namespace onnxruntime {
3742

43+
namespace experimental {
44+
namespace fbs {
45+
struct SessionState;
46+
} // namespace fbs
47+
} // namespace experimental
48+
3849
class ExecutionProviders;
3950
class KernelDef;
4051
class OpKernel;

onnxruntime/core/graph/graph.cc

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "gsl/gsl"
1616
#include "core/common/logging/logging.h"
17+
#include "core/flatbuffers/ort.fbs.h"
1718
#include "core/framework/tensor_shape.h"
1819
#include "core/framework/tensorprotoutils.h"
1920
#include "core/framework/utils.h"

onnxruntime/core/graph/graph_flatbuffers_utils.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
#include "graph_flatbuffers_utils.h"
4+
#include <core/graph/graph.h>
5+
#include "core/flatbuffers/ort.fbs.h"
56
#include "core/framework/tensorprotoutils.h"
7+
#include "graph_flatbuffers_utils.h"
68

79
using namespace ONNX_NAMESPACE;
810
using namespace ::onnxruntime::common;

onnxruntime/core/graph/graph_flatbuffers_utils.h

+16-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,25 @@
22
// Licensed under the MIT License.
33

44
#pragma once
5-
#include <core/graph/graph.h>
5+
#include "flatbuffers/flatbuffers.h"
66

77
namespace onnxruntime {
8+
9+
class Graph;
10+
class Node;
11+
12+
namespace logging {
13+
class Logger;
14+
}
15+
816
namespace experimental {
17+
18+
namespace fbs {
19+
struct Attribute;
20+
struct Tensor;
21+
struct ValueInfo;
22+
} // namespace fbs
23+
924
namespace utils {
1025

1126
onnxruntime::common::Status SaveValueInfoOrtFormat(

onnxruntime/core/graph/model.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
#include "core/flatbuffers/ort.fbs.h"
45
#include "core/framework/tensorprotoutils.h"
56
#include "core/graph/graph_flatbuffers_utils.h"
67
#include "core/graph/model.h"

onnxruntime/core/graph/model.h

+12-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,24 @@
88
#include <climits>
99
#include <string>
1010
#include "core/common/path.h"
11-
#include "core/flatbuffers/ort.fbs.h"
1211
#include "core/graph/graph_viewer.h"
1312
#include "core/session/onnxruntime_c_api.h"
1413
#include "gsl/gsl"
1514

15+
namespace flatbuffers {
16+
class FlatBufferBuilder;
17+
template <typename T>
18+
struct Offset;
19+
} // namespace flatbuffers
20+
1621
namespace onnxruntime {
1722

23+
namespace experimental {
24+
namespace fbs {
25+
struct Model;
26+
} // namespace fbs
27+
} // namespace experimental
28+
1829
typedef std::unordered_map<std::string, std::string> ModelMetaData;
1930
using IOnnxRuntimeOpSchemaRegistryList = std::list<std::shared_ptr<IOnnxRuntimeOpSchemaCollection>>;
2031

0 commit comments

Comments
 (0)