srkreddy1238 commented on code in PR #18657:
URL: https://github.com/apache/tvm/pull/18657#discussion_r2681791695
##########
include/tvm/tir/data_layout.h:
##########
@@ -249,20 +291,23 @@ class Layout : public ObjectRef {
*/
bool Contains(const LayoutAxis& axis) const {
if (!defined()) return false;
- for (const tir::IterVar var : operator->()->axes) {
- if (var->var->name_hint == axis.name()) {
- return true;
+ for (const tir::IterVar packed_var : operator->()->axes) {
+ auto iter_vars = UnpackIterVar(packed_var);
+ for (auto var : iter_vars) {
+ if (var->var->name_hint == axis.name()) {
+ return true;
+ }
}
}
return false;
}
- const LayoutAxis& operator[](int32_t i) const {
+ IterVar operator[](int32_t i) const {
Review Comment:
Not comfortable with this change though this feature works. Reworking on
avoiding this return of ```IterVar```.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]