Remove non-sense neura::cast ops#91
Conversation
|
LGTM. But can we try to figure out why this cast is added by which pass for what reason? One reason might be to guarantee the data/value range won't exceed the represent range, especially for a large tensor, however, the range is statically known; but MLIR can support dynamic shape, in which case it is unknown, so cast is reasonable. |
The The reason why I can remove non-sense And for other |
Thanks @ShangkunLi, however, if we want to support i64 or any type more than 32 bits, our RTL should be parameterized in 64-bit, which leads to waste for 32-bit (in most cases) then. Do you think we need a |
It is determined by the hardware and benchmarks. For the We can create such pass and leave the choice to the user. Filed an issue in #92. |
Remove non-sense neura::cast ops
Remove non-sense neura::cast ops
In this pr:
indextypes toi64index_to_i64ori64_to_indexcast operations