From d4a099597f66d6bdf1ef9c222480cb9d6a4b2cc5 Mon Sep 17 00:00:00 2001 From: Lyamin-Roman Date: Tue, 26 Mar 2024 02:12:59 +0900 Subject: [PATCH] [GPU] Coverity fixes --- .../intel_gpu/graph/serialization/layout_serializer.hpp | 2 +- src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp | 2 +- .../intel_gpu/include/intel_gpu/primitives/kv_cache.hpp | 2 +- .../intel_gpu/include/intel_gpu/primitives/read_value.hpp | 2 +- .../intel_gpu/src/kernel_selector/kernel_selector_common.h | 2 +- src/plugins/intel_gpu/src/kernel_selector/tensor_type.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/layout_serializer.hpp b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/layout_serializer.hpp index 3c146af500d8ed..d0f54d66aedca9 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/layout_serializer.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/layout_serializer.hpp @@ -98,7 +98,7 @@ template class Serializer, BufferType>::value>::type> { public: static void load(BufferType& buffer, cldnn::format& format) { - cldnn::format::type fmt_type; + cldnn::format::type fmt_type = cldnn::format::type::any; buffer >> make_data(&fmt_type, sizeof(cldnn::format::type)); if (fmt_type == cldnn::format::custom) { cldnn::format_traits traits; diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp index fa306a23fc4179..4c04a4332c458b 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp @@ -56,7 +56,7 @@ struct assign : public primitive_base { void load(BinaryInputBuffer& ib) override { primitive_base::load(ib); - ov::element::Type_t data_type; + ov::element::Type_t data_type = ov::element::Type_t::undefined; ib >> variable_id; ib >> output_layout; ib >> make_data(&data_type, sizeof(ov::element::Type_t)); diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/kv_cache.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/kv_cache.hpp index 048f51379c30ec..d45aa2af0027a7 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/primitives/kv_cache.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/kv_cache.hpp @@ -68,7 +68,7 @@ struct kv_cache : public primitive_base { void load(BinaryInputBuffer& ib) override { primitive_base::load(ib); ov::PartialShape data_shape; - ov::element::Type_t data_type; + ov::element::Type_t data_type = ov::element::Type_t::undefined; std::string variable_id; ib >> variable_id; ib >> data_shape; diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp index 97824c23dfdd41..bcff06188c9730 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp @@ -57,7 +57,7 @@ struct read_value : public primitive_base { void load(BinaryInputBuffer& ib) override { primitive_base::load(ib); - ov::element::Type_t data_type; + ov::element::Type_t data_type = ov::element::Type_t::undefined; ib >> variable_id; ib >> output_layout; ib >> make_data(&data_type, sizeof(ov::element::Type_t)); diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.h b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.h index 2947ed863232a5..627fdf758586a3 100644 --- a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.h +++ b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.h @@ -73,7 +73,7 @@ struct clKernelData { struct WeightsReorderParams { WeightsTensor src; WeightsTensor dest; - bool rotate; + bool rotate = false; bool is_initialized = false; }; diff --git a/src/plugins/intel_gpu/src/kernel_selector/tensor_type.h b/src/plugins/intel_gpu/src/kernel_selector/tensor_type.h index 6fdcf75b45dd6a..02cf8f692ef17f 100644 --- a/src/plugins/intel_gpu/src/kernel_selector/tensor_type.h +++ b/src/plugins/intel_gpu/src/kernel_selector/tensor_type.h @@ -471,8 +471,8 @@ struct TensorBase { template struct TensorBaseT : public TensorBase { protected: - DType dtype; - Layout layout; + DType dtype = DType(); + Layout layout = Layout(); template static inline int ChannelIndex(const ArrayT& channelArr, Layout l, ChannelName channelName) {