-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] [Relax] InternalError: Check failed: (it_group != obj2group_.end()) is false #17210
Comments
@Lunderberg Could you help me analyze if this crash is a TVM bug? Thank you very much! |
Looks like it is a bug in TVM. The I don't have a fix at the moment, but it should be to have both the |
@Lunderberg Thank you for your deep analysis! |
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 apache#17210
@Cookiee235 Can you test with #17212 applied, to verify that it has resolved the issue? |
@Lunderberg Thank you for your quick fix. A new crash appears under the patch (#17212).
|
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 apache#17210
Ooh, that ended up being a real tricky one. There was an implicit assumption in my first implementation that every group would contain distinct objects. This is usually true, because each In the test case, both For now, I've added a fix to avoid over-collection of |
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 apache#17210
Actual behavior
Environment
Any environment details, such as: Operating System, TVM version, etc
Steps to reproduce
cc @Lunderberg @junrushao @tqchen
The text was updated successfully, but these errors were encountered: