Skip to content

[mlir][vector][spirv] Support lowering multi-dimensional vector.from_elements to SPIR-V #155369

@yangtetris

Description

@yangtetris

Background

#151175 supports lowering multi-dimensional vector.from_elements operations by first unrolling them to 1-D from_elements operations and then applying the 1-D vector.from_elements lowering pattern.
#142944 introduces a new canonicalization pattern that compresses a series of vector.insert operations into a single vector.from_elements operation.

Issues

The above two PRs work well for the LLVM backend, but, as this discussion said, we are uncertain whether UnrollFromElements work correctly for the SPIR-V backend. I attempted to verify this myself, but the lack of SPIR-V knowledge prevents me from making meaningful progress.

I would greatly appreciate if SPIR-V experts could help check whether the current implementation works correctly. If it doesn't work, please help implement the necessary SPIR-V lowering support. Thanks a lot.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions