Skip to content

Commit

Permalink
Exclude node unit and partitioning utils from minimal build.
Browse files Browse the repository at this point in the history
  • Loading branch information
skottmckay committed Mar 7, 2024
1 parent 16f8c09 commit c89504c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions onnxruntime/core/framework/node_unit.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)

#include "node_unit.h"

Check warning on line 6 in onnxruntime/core/framework/node_unit.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Include the directory when naming header files [build/include_subdir] [4] Raw Output: onnxruntime/core/framework/node_unit.cc:6: Include the directory when naming header files [build/include_subdir] [4]
#include "core/graph/graph_viewer.h"

Expand Down Expand Up @@ -345,3 +347,5 @@ std::vector<const Node*> NodeUnit::GetAllNodesInGroup() const noexcept {
}

} // namespace onnxruntime

#endif // !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)
5 changes: 5 additions & 0 deletions onnxruntime/core/framework/node_unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#pragma once

// QDQ models require graph modification at runtime, so we know this infrastructure is not used in a minimal build
#if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)

#include <string>
#include <optional>
#include <vector>
Expand Down Expand Up @@ -110,3 +113,5 @@ class NodeUnit {
};

} // namespace onnxruntime

#endif // !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)
5 changes: 5 additions & 0 deletions onnxruntime/core/providers/partitioning_utils.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// QDQ models require graph modification at runtime, so we know this infrastructure is not used in a minimal build
#if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)

#include "core/providers/partitioning_utils.h"

#include <algorithm>
Expand Down Expand Up @@ -429,3 +432,5 @@ CreateSupportedPartitions(const GraphViewer& graph_viewer,

} // namespace utils
} // namespace onnxruntime

#endif // !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)
5 changes: 5 additions & 0 deletions onnxruntime/core/providers/partitioning_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#pragma once

// QDQ models require graph modification at runtime, so we know this infrastructure is not used in a minimal build
#if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)

#include <functional>
#include <memory>
#include <unordered_set>
Expand Down Expand Up @@ -132,3 +135,5 @@ InlinedHashSet<const Node*> CreateExcludedNodeSet(const GraphViewer& graph_viewe
const std::unordered_set<std::string>& stop_ops);
} // namespace utils
} // namespace onnxruntime

#endif // !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)

0 comments on commit c89504c

Please sign in to comment.