-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[mlir] Dialect conversion passes try to rewrite top-level op #60491
Comments
@llvm/issue-subscribers-mlir |
I've tried to fix this, but give up for now. I'm unable to pinpoint where the crash occurs exactly. I suspect that the operation gets converted successfully, but is slightly wrong. Then, when converting the object to a textual representation, it fails. I suspect this because $ temp.mlir -no-implicit-module -convert-func-to-spirv crashes on $ temp.mlir -no-implicit-module -convert-func-to-spirv -debug crashes on What might be related is that {function_type = () -> (), sym_name = "foo", sym_visibility = "private"} in the {function_control = #spirv.function_control<None>, function_type = () -> (), sym_name = "foo", sym_visibility = "private"} in the default mode. |
Replacing the top-level op means the operation memory is freed, while other objects (e.g. the pass manager) are still referencing it. The point where it actually crashes isn't too important here, the issue is that the pass is replacing its current op in the first place. This violates the first restriction here:
(the This is an API issue with |
I was discussing this with River, we likely should add an entry point for |
Some dialect conversion passes will attempt to rewrite top-level ops, for example
convert-func-to-spirv
is op-agnostic and has a pattern that rewritesfunc.func -> spirv.func
. Sincemlir::applyPartialConversion
adds the parent op to the worklist, the pattern applies and we get a crash:The text was updated successfully, but these errors were encountered: