If you're wondering why TVM/LLVM doesn't do a compile-time evaluation of this code (because weights are constants), the answer is because TIR doesn't treat weight data as constant. It expects you to pass in the weights at runtime, so the compiler can't do the weight transformation ahead-of-time.
I do agree this isn't ideal and especially for convolutions/GEMMs it means we get worse performance than we otherwise could. We have an RFC up at the moment which would add the ability to represent constant weights directly in TIR: https://github.com/apache/tvm-rfcs/pull/22. This could be the first step to enabling the behaviour you want, so feel free to take a look and comment. --- [Visit Topic](https://discuss.tvm.apache.org/t/questions-about-conv2d-weight-transform/10835/3) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/555409fb7114a8fd088dff8c32d0e63e8840ecc82ac328fac2dc5b04343ec672).