[TIR] Use constructor for new PrimFunc in TransformLayout#16832
Conversation
slyubomirsky
left a comment
There was a problem hiding this comment.
Good to see safer interfaces and checks for consistency.
|
CI failure is for |
Using the constructor applies all initialization steps and error-checking, where using `CopyOnWrite()` does not. This function is used as part of the legalization of `relax.op.layout_tranform`, which relies on the annotations produced in the `PrimFunc` constructor.
c53b046 to
6312499
Compare
|
Rebased this PR onto main as #16837 has now landed. |
|
In the future, I'm wondering if the We could have |
Using the constructor applies all initialization steps and error-checking, where using
CopyOnWrite()does not. This function is used as part of the legalization ofrelax.op.layout_tranform, which relies on the annotations produced in thePrimFuncconstructor.