[Mlir-commits] [mlir] [mlir] add tensor_static.extract/insert to take only static indices. (PR #110550)
Yi Zhang
llvmlistbot at llvm.org
Tue Oct 1 07:21:32 PDT 2024
cathyzhyi wrote:
@joker-eph @ubfx Thanks for the comments. Here are some more motivations behind this. We are experiencing inputs where there are O(40k) scalar constant operations whose only reason for existing is indexing. Its inefficient, its more difficult to test and cumbersome to write (using a little lazy cache per isolated from above context to avoid ending at O(400k) scalar constant operations that get CSE'd later). Its not special to indexing ops that one could capture constant values, but it is very wasteful for them (I forget, its 10x higher storage than just parameter).
We've also discussed and experienced other options like using mixed values for indices in this [PR](https://github.com/llvm/llvm-project/pull/104488) and [RFC](https://discourse.llvm.org/t/rfc-more-opfoldresult-and-mixed-indices-in-ops-that-deal-with-shaped-values/72510) but decide this is less change to the uniformity of the API.
https://github.com/llvm/llvm-project/pull/110550
More information about the Mlir-commits
mailing list