tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Relax] Remove name requirement from MergeCompositeFunctions

Open Lunderberg opened this issue 1 year ago • 0 comments

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 https://github.com/apache/tvm/issues/17210

Lunderberg avatar Jul 29 '24 13:07 Lunderberg