Skip to content

Commit

Permalink
Fix 2 build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
riverlijunjie committed Jun 23, 2023
1 parent 9ef10dd commit b71389f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void SyncInferRequest::set_tensor(const ov::Output<const ov::Node>& _port, const
// return empty shape but tensor.get_size() return correct value, and tensor.reshape() cannot update
// BlockingDesc, so to construct new tensor with original tensor's data, which is only for ov legacy api usage.
if (_port.get_partial_shape().is_static() && _tensor.get_size() > 0 && _tensor.get_shape().size() == 0 &&
_tensor.get_size() == ov::shape_size(_port.get_shape())) {
_tensor.get_size() == ov::shape_size(_port.get_shape()) && _port.get_shape().size() > 0) {
tensor = ov::Tensor(_tensor.get_element_type(), _port.get_shape(), _tensor.data());
}
auto name = get_port_name(_port, _is_legacy_api);
Expand Down
1 change: 0 additions & 1 deletion src/plugins/intel_cpu/src/infer_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class SyncInferRequest : public ov::ISyncInferRequest {
// Store external tensor due to precision changes
mutable std::unordered_map<std::string, ov::Tensor> _aux_tensors;
mutable std::unordered_map<std::string, bool> _port_precision_changed;
bool _port_name_change = false;
bool _is_legacy_api = false;

std::shared_ptr<const CompiledModel> _compiled_model;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/utils/debug_capabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ std::ostream & operator<<(std::ostream & os, const Node &c_node) {
} else {
// no SPD yet, use orginal shapes
comma = "";
for (int i = 0; i < node.getOriginalOutputPrecisions().size(); i++) {
for (size_t i = 0; i < node.getOriginalOutputPrecisions().size(); i++) {
auto shape = node.getOutputShapeAtPort(i);
std::string prec_name = "Undef";
prec_name = node.getOriginalOutputPrecisionAtPort(i).name();
Expand Down

0 comments on commit b71389f

Please sign in to comment.