eirenevp commented on code in PR #17091:
URL: https://github.com/apache/tvm/pull/17091#discussion_r1639798350
##########
python/tvm/topi/arm_cpu/dense_alter_op.py:
##########
@@ -82,6 +83,31 @@ def _alter_dense(attrs, inputs, tinfos, out_type):
False,
transpose_b,
)
+ elif topi_impl == "dense_gemm.arm_cpu":
+ # Pre-compute transposed weights and convert to a matmul
+ assert isinstance(
+ inputs[1], relay.Constant
+ ), "dense_gemm.arm_cpu requires weights be a Relay Constant"
+
+ weight_dtype = tinfos[1].dtype
+ weight_data = inputs[1].data.numpy()
+ interleaved = weight_data.transpose()
+ encoded_weight = relay.const(interleaved, weight_dtype)
Review Comment:
I think that's a valid recommendation, probably it will also save time,
probably we do the same for the sme case, @lhutton1 ?
--
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]