fix uninitialized scalar variables (#16772)
This commit is contained in:
parent
e17a6f29bf
commit
df4d7bd3e9
@ -280,7 +280,7 @@ protected:
|
||||
struct lstm_elt : public primitive_base<lstm_elt> {
|
||||
CLDNN_DECLARE_PRIMITIVE(lstm_elt)
|
||||
|
||||
lstm_elt() : primitive_base("", {}) {}
|
||||
lstm_elt() : primitive_base("", {}), clip(0), input_forget(0), offset_order(lstm_weights_order::iofz), direction(0) {}
|
||||
|
||||
DECLARE_OBJECT_TYPE_SERIALIZATION
|
||||
|
||||
|
@ -80,10 +80,10 @@ void data_inst::load(BinaryInputBuffer& ib) {
|
||||
layout output_layout = layout();
|
||||
ib >> output_layout;
|
||||
|
||||
allocation_type _allocation_type;
|
||||
allocation_type _allocation_type = allocation_type::unknown;
|
||||
ib >> make_data(&_allocation_type, sizeof(_allocation_type));
|
||||
|
||||
size_t data_size;
|
||||
size_t data_size = 0;
|
||||
ib >> make_data(&data_size, sizeof(size_t));
|
||||
|
||||
if (ib.getNetwork()) {
|
||||
|
@ -221,7 +221,7 @@ void detection_output_inst::load(cldnn::BinaryInputBuffer& ib) {
|
||||
float nms_threshold;
|
||||
int top_k;
|
||||
float eta;
|
||||
prior_box_code_type code_type;
|
||||
prior_box_code_type code_type = prior_box_code_type::corner;
|
||||
bool variance_encoded_in_target;
|
||||
float confidence_threshold;
|
||||
int32_t prior_info_size;
|
||||
|
@ -233,20 +233,20 @@ public:
|
||||
bool gemm_with_bias;
|
||||
ib >> gemm_with_bias;
|
||||
|
||||
dnnl::memory::data_type in0_dt;
|
||||
dnnl::memory::data_type in1_dt;
|
||||
dnnl::memory::data_type out_dt;
|
||||
dnnl::memory::data_type bias_dt;
|
||||
dnnl::memory::data_type in0_dt = dnnl::memory::data_type::undef;
|
||||
dnnl::memory::data_type in1_dt = dnnl::memory::data_type::undef;
|
||||
dnnl::memory::data_type out_dt = dnnl::memory::data_type::undef;
|
||||
dnnl::memory::data_type bias_dt = dnnl::memory::data_type::undef;
|
||||
|
||||
dnnl::memory::dims in0_dims;
|
||||
dnnl::memory::dims in1_dims;
|
||||
dnnl::memory::dims out_dims;
|
||||
dnnl::memory::dims bias_dims;
|
||||
|
||||
dnnl::memory::format_tag in0_fmt;
|
||||
dnnl::memory::format_tag in1_fmt;
|
||||
dnnl::memory::format_tag out_fmt;
|
||||
dnnl::memory::format_tag bias_fmt;
|
||||
dnnl::memory::format_tag in0_fmt = dnnl::memory::format_tag::undef;
|
||||
dnnl::memory::format_tag in1_fmt = dnnl::memory::format_tag::undef;
|
||||
dnnl::memory::format_tag out_fmt = dnnl::memory::format_tag::undef;
|
||||
dnnl::memory::format_tag bias_fmt = dnnl::memory::format_tag::undef;
|
||||
|
||||
ib >> make_data(&in0_dt, sizeof(dnnl::memory::data_type));
|
||||
ib >> make_data(&in1_dt, sizeof(dnnl::memory::data_type));
|
||||
|
@ -99,7 +99,7 @@ void mutable_data_inst::save(cldnn::BinaryOutputBuffer& ob) const {
|
||||
void mutable_data_inst::load(BinaryInputBuffer& ib) {
|
||||
parent::load(ib);
|
||||
|
||||
size_t data_size;
|
||||
size_t data_size = 0;
|
||||
ib >> make_data(&data_size, sizeof(size_t));
|
||||
|
||||
if (data_size == 0)
|
||||
|
@ -1273,7 +1273,7 @@ void primitive_inst::load(cldnn::BinaryInputBuffer& ib) {
|
||||
ib >> output_layout;
|
||||
output_layouts.emplace_back(output_layout);
|
||||
|
||||
allocation_type _allocation_type;
|
||||
allocation_type _allocation_type = allocation_type::unknown;
|
||||
ib >> make_data(&_allocation_type, sizeof(_allocation_type));
|
||||
allocation_types.emplace_back(_allocation_type);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ dnnl::memory gpu_buffer::get_onednn_memory(dnnl::memory::desc desc, int64_t offs
|
||||
#endif
|
||||
|
||||
gpu_image2d::gpu_image2d(ocl_engine* engine, const layout& layout)
|
||||
: lockable_gpu_mem(), memory(engine, layout, allocation_type::cl_mem, false), _row_pitch(0), _slice_pitch(0) {
|
||||
: lockable_gpu_mem(), memory(engine, layout, allocation_type::cl_mem, false), _width(0), _height(0), _row_pitch(0), _slice_pitch(0) {
|
||||
cl_channel_type type = layout.data_type == data_types::f16 ? CL_HALF_FLOAT : CL_FLOAT;
|
||||
cl_channel_order order = CL_R;
|
||||
switch (layout.format) {
|
||||
|
Loading…
Reference in New Issue
Block a user