Lunderberg commented on pull request #10582: URL: https://github.com/apache/tvm/pull/10582#issuecomment-1070975241
I'm overall in favor of keeping logic in the lowering stages, so that it wouldn't need to be repeated across multiple different codegens. I agree that the current state where a non-zero `elem_offset` can be silently ignored isn't a good state, but I don't think it is good to handle at the codegen level, because the semantics being handled aren't specific to any one codegen. What if we allow codegens to assume that the `elem_offset` is zero, but add a lowering pass that validates this assumption? Having such a check would also be a good place to define what other assumptions codegens are allowed to make about the TIR that they receive (e.g. no `Prefetch` nodes, no `builtin::tvm_thread_allreduce`, no warp scope memory), along error messages specifying which lowering pass was expected to have lowered those constructs. -- 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]
