-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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] Convert-spirv-to-llvm Pass trigger Segmentation fault in LLVMStructType verifier #59990
Comments
@llvm/issue-subscribers-mlir-spirv |
Could you take a look, @antiagainst? |
Looks like there was no updates since Jan. Pierre, can you take a look at this one please? Thanks! |
LLVMStructTypes could be emitted with some null elements. This caused a crash later in the LLVMDialect verifier. Now, properly check that all struct elements were successfully converted before passing them to the LLVMStructType ctor. See llvm#59990
I fixed the crash in #70005, now there is this error:
I'm not sure if the error should be happening or not. I haven't touched MLIR/SPIRV yet so I can't tell. |
cc @arsenm, Matt do you know who can help with the error mentioned by Pierre above? |
Not really, I haven't spent any time with MLIR cc @llvm/pr-subscribers-mlir-spirv |
Thanks for the fix in #70005; it LGTM! I think the above error is due to that we haven't supported runtime arrays with strides. Specifically here: https://github.com/llvm/llvm-project/blob/main/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp#L330. It's checking that the runtime array has no strides (= 0). Instead we should extend it to support natural strides of the element type for dense packed cases. For non-dense packed cases, we may need to convert the runtime array into an array of LLVM structs in order to handle the strides there. |
Closing as the issue is fixed. @antiagainst please open a new ticket if this is something that needs to be implemented (I don't think i am the best person to do it though) |
LLVMStructTypes could be emitted with some null elements. This caused a crash later in the LLVMDialect verifier. We now use `convertTypes` and check that all types were successfully converted before passing them to the `LLVMStructType` constructor. See #59990
LLVMStructTypes could be emitted with some null elements. This caused a crash later in the LLVMDialect verifier. We now use `convertTypes` and check that all types were successfully converted before passing them to the `LLVMStructType` constructor. See llvm#59990 Change-Id: I0f0ff1f8eb939bd760e5acb7e24017061a2eeac5
MLIR built at commit a0138390
Reproduced with:
mlir-opt --convert-spirv-to-llvm temp.mlir
temp.mlir
:trace:
The text was updated successfully, but these errors were encountered: