From 9f99ca04636984a252a26a9a4863f92dd880dd4d Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Fri, 25 Oct 2024 02:51:12 -0700 Subject: [PATCH] Add extra bytes to weights for convolution-tester - Fixes segfault / asan when testing with simd packw kernels PiperOrigin-RevId: 689714604 --- test/convolution-operator-tester.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/convolution-operator-tester.h b/test/convolution-operator-tester.h index 3e2b1c3b9e0..b197bdd0069 100644 --- a/test/convolution-operator-tester.h +++ b/test/convolution-operator-tester.h @@ -1298,7 +1298,7 @@ class ConvolutionOperatorTester { xnnpack::Buffer input(XNN_EXTRA_BYTES / sizeof(int8_t) + batch_size() * ((input_height() * input_width() - 1) * input_channel_stride() + groups() * group_input_channels())); - xnnpack::Buffer kernel(groups() * group_output_channels() * kernel_height() * kernel_width() * group_input_channels()); + xnnpack::Buffer kernel(XNN_EXTRA_BYTES / sizeof(int8_t) + groups() * group_output_channels() * kernel_height() * kernel_width() * group_input_channels()); xnnpack::Buffer bias(groups() * group_output_channels()); xnnpack::Buffer output(batch_size() * ((output_height() * output_width() - 1) * output_channel_stride() + groups() * group_output_channels())); xnnpack::Buffer accumulators(batch_size() * output_height() * output_width() * groups() * group_output_channels());