diff --git a/modules/nvidia_plugin/src/cuda/cuda_type_traits.hpp b/modules/nvidia_plugin/src/cuda/cuda_type_traits.hpp index a8a231dd9..9e01b77e3 100644 --- a/modules/nvidia_plugin/src/cuda/cuda_type_traits.hpp +++ b/modules/nvidia_plugin/src/cuda/cuda_type_traits.hpp @@ -5,6 +5,7 @@ #pragma once #include "openvino/core/type/element_type.hpp" +#include "openvino/core/type/element_type_traits.hpp" #ifdef __CUDACC__ #include diff --git a/modules/nvidia_plugin/src/ops/convert_color_i420.hpp b/modules/nvidia_plugin/src/ops/convert_color_i420.hpp index f9c4e9602..3f5386fc6 100644 --- a/modules/nvidia_plugin/src/ops/convert_color_i420.hpp +++ b/modules/nvidia_plugin/src/ops/convert_color_i420.hpp @@ -31,9 +31,9 @@ class I420ConvertColorBase : public OperationBase { constexpr const size_t N_DIM = 0; constexpr const size_t H_DIM = 1; constexpr const size_t W_DIM = 2; - NGRAPH_CHECK(node.get_input_size() == 1 || node.get_input_size() == 3, - "I420 conversion shall have one or 3 inputs, but it is ", - node.get_input_size()); + OPENVINO_ASSERT(node.get_input_size() == 1 || node.get_input_size() == 3, + "I420 conversion shall have one or 3 inputs, but it is ", + node.get_input_size()); auto single_plane = node.get_input_size() == 1; const auto& in_tensor_shape = node.get_input_shape(0); diff --git a/modules/nvidia_plugin/src/ops/convert_color_nv12.hpp b/modules/nvidia_plugin/src/ops/convert_color_nv12.hpp index 20168f6d7..5a160ad71 100644 --- a/modules/nvidia_plugin/src/ops/convert_color_nv12.hpp +++ b/modules/nvidia_plugin/src/ops/convert_color_nv12.hpp @@ -31,9 +31,9 @@ class NV12ConvertColorBase : public OperationBase { constexpr const size_t N_DIM = 0; constexpr const size_t H_DIM = 1; constexpr const size_t W_DIM = 2; - NGRAPH_CHECK(node.get_input_size() == 1 || node.get_input_size() == 2, - "NV12 conversion shall have one or 2 inputs, but it is ", - node.get_input_size()); + OPENVINO_ASSERT(node.get_input_size() == 1 || node.get_input_size() == 2, + "NV12 conversion shall have one or 2 inputs, but it is ", + node.get_input_size()); const bool single_plane = node.get_input_size() == 1; const auto& in_tensor_shape = node.get_input_shape(0); diff --git a/modules/nvidia_plugin/src/transformer/nodes/fully_connected.cpp b/modules/nvidia_plugin/src/transformer/nodes/fully_connected.cpp index 70c7aaa04..915eb70da 100644 --- a/modules/nvidia_plugin/src/transformer/nodes/fully_connected.cpp +++ b/modules/nvidia_plugin/src/transformer/nodes/fully_connected.cpp @@ -78,7 +78,7 @@ ov::PartialShape validate_matmul_output_shape(const ov::PartialShape& arg0_shape auto arg0_rank = arg0_shape.rank().get_length(); auto arg1_rank = arg1_shape.rank().get_length(); - NGRAPH_CHECK((arg0_rank != 0 && arg1_rank != 0), "Scalars are not supported as MatMul inputs."); + OPENVINO_ASSERT((arg0_rank != 0 && arg1_rank != 0), "Scalars are not supported as MatMul inputs."); // Temporary Dimension vectors to calculate output shape std::vector arg0_shape_tmp(arg0_shape); @@ -117,17 +117,17 @@ ov::PartialShape validate_matmul_output_shape(const ov::PartialShape& arg0_shape auto merged_dimension = ov::Dimension::dynamic(); auto arg0_col_dim = arg0_shape_tmp[arg0_rank - 1]; auto arg1_row_dim = arg1_shape_tmp[arg1_rank - 2]; - NGRAPH_CHECK(ov::Dimension::merge(merged_dimension, arg0_col_dim, arg1_row_dim) || arg0_col_dim.is_dynamic() || - arg1_row_dim.is_dynamic(), - "Incompatible MatMul matrix dimension. ", - "First input dimension=", - arg0_col_dim, - " at COL_INDEX_DIM=", - (arg0_rank - 1), - " doesn't match the second input dimension=", - arg1_row_dim, - " at ROW_INDEX_DIM=", - (arg1_rank - 2)); + OPENVINO_ASSERT(ov::Dimension::merge(merged_dimension, arg0_col_dim, arg1_row_dim) || arg0_col_dim.is_dynamic() || + arg1_row_dim.is_dynamic(), + "Incompatible MatMul matrix dimension. ", + "First input dimension=", + arg0_col_dim, + " at COL_INDEX_DIM=", + (arg0_rank - 1), + " doesn't match the second input dimension=", + arg1_row_dim, + " at ROW_INDEX_DIM=", + (arg1_rank - 2)); // 3. If ranks of input arguments are different after steps 1 and 2, // the smaller tensor is unsqueezed from the left side of the shape @@ -152,15 +152,15 @@ ov::PartialShape validate_matmul_output_shape(const ov::PartialShape& arg0_shape // to ensure MatMul backward compatibility. // Instead fully dynamic dimension is set as default for such a case. auto merged_dimension = ov::Dimension::dynamic(); - NGRAPH_CHECK(ov::Dimension::merge(merged_dimension, arg0_shape_tmp[i], arg1_shape_tmp[i]) || - arg0_shape_tmp[i].is_dynamic() || arg1_shape_tmp[i].is_dynamic(), - "Incompatible MatMul batch dimension. ", - "Can't merge first input dimension=", - arg0_shape_tmp[i], - " with second input dimension=", - arg1_shape_tmp[i], - " at index=", - i); + OPENVINO_ASSERT(ov::Dimension::merge(merged_dimension, arg0_shape_tmp[i], arg1_shape_tmp[i]) || + arg0_shape_tmp[i].is_dynamic() || arg1_shape_tmp[i].is_dynamic(), + "Incompatible MatMul batch dimension. ", + "Can't merge first input dimension=", + arg0_shape_tmp[i], + " with second input dimension=", + arg1_shape_tmp[i], + " at index=", + i); output_shape[i] = merged_dimension; } else {