Skip to content

Commit

Permalink
Rollback XNN_EXTRA_BYTES from weights for packw microkernels
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 702763408
  • Loading branch information
fbarchard authored and xnnpack-bot committed Dec 4, 2024
1 parent fa9add0 commit 525cf0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/packw-microkernel-tester.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class PackWMicrokernelTester {
}

void Test(xnn_qs8_packw_gemm_goi_ukernel_fn packw) const {
xnnpack::Buffer<int8_t> weights(XNN_EXTRA_BYTES / sizeof(int8_t) + n() * k());
xnnpack::Buffer<int8_t> weights(n() * k());
xnnpack::Buffer<int32_t> bias(n());
xnnpack::Buffer<int8_t, XNN_ALLOCATION_ALIGNMENT> packed_w(
packed_n() * packed_k() + packed_n() * sizeof(uint32_t));
Expand Down Expand Up @@ -209,7 +209,7 @@ class PackWMicrokernelTester {
}

void Test(xnn_x8_packw_gemm_goi_ukernel_fn packw) const {
xnnpack::Buffer<int8_t> weights(XNN_EXTRA_BYTES / sizeof(int8_t) + n() * k());
xnnpack::Buffer<int8_t> weights(n() * k());
xnnpack::Buffer<uint32_t> bias(n());
xnnpack::Buffer<int8_t, XNN_ALLOCATION_ALIGNMENT> packed_w(
packed_n() * packed_k() + packed_n() * sizeof(uint32_t));
Expand Down Expand Up @@ -334,7 +334,7 @@ class PackWMicrokernelTester {
}

void Test(xnn_x16_packw_gemm_goi_ukernel_fn packw) const {
xnnpack::Buffer<xnn_float16> weights(XNN_EXTRA_BYTES / sizeof(xnn_float16) + g() * n() * k());
xnnpack::Buffer<xnn_float16> weights(g() * n() * k());
xnnpack::Buffer<xnn_float16> padded_weights(g() * n() * packed_k());
xnnpack::Buffer<xnn_float16> bias(g() * n());
xnnpack::Buffer<xnn_float16, XNN_ALLOCATION_ALIGNMENT> packed_w(
Expand Down Expand Up @@ -386,7 +386,7 @@ class PackWMicrokernelTester {
}

void Test(xnn_x32_packw_gemm_goi_ukernel_fn packw) const {
xnnpack::Buffer<uint32_t> weights(XNN_EXTRA_BYTES / sizeof(uint32_t) + g() * n() * k());
xnnpack::Buffer<uint32_t> weights(g() * n() * k());
xnnpack::Buffer<uint32_t> padded_weights(g() * n() * packed_k());
xnnpack::Buffer<uint32_t> bias(g() * n());
xnnpack::Buffer<uint32_t, XNN_ALLOCATION_ALIGNMENT> packed_w(
Expand Down

0 comments on commit 525cf0e

Please sign in to comment.