If you want to just simplify a single expression/stmt you can use the internal
API to do so.
Here is how simplify pass is defined:
```
Pass Simplify() {
auto pass_func = [](PrimFunc f, IRModule m, PassContext ctx) {
auto* n = f.CopyOnWrite();
arith::Analyzer analyzer;
n->body = arith::StmtSimplifier(&analyzer).Simplify(std::move(n->body));
return f;
};
return CreatePrimFuncPass(pass_func, 0, "tir.Simplify", {});
}
```
```
arith::Analyzer analyzer;
arith::StmtSimplifier(&analyzer).Simplify(stmt)
```
---
[Visit
Topic](https://discuss.tvm.ai/t/how-to-leverage-tvm-tir-transform-in-tvm-0-7/7780/3)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.tvm.ai/email/unsubscribe/53175646896ddef7cdeb9a18c1b87807e44b4fce907328c06010cecc3e1dc2f5).