Skip to content

Commit

Permalink
Use inlinedVector instead of initializer_list
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitsays committed Oct 16, 2023
1 parent 8bf29cf commit 7ddeecf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onnxruntime/core/optimizer/matmul_bn_fusion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NodeIndex GetOtherParentOfNode(const Node& node, NodeIndex first_parent_index) {
}

bool MatchPath(const Node& parent_node,
const gsl::span<std::pair<std::string, std::initializer_list<int>>>& path,
const gsl::span<std::pair<std::string, InlinedVector<ONNX_NAMESPACE::OperatorSetVersion>>>& path,
const Node& child_node) {
if (path.size() == 0) {
return true;
Expand Down Expand Up @@ -99,14 +99,14 @@ bool MatmulBNFusion::SatisfyCondition(const Graph& graph, const Node& node, cons
++child_node_iterator;
const Node& second_child_node = *child_node_iterator;

std::vector<std::pair<std::string, std::initializer_list<int>>> first_path =
std::vector<std::pair<std::string, InlinedVector<ONNX_NAMESPACE::OperatorSetVersion>>> first_path =

Check warning on line 102 in onnxruntime/core/optimizer/matmul_bn_fusion.cc

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/optimizer/matmul_bn_fusion.cc#L102

Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Raw output
onnxruntime/core/optimizer/matmul_bn_fusion.cc:102:  Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]
{{"Reshape", {1, 5}},
{"Transpose", {1}},
{"BatchNormalization", {1, 6, 7}},
{"Transpose", {1}},
{"Reshape", {1, 5}}};

std::vector<std::pair<std::string, std::initializer_list<int>>> second_path =
std::vector<std::pair<std::string, InlinedVector<ONNX_NAMESPACE::OperatorSetVersion>>> second_path =

Check warning on line 109 in onnxruntime/core/optimizer/matmul_bn_fusion.cc

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/optimizer/matmul_bn_fusion.cc#L109

Add #include <utility> for pair<> [build/include_what_you_use] [4]
Raw output
onnxruntime/core/optimizer/matmul_bn_fusion.cc:109:  Add #include <utility> for pair<>  [build/include_what_you_use] [4]
{{"Shape", {1}},
{"Cast", {1, 6}},
{"Cast", {1, 6}},
Expand Down

0 comments on commit 7ddeecf

Please sign in to comment.