Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Yueqing Zhang committed Aug 12, 2024
1 parent f403610 commit f0094ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/vitisai/imp/node_arg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ NodeArg& node_arg_new(Graph& graph, const std::string& name, const std::vector<i
}
return graph.GetOrCreateNodeArg(name, type_proto.release());
}
int node_arg_external_location(const Graph& graph, const NodeArg& node_arg, std::string& file, size_t& offset, size_t& size, size_t&checksum) {
int node_arg_external_location(const Graph& graph, const NodeArg& node_arg, std::string& file, size_t& offset, size_t& size, size_t& checksum) {

Check warning on line 107 in onnxruntime/core/providers/vitisai/imp/node_arg.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/vitisai/imp/node_arg.cc:107: Lines should be <= 120 characters long [whitespace/line_length] [2]
auto tensor_proto = const_cast<ONNX_NAMESPACE::TensorProto*>(graph.GetConstantInitializer(node_arg.Name(), true));
vai_assert(tensor_proto != nullptr, (std::string("tensor_proto is not found: name=") + node_arg.Name()));
auto ret = 0;
Expand All @@ -121,7 +121,7 @@ int node_arg_external_location(const Graph& graph, const NodeArg& node_arg, std:
file = *data.mutable_value();
ret = 1;
} else if (*data.mutable_key() == "offset") {
offset = (size_t) std::strtoull(data.mutable_value()->data(), &end, 10);
offset = (size_t)std::strtoull(data.mutable_value()->data(), &end, 10);

Check warning on line 124 in onnxruntime/core/providers/vitisai/imp/node_arg.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Using C-style cast. Use static_cast<size_t>(...) instead [readability/casting] [4] Raw Output: onnxruntime/core/providers/vitisai/imp/node_arg.cc:124: Using C-style cast. Use static_cast<size_t>(...) instead [readability/casting] [4]
} else if (*data.mutable_key() == "length") {
size = (size_t)std::strtoull(data.mutable_value()->data(), &end, 10);

Check warning on line 126 in onnxruntime/core/providers/vitisai/imp/node_arg.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Using C-style cast. Use static_cast<size_t>(...) instead [readability/casting] [4] Raw Output: onnxruntime/core/providers/vitisai/imp/node_arg.cc:126: Using C-style cast. Use static_cast<size_t>(...) instead [readability/casting] [4]
} else if (*data.mutable_key() == "checksum") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ struct OrtApiForVaip {
const std::filesystem::path& (*get_model_path)(const Graph& graph); // [90]
Model* (*create_empty_model)(const std::filesystem::path& path, const std::vector<std::pair<std::string, int64_t>>& opset); //[91]
void (*graph_set_inputs)(Graph& graph,
gsl::span<const NodeArg* const> inputs); // [92]
int(*node_arg_external_location)(const Graph& graph, const NodeArg& node_arg, std::string& file, size_t& offset, size_t& size, size_t& checksum); // [93]
gsl::span<const NodeArg* const> inputs); // [92]

Check warning on line 230 in onnxruntime/core/providers/vitisai/include/vaip/vaip_ort_api.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/vitisai/include/vaip/vaip_ort_api.h:230: Lines should be <= 120 characters long [whitespace/line_length] [2]
int (*node_arg_external_location)(const Graph& graph, const NodeArg& node_arg, std::string& file, size_t& offset, size_t& size, size_t& checksum); // [93]

Check warning on line 231 in onnxruntime/core/providers/vitisai/include/vaip/vaip_ort_api.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/vitisai/include/vaip/vaip_ort_api.h:231: Lines should be <= 120 characters long [whitespace/line_length] [2]

Check warning on line 231 in onnxruntime/core/providers/vitisai/include/vaip/vaip_ort_api.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <string> for string [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/vitisai/include/vaip/vaip_ort_api.h:231: Add #include <string> for string [build/include_what_you_use] [4]
};

#ifndef USE_VITISAI
Expand Down

0 comments on commit f0094ac

Please sign in to comment.