commit | c40562d4467e3a68b0dac5e865570c8f38d1487e | [log] [tgz] |
---|---|---|
author | Georgios Pinitas <georgios.pinitas@arm.com> | Mon Feb 22 23:54:40 2021 +0000 |
committer | Georgios Pinitas <georgios.pinitas@arm.com> | Tue Feb 23 14:29:12 2021 +0000 |
tree | ccb13946e4407ba228422cf5bfce52faec9a2bfc | |
parent | 6061a89b3d10f7adf237cb5a7bc12dcb8970a651 [diff] |
Avoid nullptr dereference of vector_sum_col Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I4cc002da82da2219f3909a4e34463946cde4cf65 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5155 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp b/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp index eba52b0..d39900a 100644 --- a/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp +++ b/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp
@@ -406,7 +406,7 @@ kernel_name += "_fused_output_stage_fixedpoint"; _fuse_output_stage = true; // If a_offset == 0, vector_sum_col can be a nullptr - if(a_offset != 0) + if(a_offset != 0 && vector_sum_col != nullptr) { build_opts.add_option("-DA_OFFSET=" + support::cpp11::to_string(a_offset)); build_opts.add_option_if(vector_sum_col->info()->tensor_shape().num_dimensions() > 1, "-DSUM_COL_HAS_BATCHES");