Open Groverkss opened 3 days ago
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
test/
create fine-grained testing targets, so you can e.g. use make check-clang-ast
to only run Clang's AST tests.git clang-format HEAD~1
to format your changes.If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.
@llvm/issue-subscribers-good-first-issue
Author: Kunwar Grover (Groverkss)
Hi @Groverkss, do you mean a draft like this? https://github.com/llvm/llvm-project/pull/112937, to merge AnyVector and AnyVectorOfAnyRank type constraints?
A number of patterns in vector dialect lowerings predate 0-d vector support and side step from 0-d vectors by converting them to scalars and then broadcasting them. An example patch fixing this: https://github.com/llvm/llvm-project/pull/112907
Some example issues:
I have tested removing these, and the llvm ir generated from llvm.store with 0-d vectors is correct. (Good first issue)
vector.multi_reduction (https://mlir.llvm.org/docs/Dialects/Vector/#vectormulti_reduction-vectormultidimreductionop) requires the result to be a scalar when all dimensions are reduced. This causes additional corner case handling for scalars in vector.multi_reduction patterns. A better solution would be to allow 0-d vectors as result of vector.multi_reduction. (Not a good first issue, requires more understanding of vector dialect)
Merge AnyVector and AnyVectorOfAnyRank type constraints https://github.com/llvm/llvm-project/blob/721b796809eca6e67dcefe45a3498764dda3117d/mlir/include/mlir/IR/CommonTypeConstraints.td#L661 (good first issue)