Skip to content

[mlir][spirv] Support index to spir-v dialect conversion #63713

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

Closed
kuhar opened this issue Jul 6, 2023 · 4 comments · Fixed by #68085 or #69790
Closed

[mlir][spirv] Support index to spir-v dialect conversion #63713

kuhar opened this issue Jul 6, 2023 · 4 comments · Fixed by #68085 or #69790
Assignees
Labels
enhancement Improving things as opposed to bug fixing, e.g. new or missing feature mlir:spirv

Comments

@kuhar
Copy link
Member

kuhar commented Jul 6, 2023

Right now MLIR seems to only support index to llvm conversion. We should also support it on the spirv lowering path.

There's already one related user request / bug report on Discourse: https://discourse.llvm.org/t/need-help-in-better-understanding-scf-to-spir-v-lowering/71639:

func.func @forward() {
    %c0 = arith.constant 0 : index
    %c32 = arith.constant 32 : index
    %c1 = arith.constant 1 : index
    scf.for %arg2 = %c0 to %c32 step %c1 {
        %1 = index.add %arg2, %arg2
    }
    return
}
@llvmbot
Copy link
Member

llvmbot commented Jul 6, 2023

@llvm/issue-subscribers-mlir-spirv

@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed missing-feature labels Aug 15, 2023
@inbelic
Copy link
Contributor

inbelic commented Aug 25, 2023

Hej, I was curious if this could be an appropriate good first issue? Having a helping hand from the IndexToLLVM implementation, I think I could be able to tackle it. Of course, only if kuhar or hsnbrg haven't claimed it :)

@kuhar
Copy link
Member Author

kuhar commented Aug 26, 2023

Hi @inbelic, sure thing! Feel free to reach out if you need some help with getting started or run into some issues. Happy to answer any questions, via github/email or a video call.

@inbelic
Copy link
Contributor

inbelic commented Aug 26, 2023

Awesome, will do!

inbelic added a commit to inbelic/llvm-project that referenced this issue Oct 20, 2023
Due to an issue when lowering from scf to spirv as there was no
conversion pass for index to spirv, we are motivated to add a
conversion pass from the Index dialect to the SPIR-V dialect.
Furthermore, we add the new conversion patterns to the scf-to-spirv
conversion.

Fixes llvm#63713
kuhar pushed a commit that referenced this issue Oct 20, 2023
Due to an issue when lowering from scf to spirv as there was no
conversion pass for index to spirv, we are motivated to add a conversion
pass from the Index dialect to the SPIR-V dialect. Furthermore, we add
the new conversion patterns to the scf-to-spirv conversion.

Fixes #63713
inbelic added a commit to inbelic/llvm-project that referenced this issue Oct 21, 2023
Due to an issue when lowering from scf to spirv as there was no
conversion pass for index to spirv, we are motivated to add a
conversion pass from the Index dialect to the SPIR-V dialect.
Furthermore, we add the new conversion patterns to the scf-to-spirv
conversion.

Fixes llvm#63713
kuhar pushed a commit that referenced this issue Oct 22, 2023
)

Due to an issue when lowering from scf to spirv as there was no
conversion pass for index to spirv, we are motivated to add a conversion
pass from the Index dialect to the SPIR-V dialect. Furthermore, we add
the new conversion patterns to the scf-to-spirv conversion.

Fixes #63713

---------

Co-authored-by: Jeremy Kun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving things as opposed to bug fixing, e.g. new or missing feature mlir:spirv
Projects
None yet
4 participants