This adds the capability to vectorize computations like a[i] = i.
This also generalizes the supported unary and binary ops and
adds a test for each to ensure actual SIMD code can result.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp | ||
---|---|---|
297 | I don't understand why we call this "TYPED" "UNAOP". Compared with "UNAOP" above, this macro generate vector op. Why don't we call them "vectorizable unary op"? | |
349 | Is this branch only for an invariant? | |
mlir/test/Dialect/SparseTensor/sparse_vector_index.mlir | ||
2 | Can we add this line if the check is generated by the script? // NOTE: Assertions have been autogenerated by utils/generate-test-checks.py |
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp | ||
---|---|---|
297 | I am open for a better name. Both macro's generate a vector op, but in this particular TYPED case, we also need to specify the destination type explicitly (besides the source vector type which is present in both cases). | |
349 | Also reduction. I added some comments on what happens. |
I don't understand why we call this "TYPED" "UNAOP". Compared with "UNAOP" above, this macro generate vector op. Why don't we call them "vectorizable unary op"?