Skip to content

Commit

Permalink
Fix use of OPENVINO_ASSERT
Browse files Browse the repository at this point in the history
  • Loading branch information
vurusovs committed Feb 22, 2024
1 parent 2fe53b1 commit 6441b30
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bindings/python/src/pyopenvino/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ ov::Any py_object_to_any(const py::object& py_obj) {
detected_type = type;
return;
}
OPENVINO_ASSERT("Incorrect attribute. Mixed types in the list are not allowed.");
OPENVINO_ASSERT(false, "Incorrect attribute. Mixed types in the list are not allowed.");
};
if (py::isinstance<py::str>(it)) {
check_type(PY_TYPE::STR);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ bool primitive_inst::is_valid_fusion() const {
if (fd.is_type<eltwise>() || fd.is_type<activation>()) {
fused_eltwise_prims.push_back(fd);
} else {
OPENVINO_ASSERT("[GPU] Unsupported fused operation in dynamic shape : ", fd.desc->id);
OPENVINO_ASSERT(false, "[GPU] Unsupported fused operation in dynamic shape : ", fd.desc->id);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/graph/reshape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ layout reshape_inst::calc_output_layout(reshape_node const& node, kernel_impl_pa
if (desc->output_partial_shape.size() != 0) {
return layout{desc->output_partial_shape, input_layout.data_type, input_layout.format};
} else {
OPENVINO_ASSERT("[GPU] Output shape is not provided");
OPENVINO_ASSERT(false, "[GPU] Output shape is not provided");
}
}

Expand Down Expand Up @@ -110,7 +110,7 @@ std::vector<layout> reshape_inst::calc_output_layouts(reshape_node const& node,
break;
}
default:
OPENVINO_ASSERT("Unsupported reshape mode");
OPENVINO_ASSERT(false, "Unsupported reshape mode");
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ JitConstants EltwiseKernel_blocked_opt::MakeLoadJitConstants(const eltwise_param
else if (DataTensor::ChannelsCount(params.inputs[input_idx].GetLayout()) == 5)
default_indexing_str = "b, (f_block * " + toCodeString(vec_size) +"), z, y, x";
else
OPENVINO_ASSERT("MakeLoadJit : Unexpected dimension for eltwise optimized kernel.");
OPENVINO_ASSERT(false, "MakeLoadJit : Unexpected dimension for eltwise optimized kernel.");

// Generate Jit
switch (input.mode) {
Expand Down Expand Up @@ -439,7 +439,7 @@ static inline int GetInnerBatchBlockSize(const DataTensor& tensor) {
case DataLayout::bs_fs_zyx_bsv32_fsv16:
return 32;
default:
OPENVINO_ASSERT("GetInnerBatchBlockSize : Unexpected format for eltwise_blocked_optimized kernel.");
OPENVINO_ASSERT(false, "GetInnerBatchBlockSize : Unexpected format for eltwise_blocked_optimized kernel.");
}

return 1;
Expand All @@ -465,7 +465,7 @@ static inline int GetInnerFeatureBlockSize(const DataTensor& tensor) {
case DataLayout::bs_fs_zyx_bsv16_fsv32:
return 32;
default:
OPENVINO_ASSERT("GetInnerFeatureBlockSize : Unexpected format for eltwise_blocked_optimized kernel.");
OPENVINO_ASSERT(false, "GetInnerFeatureBlockSize : Unexpected format for eltwise_blocked_optimized kernel.");
}

return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void CreateScatterElementsUpdateOp(ProgramBuilder& p, const std::shared_p

auto axes_constant = std::dynamic_pointer_cast<ov::op::v0::Constant>(op->get_input_node_shared_ptr(3));
if (!axes_constant) {
OPENVINO_ASSERT("Unsupported parameter nodes type in ", op->get_friendly_name(), " (", op->get_type_name(), ")");
OPENVINO_ASSERT(false, "Unsupported parameter nodes type in ", op->get_friendly_name(), " (", op->get_type_name(), ")");
}
int64_t axis = ov::util::normalize_axis(op.get(), axes_constant->cast_vector<int64_t>()[0], op->get_input_partial_shape(0).rank());

Expand Down

0 comments on commit 6441b30

Please sign in to comment.