[ПЗГ] fix coverity (#19204)

This commit is contained in:
Andrei Gorbachev 2023-08-17 09:46:35 +01:00 committed by GitHub
parent 14abb2de8e
commit 49bbcb4cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 150 additions and 149 deletions

View File

@ -79,7 +79,8 @@ struct activation : public primitive_base<activation> {
CLDNN_DECLARE_PRIMITIVE(activation)
activation() : primitive_base("", {}),
activation_function(activation_func::none) {}
activation_function(activation_func::none),
additional_params({0.f, 0.f}) {}
DECLARE_OBJECT_TYPE_SERIALIZATION

View File

@ -63,9 +63,9 @@ struct binary_convolution : public primitive_base<binary_convolution> {
/// @brief User-defined output data size of the primitive (w/o padding).
tensor output_size;
/// @brief Number of feature groups (grouped convolution). If more than 1 then weights/bias count needs to be 1.
int groups;
int groups = 1;
/// @brief Logical value of padding. Can be one of 3 values: 1 - pad bits equal to 1; -1 -> pad bits equal to 0; 0 -> pad is not counted
float pad_value;
float pad_value = 0.0f;
/// @brief List of primitive ids containing weights data.
const primitive_id_arr weights;

View File

@ -67,11 +67,11 @@ struct border : public primitive_base<border> {
/// @brief Sizes of border that needs to be added from right (in X dimension) and from bottom (in Y dimension).
ov::CoordinateDiff pads_end;
/// @brief Type of border that needs to be added to the input.
ov::op::PadMode pad_mode;
ov::op::PadMode pad_mode = ov::op::PadMode::CONSTANT;
/// @brief Border value that is used in constant mode.
float pad_value;
float pad_value = 0.0f;
/// @brief Bit mask whether input is non-constant or not. Position is defined at PAD_NON_CONST_INPUT.
int32_t non_constant_input_mask;
int32_t non_constant_input_mask = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -28,7 +28,7 @@ struct bucketize : primitive_base<bucketize> {
: primitive_base(id, inputs, {output_padding}, {optional_data_type(output_type)}),
with_right_bound(with_right_bound) {}
bool with_right_bound;
bool with_right_bound = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -62,7 +62,7 @@ struct concatenation : public primitive_base<concatenation> {
: primitive_base(id, {input}, {output_padding}, {optional_data_type{output_dt}}), axis(axis) {}
/// @brief Dimension along which concatenation should take place
int64_t axis;
int64_t axis = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -50,9 +50,9 @@ struct convert_color : public primitive_base<convert_color> {
mem_type(mem_type),
output_layout(output_layout) {}
color_format input_color_format;
color_format output_color_format;
memory_type mem_type;
color_format input_color_format = color_format::RGB;
color_format output_color_format = color_format::RGB;
memory_type mem_type = memory_type::buffer;
layout output_layout;
size_t hash() const override {

View File

@ -174,7 +174,7 @@ struct convolution : public primitive_base<convolution> {
/// @param padding_end Defines a padding added to input image on right (x axis) and bottom (y axis).
ov::CoordinateDiff padding_end;
/// @param audo_pad The pad type for automatically computing padding sizes
ov::op::PadType auto_pad;
ov::op::PadType auto_pad = ov::op::PadType::NOTSET;
/// @param deformable_mode.
bool deformable_mode {false};
@ -351,10 +351,10 @@ struct deformable_interp : public primitive_base<deformable_interp> {
/// @brief Size of weights tensor.
tensor kernel_size;
/// @brief Number of feature groups (grouped convolution). If more than 1 then weights/bias count needs to be 1.
uint32_t groups;
uint32_t groups = 0;
/// @param deformable_groups Defines a number of deformable groups that splits trans input into several parts
/// by channel dimension.
uint32_t deformable_groups;
uint32_t deformable_groups = 0;
/// @param padding_begin Defines a padding added to input image on left (x axis) and top (y axis).
ov::CoordinateDiff padding_begin;
/// @param padding_end Defines a padding added to input image on right (x axis) and bottom (y axis).
@ -448,7 +448,7 @@ struct deformable_conv : public primitive_base<deformable_conv> {
/// @brief User-defined output data size of the primitive (w/o padding).
tensor output_size;
/// @brief Number of feature groups (grouped convolution). If more than 1 then weights/bias count needs to be 1.
uint32_t groups;
uint32_t groups = 0;
/// @brief List of primitive ids containing weights data.
const primitive_id_arr weights;
/// @brief List of primitive ids containing bias data.

View File

@ -127,7 +127,7 @@ struct crop : public primitive_base<crop> {
/// @brief num_splits which Split has number of split as property
size_t num_splits = 1;
/// @brief original ngraph operation type
crop_ngraph_op_mode op_mode;
crop_ngraph_op_mode op_mode = crop_ngraph_op_mode::none;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -32,7 +32,7 @@ struct ctc_greedy_decoder : public primitive_base<ctc_greedy_decoder> {
, output_tensor(output_tensor) {}
uint32_t blank_index;
bool ctc_merge_repeated;
bool ctc_merge_repeated = false;
tensor output_tensor;
primitive_id second_output;

View File

@ -34,9 +34,9 @@ struct ctc_loss : primitive_base<ctc_loss> {
ctc_merge_repeated(ctc_merge_repeated),
unique(unique) {}
bool preprocess_collapse_repeated;
bool ctc_merge_repeated;
bool unique;
bool preprocess_collapse_repeated = false;
bool ctc_merge_repeated = false;
bool unique = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -31,11 +31,11 @@ struct cum_sum : public primitive_base<cum_sum> {
{}
/// @brief Scalar axis.
int64_t axis;
int64_t axis = 0;
/// @brief If set to true then the top element is not included in sum.
bool exclusive;
bool exclusive = false;
/// @brief If set to true will perform the sums in reverse direction.
bool reverse;
bool reverse = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -358,11 +358,11 @@ struct deconvolution : public primitive_base<deconvolution> {
/// @brief Defines the distance in width and height between elements in the filter.
ov::Strides dilations;
/// @brief Indicates that the primitive has user-defined output size (non-zero value).
bool with_output_size;
bool with_output_size = true;
/// @brief User-defined output data size of the primitive (w/o padding).
tensor output_size;
/// @brief Number of feature groups (grouped convolution). If more than 1 then weights/bias count needs to be 1.
uint32_t groups;
uint32_t groups = 1;
/// @brief Defines a padding added to input image on left (x axis) and top (y axis).
ov::CoordinateDiff pads_begin;
/// @brief Defines a padding added to input image on right (x axis) and bottom (y axis).
@ -370,7 +370,7 @@ struct deconvolution : public primitive_base<deconvolution> {
/// @brief Defines additional amount of paddings per each spatial axis added to output tensor.
ov::CoordinateDiff out_padding;
/// @param grouped_weights_shape Defines if weights tensor has explicit group dimension.
bool grouped_weights_shape;
bool grouped_weights_shape = false;
/// @brief Defines spatial shape of the output.
ov::PartialShape output_partial_shape;
/// @brief Data primitive id containing spatial shape of the output.

View File

@ -39,9 +39,9 @@ struct depth_to_space : public primitive_base<depth_to_space> {
, mode(mode) {}
/// @brief Block size.
size_t block_size;
size_t block_size = 0;
/// @brief depth division mode
depth_to_space_mode mode;
depth_to_space_mode mode = depth_to_space_mode::blocks_first;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -57,8 +57,8 @@ struct dft : public primitive_base<dft> {
std::vector<int64_t> axes;
std::vector<int64_t> signal_size;
ov::Shape output_shape;
dft_direction direction;
dft_mode mode;
dft_direction direction = dft_direction::forward;
dft_mode mode = dft_mode::complex;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -177,7 +177,7 @@ struct eltwise : public primitive_base<eltwise> {
}
/// @param mode Eltwise mode.
eltwise_mode mode;
eltwise_mode mode = eltwise_mode::sum;
/// @param coefficients Blob-wise coefficient.
std::vector<float> coefficients;
/// @brief Defines shift in input buffers between adjacent calculations of output values.
@ -185,7 +185,7 @@ struct eltwise : public primitive_base<eltwise> {
/// @brief Define auto broadcast rule specification.
ov::op::AutoBroadcastSpec broadcast_spec;
/// @brief Define m_pythondiv.
bool m_pythondiv;
bool m_pythondiv = true;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -41,7 +41,7 @@ struct embedding_bag : public primitive_base<embedding_bag> {
/// @brief Shape of output layout
tensor output_shape;
/// @brief Default index
int32_t default_index;
int32_t default_index = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -66,13 +66,13 @@ struct experimental_detectron_detection_output : public primitive_base<experimen
primitive_id output_classes;
primitive_id output_scores;
float score_threshold;
float nms_threshold;
int num_classes;
int post_nms_count;
int max_detections_per_image;
bool class_agnostic_box_regression;
float max_delta_log_wh;
float score_threshold = 0.0f;
float nms_threshold = 0.0f;
int num_classes = 0;
int post_nms_count = 0;
int max_detections_per_image = 0;
bool class_agnostic_box_regression = false;
float max_delta_log_wh = 0.0f;
std::vector<float> deltas_weights;
size_t hash() const override {

View File

@ -47,10 +47,10 @@ struct experimental_detectron_generate_proposals_single_image
post_nms_count{post_nms_count} {}
primitive_id output_roi_scores;
float min_size;
float nms_threshold;
int64_t pre_nms_count;
int64_t post_nms_count;
float min_size = 0.0f;
float nms_threshold = 0.0f;
int64_t pre_nms_count = 0;
int64_t post_nms_count = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -41,15 +41,15 @@ struct experimental_detectron_prior_grid_generator
image_height{image_height},
image_width{image_width} {}
bool flatten;
uint64_t h;
uint64_t w;
float stride_x;
float stride_y;
uint64_t featmap_height;
uint64_t featmap_width;
uint64_t image_height;
uint64_t image_width;
bool flatten = false;
uint64_t h = 0;
uint64_t w = 0;
float stride_x = 0.0f;
float stride_y = 0.0f;
uint64_t featmap_height = 0;
uint64_t featmap_width = 0;
uint64_t image_height = 0;
uint64_t image_width = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -34,7 +34,7 @@ struct experimental_detectron_topk_rois : public primitive_base<experimental_det
max_rois(max_rois) {}
/// maximal numbers of output ROIs.
size_t max_rois;
size_t max_rois = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -33,7 +33,7 @@ struct eye : public primitive_base<eye> {
shift{shift} {}
tensor output_shape;
int32_t shift;
int32_t shift = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -81,9 +81,9 @@ struct fully_connected : public primitive_base<fully_connected> {
/// @brief Primitive id containing bias data.
primitive_id bias;
/// @brief Primitive dimension size.
size_t input_size;
size_t input_size = 2;
/// @brief Primitive weights rank.
size_t weights_rank;
size_t weights_rank = 2;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -41,13 +41,13 @@ struct gather : public primitive_base<gather> {
, support_neg_ind(support_neg_ind) {}
/// @brief Gathering axis
int64_t axis;
int64_t axis = 0;
/// @brief Gather output shape
ov::Shape output_shape;
/// @brief Gathering batch_dim
int64_t batch_dim;
int64_t batch_dim = 0;
/// @brief Support negative indexes
bool support_neg_ind;
bool support_neg_ind = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -45,7 +45,7 @@ struct gather_elements : public primitive_base<gather_elements> {
tensor output_shape;
/// @brief Which axis to gather on.
int64_t axis;
int64_t axis = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -52,7 +52,7 @@ struct gather_nd : public primitive_base<gather_nd> {
uint8_t batch_dims;
/// @brief GatherND batch_merged_output
bool batch_merged_output;
bool batch_merged_output = true;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -60,17 +60,17 @@ struct gemm : public primitive_base<gemm> {
}
/// @brief Flag for transposing first input matrix
bool transpose_input0;
bool transpose_input0 = false;
/// @brief Flag for transposing second input matrix
bool transpose_input1;
bool transpose_input1 = false;
/// @brief Variable containing ALPHA parameter
float alpha;
float alpha = 1.0f;
/// @brief Variable containing BETA parameter
float beta;
float beta = 1.0f;
/// @brief First matrix rank
size_t input_rank;
size_t input_rank = 4;
/// @brief Second matrix rank
size_t weight_rank;
size_t weight_rank = 4;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -55,13 +55,13 @@ struct generate_proposals
primitive_id output_rois_scores;
primitive_id output_rois_num;
float min_size;
float nms_threshold;
int64_t pre_nms_count;
int64_t post_nms_count;
bool normalized;
float nms_eta;
data_types roi_num_type;
float min_size = 0.0f;
float nms_threshold = 0.0f;
int64_t pre_nms_count = 0;
int64_t post_nms_count = 0;
bool normalized = false;
float nms_eta = 0.0f;
data_types roi_num_type = data_types::bin;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -29,7 +29,7 @@ struct grn : public primitive_base<grn> {
{}
/// @brief Bias value for whole output tensor.
float bias;
float bias = 0.0f;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -55,15 +55,15 @@ struct lrn : public primitive_base<lrn> {
norm_region(lrn_norm_region) {}
/// @brief Size of normalization.
uint32_t size;
uint32_t size = 0;
/// @brief Hyper parameter "k".
float k;
float k = 0.0f;
/// @brief Hyper parameter "alpha".
float alpha;
float alpha = 0.0f;
/// @brief Hyper parameter "beta".
float beta;
float beta = 0.0f;
/// @brief Normalize across or within channel
lrn_norm_region norm_region;
lrn_norm_region norm_region = lrn_norm_region::lrn_norm_region_within_channel;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -111,17 +111,17 @@ struct lstm : public primitive_base<lstm> {
/// @brief Primitive id containing peepholes data.
primitive_id peepholes;
/// @brief Cell clip threshold T. It is applied to the input of activations [-T, T]. No clip is applied if it is not specified.
float clip;
float clip = 0.0f;
/// @brief Couple the input and forget gates if input_forget is 1. Default is 0.
bool input_forget;
bool input_forget = 0;
/// @brief A list of 3 activation functions for the input, output, forget, cell, and hidden.
std::vector<activation_func> activations;
/// @brief Optional scaling values used by some activation functions. The values are consumed in the order of activation functions.
std::vector<activation_additional_params> activation_params;
/// @brief Output selection. Default the entire hidden sequence is returned.
lstm_output_selection output_selection;
lstm_output_selection output_selection = lstm_output_selection::sequence;
/// @brief Weights, recurrent weights, and biases order. [iofz] : ONNX, [ifoz] : Caffe
lstm_weights_order offset_order;
lstm_weights_order offset_order = lstm_weights_order::izof;
// NOT SUPPORTED YET
// /// @brief Optional tensor specifying lengths of the sequences in a batch.

View File

@ -48,7 +48,7 @@ struct lstm_dynamic : public primitive_base<lstm_dynamic> {
const primitive_id& initial_hidden = "",
const primitive_id& initial_cell = "",
const float clip = 0.0f,
const bool input_forget = 0,
const bool input_forget = false,
const padding& output_padding = padding())
: primitive_base(id, {input}, {output_padding}),
dyn_length(dyn_length),
@ -79,9 +79,9 @@ struct lstm_dynamic : public primitive_base<lstm_dynamic> {
/// @brief Primitive id containing the initial value of the cell state data.
primitive_id initial_cell;
/// @brief Cell clip threshold T. It is applied to the input of activations [-T, T]. No clip is applied if it is not specified.
float clip;
float clip = 0.0f;
/// @brief Couple the input and forget gates if input_forget is 1. Default is 0.
bool input_forget;
bool input_forget = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -68,9 +68,9 @@ struct lstm_dynamic_timeloop
/// @brief Array of primitive ids containing the initial value of the hidden state data (Ht-1).
primitive_id initial_cell;
/// @brief Cell clip threshold T. It is applied to the input of activations [-T, T]. No clip is applied if it is not specified.
float clip;
float clip = 0.0f;
/// @brief Couple the input and forget gates if input_forget is 1. Default is 0.
bool input_forget;
bool input_forget = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -50,7 +50,7 @@ struct mutable_data : public primitive_base<mutable_data> {
memory::ptr mem;
/// @brief Specifies function which will be used to fill weights.
filler_type fill_type;
filler_type fill_type = filler_type::no_fill;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -41,7 +41,7 @@ struct mvn : public primitive_base<mvn> {
/// @brief Epsilon for not dividing by zero while normalizing.
float epsilon;
/// @brief The mode of applying epsilon.
bool eps_inside_sqrt;
bool eps_inside_sqrt = false;
/// @brief Determines axes set for normalization.
std::vector<int64_t> reduction_axes;

View File

@ -55,9 +55,9 @@ struct normalize : public primitive_base<normalize> {
/// All other dimensions should be 1.
primitive_id scale_input;
/// @brief Determines if the normalization is done across or within spatial (see documentation above).
bool across_spatial;
bool across_spatial = true;
/// @brief Epsilon for not dividing by zero while normalizing.
float epsilon;
float epsilon = 1e-10f;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -84,13 +84,13 @@ struct one_hot : public primitive_base<one_hot> {
/// @brief Output size reference.
tensor shape;
/// @brief One-hot axis position in output shape (0-based, from left to right).
int64_t one_hot_axis;
int64_t one_hot_axis = 0;
/// @brief The number of classes and thus the size of the one-hot dimension
int64_t depth;
int64_t depth = 0;
/// @brief The locations represented by indices in indices take this value.
float on_value;
float on_value = 1.0f;
/// @brief all other locations take value this value.
float off_value;
float off_value = 0.0f;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -138,7 +138,7 @@ struct pooling : public primitive_base<pooling> {
/// @brief Primitive id which contains indices output.
primitive_id indices_output;
/// @brief Pooling mode.
pooling_mode mode;
pooling_mode mode = pooling_mode::max;
/// @brief Pooling kernel size.
ov::Shape size;
/// @brief Defines shift in input buffer between adjacent calculations of output values.
@ -150,13 +150,13 @@ struct pooling : public primitive_base<pooling> {
/// @brief Defines a shift, relative to the end of padding shape.
ov::Shape pads_end;
/// @brief Defines how the padding is calculated.
ov::op::PadType auto_pad;
ov::op::PadType auto_pad = ov::op::PadType::EXPLICIT;
/// @brief Defines a type of rounding to be applied.
ov::op::RoundingType rounding_type;
ov::op::RoundingType rounding_type = ov::op::RoundingType::CEIL;
/// @brief first dimension of input that should be used to calculate the upper bound of index output.
int64_t axis = 0;
/// @brief Indicates that the primitive has user-defined output size (non-zero value).
bool with_output_size;
bool with_output_size = true;
/// @brief User-defined output data size of the primitive (w/o padding).
tensor output_size;
/// @brief type of index output

View File

@ -40,7 +40,7 @@ struct prior_box : public primitive_base<prior_box> {
/// @param clip If true, will clip the prior so that it is within [0, 1].
/// @param variance Variance for adjusting the prior boxes.
/// @param step_width Step.
/// @param offset Offset to the top left corner of each cell.
/// @param offset Offset to the top left corner of each cell.
prior_box(const primitive_id& id,
const std::vector<input_info>& inputs,
const tensor& output_size,
@ -312,7 +312,7 @@ struct prior_box : public primitive_base<prior_box> {
}
private:
bool clustered;
bool clustered = false;
void init(const std::vector<float>& ratios, const std::vector<float>& variances) {
constexpr auto default_aspect_ratio = 1.0f;

View File

@ -58,10 +58,10 @@ struct pyramid_roi_align : public primitive_base<pyramid_roi_align> {
, pyramid_starting_level(pyramid_starting_level)
{}
int output_size;
int sampling_ratio;
int output_size = 0;
int sampling_ratio = 0;
std::vector<int> pyramid_scales;
int pyramid_starting_level;
int pyramid_starting_level = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -63,7 +63,7 @@ struct reduce : public primitive_base<reduce> {
/// @brief List of axes to reduce
std::vector<int64_t> axes;
/// @brief Keep the reduced dimension or not, 1 mean keep reduced dimension
bool keep_dims;
bool keep_dims = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -46,14 +46,14 @@ struct region_yolo : public primitive_base<region_yolo> {
/// @brief Defines a scope of a region yolo normalization
/// @details
/// Specific behaviour is determined by these parameters, as follows:
uint32_t coords;
uint32_t classes;
uint32_t num;
uint32_t coords = 0;
uint32_t classes = 0;
uint32_t num = 0;
std::vector<int64_t> mask;
uint32_t mask_size;
int32_t axis;
int32_t end_axis;
bool do_softmax;
uint32_t mask_size = 0;
int32_t axis = 0;
int32_t end_axis = 0;
bool do_softmax = false;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -31,7 +31,7 @@ struct reorg_yolo : public primitive_base<reorg_yolo> {
/// @brief Defines a scope of a reorg yolo normalization
/// @details
/// Specific behaviour is determined by these parameters, as follows:
uint32_t stride;
uint32_t stride = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -130,7 +130,7 @@ struct resample : public primitive_base<resample> {
tensor output_size;
/// @param num_filter Input filter. Only used by bilinear sample_type.
uint32_t num_filter;
uint32_t num_filter = 0;
/// @param sizes Describing output shape for spatial axes.
std::vector<int64_t> sizes;
/// @param scales Scales of spatial axes, i.e. output_shape / input_shape
@ -142,17 +142,17 @@ struct resample : public primitive_base<resample> {
/// @param pads_end End paddings for input.
std::vector<size_t> pads_end;
/// @param operation_type Resample method (nearest neighbor/bilinear/caffe bilinear).
InterpolateOp::InterpolateMode operation_type;
InterpolateOp::InterpolateMode operation_type = InterpolateOp::InterpolateMode::LINEAR;
/// @param shape_calc_mode Specifies which input, sizes or scales, is used to calculate an output shape.
InterpolateOp::ShapeCalcMode shape_calc_mode;
InterpolateOp::ShapeCalcMode shape_calc_mode = InterpolateOp::ShapeCalcMode::SIZES;
/// @param antialias is a flag that specifies whether to perform anti-aliasing.
int32_t antialias;
int32_t antialias = 0;
/// @param cube_coeff specifies the parameter a for cubic interpolation. cube_coeff is used only when mode == cubic.
float cube_coeff;
float cube_coeff = -0.75f;
/// @param coord_trans_mode specifies how to transform the coordinate in the resized tensor to the coordinate in the original tensor
InterpolateOp::CoordinateTransformMode coord_trans_mode;
InterpolateOp::CoordinateTransformMode coord_trans_mode = InterpolateOp::CoordinateTransformMode::HALF_PIXEL;
/// @param round_mode specifies round mode when mode == nearest and is used only when mode == nearest.
InterpolateOp::NearestMode round_mode;
InterpolateOp::NearestMode round_mode = InterpolateOp::NearestMode::ROUND_PREFER_FLOOR;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -82,7 +82,7 @@ struct reshape : public primitive_base<reshape> {
ov::PartialShape output_partial_shape;
reshape_mode mode;
reshape_mode mode = reshape_mode::base;
bool operator==(const primitive& rhs) const override {
if (!compare_common_params(rhs))

View File

@ -52,9 +52,9 @@ struct reverse_sequence : public primitive_base<reverse_sequence> {
}
/// @brief The axis which is partially reversed.
int32_t seq_axis;
int32_t seq_axis = 0;
/// @brief The axis along which reversal is performed.
int32_t batch_axis;
int32_t batch_axis = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -51,18 +51,18 @@ struct roi_align : public primitive_base<roi_align> {
aligned_mode{aligned_mode} {}
/// @brief Height of the ROI output feature map.
int pooled_h;
int pooled_h = 0;
/// @brief Width of the ROI output feature map.
int pooled_w;
int pooled_w = 0;
/// @brief Number of bins over height and width to use to calculate each output feature map element.
int sampling_ratio;
int sampling_ratio = 0;
/// @brief multiplicative spatial scale factor to translate ROI coordinates
/// from their input spatial scale to the scale used when pooling.
float spatial_scale;
float spatial_scale = false;
/// @brief Method to perform pooling to produce output feature map elements.
PoolingMode pooling_mode;
PoolingMode pooling_mode = PoolingMode::max;
/// @brief Method to coordinate alignment.
AlignedMode aligned_mode;
AlignedMode aligned_mode = AlignedMode::asymmetric;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -31,7 +31,7 @@ struct scatter_elements_update : public primitive_base<scatter_elements_update>
: primitive_base(id, {data, idx, idupd}, {output_padding}), axis(axis) {}
/// @brief ScatterElementsUpdate axis
int64_t axis;
int64_t axis = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -31,7 +31,7 @@ struct scatter_nd_update : public primitive_base<scatter_nd_update> {
: primitive_base(id, {data, idx, idupd}, {output_padding}), indices_rank(indices_rank) {}
/// @brief ScatterNDUpdate indices_rank
size_t indices_rank;
size_t indices_rank = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -40,7 +40,7 @@ struct scatter_update : public primitive_base<scatter_update> {
: primitive_base(id, {dict, idx, idupd}, {output_padding}), axis(axis) {}
/// @brief ScatterUpdate axis
int64_t axis;
int64_t axis = 0;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -36,10 +36,9 @@ struct shape_of : public primitive_base<shape_of> {
const input_info& input,
const data_types output_data_type,
const padding& output_padding = padding())
: primitive_base(id, {input}, {output_padding}, {optional_data_type{output_data_type}})
, input_rank(0) {}
: primitive_base(id, {input}, {output_padding}, {optional_data_type{output_data_type}}) {}
size_t input_rank;
size_t input_rank = 0;
bool operator==(const primitive& rhs) const override {
if (!compare_common_params(rhs))

View File

@ -32,7 +32,7 @@ struct shuffle_channels : public primitive_base<shuffle_channels> {
/// @brief The number of groups to split the channel dimension. This number must evenly divide the channel dimension size.
int32_t group;
/// @brief The index of the channel dimension (default is 1).
int32_t axis;
int32_t axis = 1;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -41,7 +41,7 @@ struct softmax : public primitive_base<softmax> {
/// - when softmax dimension is set to 2 (y dim) each input column is normalized independently,
/// - when softmax dimension is set to 3 (x dim) each input row is normalized independently.
int64_t dimension;
int64_t dimension = 1;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -64,10 +64,10 @@ struct space_to_depth : public primitive_base<space_to_depth> {
: primitive_base(id, {input}, {output_padding}), mode(mode), block_size(block_size) {}
/// @brief Depth mode.
depth_mode mode;
depth_mode mode = depth_mode::depth_first;
/// @brief Block size.
size_t block_size;
size_t block_size = 1;
size_t hash() const override {
size_t seed = primitive::hash();

View File

@ -213,7 +213,7 @@ struct loop_impl : typed_primitive_impl<loop> {
}
private:
int64_t _max_iteration;
int64_t _max_iteration = 0;
std::vector<cldnn::loop::backedge_mapping> _back_edges;
};

View File

@ -158,9 +158,9 @@ public:
&& cp.weights.X().v == 1 && cp.weights.Y().v > 1
&& !(cp.groups == cp.inputs[0].Feature().v && cp.inputs[0].Feature().v == cp.outputs[0].Feature().v)) {
auto can_swap = [](const kernel_selector::Tensor::DataTensor& dt) -> bool {
auto x_channel_idx = kernel_selector::Tensor::DataTensor::Channelndex(dt.GetLayout(),
kernel_selector::Tensor::DataChannelName::X);
auto x_axis_dim = dt.GetDims()[static_cast<uint32_t>(x_channel_idx)];
auto x_channel_idx = static_cast<uint32_t>(kernel_selector::Tensor::DataTensor::Channelndex(dt.GetLayout(),
kernel_selector::Tensor::DataChannelName::X));
auto x_axis_dim = dt.GetDims()[x_channel_idx];
return (x_axis_dim.pad.Total() == 0 && x_axis_dim.v == 1);
};

View File

@ -224,9 +224,9 @@ protected:
}
kernel_arguments_data get_arguments_impl(const typed_primitive_inst<PType>& instance) const override {
for (size_t k = 0; k < _kernels.size(); ++k) {
if (_kernels.size()) {
auto args = get_arguments(instance);
args.scalars = &_kernel_data.kernels[k].params.scalars;
args.scalars = &_kernel_data.kernels[0].params.scalars;
for (const auto& m : instance.get_intermediates_memories()) {
args.intermediates.push_back(m);

View File

@ -21,7 +21,8 @@ struct border_params : public base_params {
ArgType end_type;
ArgType pad_value_type;
border_params() : base_params(KernelType::BORDER), b_type(BorderType::CONSTANT), border_value(0.0f) {}
border_params() : base_params(KernelType::BORDER), b_type(BorderType::CONSTANT), border_value(0.0f),
begin_type(ArgType::Constant), end_type(ArgType::Constant), pad_value_type(ArgType::Constant) {}
ParamsKey GetParamsKey() const override {
ParamsKey k = base_params::GetParamsKey();