OK, I think I know what I'm looking for and where they are. It's in 
`transform_layout.h` where there's a `LayoutRewriter` function for this 
purpose. Specifically, `memoizer`'s `Transform` function (defined in the same 
file) does the job:

```
  Expr Transform(Expr raw, const Layout& src_layout, const Layout& dst_layout) {
    if (src_layout.Equals(dst_layout)) {
      return raw;
    }

    std::tuple<const Object*, std::string, std::string> key =
        std::make_tuple<>(raw.get(), src_layout.name(), dst_layout.name());
    auto& memo = operator->()->memo;

    auto iter = memo.find(key);
    if (iter != memo.end()) {
      return iter->second;
    } else {
      Expr transform = TransformHelper(raw, src_layout, dst_layout);
      memo[key] = transform;
      return transform;
    }
  }
```





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/where-does-the-layout-transform-of-each-op-happen-during-alter-op-layout-pass/8380/6)
 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/3cc820d0303007633b54cb1326577cf43e42728631a81053cdf93d97d4621ecc).

Reply via email to