Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Relax] Remove name requirement from MergeCompositeFunctions
Prior to this commit, the `relax.transform.MergeCompositeFunctions` required the module to contain a single Relax function named `"main"`. Lack of this function would result in an error when `mod->GetGlobalVar("main")` was called. Presence of any other Relax function would cause an error, since they were not collected into the `CompositeGroupsBuilder`. This commit updates `MergeCompositeFunctions` to be indepedendent of the names of the Relax functions in an IRModule. The transform now updates all Relax functions that do not have the `attr::kPrimitive` or `attr::kCodegen` attributes. Closes #17210
- Loading branch information