[all-commits] [llvm/llvm-project] 6867e4: [mlir][spirv] Implement vector type legalization f...
Angel Zhang via All-commits
all-commits at lists.llvm.org
Wed Jul 17 10:09:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6867e49fc80c8468f9a5a8376ce7d3b89fd4fb51
https://github.com/llvm/llvm-project/commit/6867e49fc80c8468f9a5a8376ce7d3b89fd4fb51
Author: Angel Zhang <angel.zhang at amd.com>
Date: 2024-07-17 (Wed, 17 Jul 2024)
Changed paths:
M mlir/include/mlir/Conversion/Passes.td
M mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h
M mlir/lib/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.cpp
M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
M mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
M mlir/test/Conversion/ConvertToSPIRV/arith.mlir
M mlir/test/Conversion/ConvertToSPIRV/combined.mlir
A mlir/test/Conversion/ConvertToSPIRV/func-signature-vector-unroll.mlir
M mlir/test/Conversion/ConvertToSPIRV/index.mlir
M mlir/test/Conversion/ConvertToSPIRV/scf.mlir
M mlir/test/Conversion/ConvertToSPIRV/simple.mlir
M mlir/test/Conversion/ConvertToSPIRV/ub.mlir
M mlir/test/Conversion/ConvertToSPIRV/vector.mlir
M mlir/test/lib/Conversion/CMakeLists.txt
A mlir/test/lib/Conversion/ConvertToSPIRV/CMakeLists.txt
A mlir/test/lib/Conversion/ConvertToSPIRV/TestSPIRVFuncSignatureConversion.cpp
M mlir/tools/mlir-opt/CMakeLists.txt
M mlir/tools/mlir-opt/mlir-opt.cpp
M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
M utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
Log Message:
-----------
[mlir][spirv] Implement vector type legalization for function signatures (#98337)
### Description
This PR implements a minimal version of function signature conversion to
unroll vectors into 1D and with a size supported by SPIR-V (2, 3 or 4
depending on the original dimension). This PR also includes new unit
tests that only check for function signature conversion.
### Future Plans
- Check for capabilities that support vectors of size 8 or 16.
- Set up `OneToNTypeConversion` and `DialectConversion` to replace the
current implementation that uses `GreedyPatternRewriteDriver`.
- Introduce other vector unrolling patterns to cancel out the
`vector.insert_strided_slice` and `vector.extract_strided_slice` ops and
fully legalize the vector types in the function body.
- Handle `func::CallOp` and declarations.
- Restructure the code in `SPIRVConversion.cpp`.
- Create test passes for testing sets of patterns in isolation.
- Optimize the way original shape is splitted into target shapes, e.g.
`vector<5xi32>` can be splitted into `vector<4xi32>` and
`vector<1xi32>`.
---------
Co-authored-by: Jakub Kuderski <kubakuderski at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list