This is actually also an issue with the std.constant verifier which isn’t supposed to allow ui32. This bug is open: https://bugs.llvm.org/show_bug.cgi?id=46222
In addition, I also posted the following on the other thread:
"For TF models coming into xla_hlo, it’s a common pattern in nearly every model to obtain the dimension size of a tensor as an unsigned int
and then use that as a divisor later. The divisor folds to an unsigned int constant. When lowering to std
, one could use diviu
, but there has to be a zero extension to i64 which is available for an i32 but not ui32 - so, are we missing a cast from ui32
to i32
and it’s not clear to me where it should live."