Skip to content

Commit

Permalink
[GPU] Coverity fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyamin-Roman committed Mar 25, 2024
1 parent 1049c03 commit 2bf62f2
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template <typename BufferType>
class Serializer<BufferType, cldnn::format, typename std::enable_if<std::is_base_of<InputBuffer<BufferType>, 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct assign : public primitive_base<assign> {

void load(BinaryInputBuffer& ib) override {
primitive_base<assign>::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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct kv_cache : public primitive_base<kv_cache> {
void load(BinaryInputBuffer& ib) override {
primitive_base<kv_cache>::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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct read_value : public primitive_base<read_value> {

void load(BinaryInputBuffer& ib) override {
primitive_base<read_value>::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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct clKernelData {
struct WeightsReorderParams {
WeightsTensor src;
WeightsTensor dest;
bool rotate;
bool rotate = false;
bool is_initialized = false;
};

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/kernel_selector/tensor_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ struct TensorBase {
template <typename DType, typename Layout>
struct TensorBaseT : public TensorBase {
protected:
DType dtype;
Layout layout;
DType dtype = DType();
Layout layout = Layout();

template <typename ArrayT, typename ChannelName>
static inline int ChannelIndex(const ArrayT& channelArr, Layout l, ChannelName channelName) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/thirdparty/onednn_gpu

0 comments on commit 2bf62f2

Please sign in to comment.