Skip to content

Commit

Permalink
Add extra bytes to weights for convolution-tester
Browse files Browse the repository at this point in the history
- Fixes segfault / asan when testing with simd packw kernels

PiperOrigin-RevId: 689714604
  • Loading branch information
fbarchard authored and xnnpack-bot committed Oct 25, 2024
1 parent 9ed32b1 commit 9f99ca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/convolution-operator-tester.h
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ class ConvolutionOperatorTester {

xnnpack::Buffer<int8_t> input(XNN_EXTRA_BYTES / sizeof(int8_t) +
batch_size() * ((input_height() * input_width() - 1) * input_channel_stride() + groups() * group_input_channels()));
xnnpack::Buffer<int8_t> kernel(groups() * group_output_channels() * kernel_height() * kernel_width() * group_input_channels());
xnnpack::Buffer<int8_t> kernel(XNN_EXTRA_BYTES / sizeof(int8_t) + groups() * group_output_channels() * kernel_height() * kernel_width() * group_input_channels());
xnnpack::Buffer<int32_t> bias(groups() * group_output_channels());
xnnpack::Buffer<int8_t> output(batch_size() * ((output_height() * output_width() - 1) * output_channel_stride() + groups() * group_output_channels()));
xnnpack::Buffer<int32_t> accumulators(batch_size() * output_height() * output_width() * groups() * group_output_channels());
Expand Down

0 comments on commit 9f99ca0

Please sign in to comment.