Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Mostly looks good to me. Some minor comments
mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp | ||
---|---|---|
176 | Better to move this create method after all the checks to avoid generating instructions for cases where failure is returned | |
201 | This casting is strange. You can just do (origElements + scale - 1) / scale | |
210 | Isn't this just origElements. Just use that instead of this. |
mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp | ||
---|---|---|
210 | Yes, the current assumption is vector.load/vector.transfer_read with an even number of elements, and it is just origElements. Not sure if there's a need to consider loading an odd number of elements in the real application. The current implementation will have error when loading an odd number of elements. |
[optional] you can also use llvm::divideCeil. (note that (A+B-1)/B is okay to me because it is common.)