Anndrey24 commented on code in PR #16899:
URL: https://github.com/apache/tvm/pull/16899#discussion_r1572332334
##########
python/tvm/topi/arm_cpu/conv2d_gemm.py:
##########
@@ -322,10 +326,24 @@ def compute_conv2d_gemm_without_weight_transform(
tvm.tir.const(1, C.dtype) * C[0, M_padded - 1, N_padded - 1]
- tvm.tir.const(1, C.dtype) * C[0, M_padded - 1, N_padded - 1]
)
+ elif use_scalable_vectors:
+ assert len(B_interleaved_t.shape) == 2
+ C = te.compute(
+ (batches, M_padded, N_padded),
+ lambda b, x, y: te.sum(
+ A[b, x, k].astype(in_dtype) * B_interleaved_t[k,
y].astype(in_dtype),
+ axis=k,
+ ),
+ name="C",
+ )
+ # Ensure padding on the N axis does not get removed during tir passes
+ # by adding a dummy reference to the specific padded area of the result
+ zero = (
+ tvm.tir.const(1, C.dtype) * C[0, 0, N_padded - 1]
+ - tvm.tir.const(1, C.dtype) * C[0, 0, N_padded - 1]
+ )
else:
- # Configuration space
- configure_knobs(cfg, M_padded, K_padded, target)
Review Comment:
Yes, that function call is used to configure the auto-tuning knobs used in
the [interleaved conv2d
schedule](https://github.com/apache/tvm/blob/36efa36f53f4ad9f302ece4208e5b8296c86c8bb/python/tvm/topi/arm_cpu/conv2d_gemm.py#L396),
but that `else` branch in the compute definition only corresponds to non-int8
conv2d for which we don't have any interleaved schedules yet, so it didn't have
any effect.
I must have included it by mistake in
https://github.com/apache/tvm/pull/16106.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]