iree icon indicating copy to clipboard operation
iree copied to clipboard

Convert `*.rng_bit_set_generator` to use `i32` state bits before iree-util-demote-i64-to-i32

Open rsuderman opened this issue 2 years ago • 1 comments

We have had multiple failures due to iree-util-demote-i64-to-i32 being set by default. Before we execute this pass we should see about converting all cases of *.rng_bit_generator to use an i32 state. This is just a keystore so we can transition from a tensor<2xi64> to a tensor<4xi32> with the i64 behavior handle post the demotion.

rsuderman avatar Jun 01 '23 22:06 rsuderman

Narrowing when semantics allow is almost always good (less memory, less bandwidth, less register pressure, etc) so doing it where you have the semantics would be great! If something can be narrower then it should be narrower. The demotion pass is a big hammer that would be great to remove if we had the ideal types coming in on the inputs. Part of this is JAX/XLA/HLO/etc using i64 instead of index for lots of things such that users don't have control over what data types are used as a compilation option. We want people to be able to use JAX to build models for embedded systems, mobile/desktop (vulkan/metal/etc), and datacenter and that needs more nuance on typing than it currently exposes.

benvanik avatar Jun 01 '23 23:06 benvanik