Lunderberg commented on issue #17200: URL: https://github.com/apache/tvm/issues/17200#issuecomment-2253037564
Looks like each application of `LiftTransformParams` attempts to make a function named `"main_transform_params"`. This causes an error on the second application, because the names of each function need to be unique. I think it would be good to have `LiftTransformParams` be idempotent, to prevent this type of error from occurring. This would require two main changes: 1. When `LiftTransformParams` lifts out a new function, it would check whether a function with that same name already exists. If so, the two transformations would be composed together, producing a function that is equivalent to running `new_params = new_transform(old_transform(params))`. If `LiftTransformParams` is applied twice in a row, `new_transform` would be the identity function. This would also be useful when `LiftTransformParams` has been applied, but additional pre-processing steps have been generated by later optimizations. 2. `LiftTransformParams` would not remove `R.builtin.stop_lift_params`. This would instead be removed with the `FLowerBuiltin` attribute (once https://github.com/apache/tvm/pull/17145 lands). This would ensure that a second application of `LiftTransformParams` follows the same restrictions as the first `LiftTransformParams`. -- 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]
