You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(arange): preserve static output shape for float-dtype arange with integer bounds (#25)
* _aten_to_core: fix arange lowering to preserve static shape for float dtypes
Cast range_ operands to si32 instead of the output dtype, so the compiler
can infer a static element count from constant int bounds. Cast the result
to the requested dtype afterward. Previously casting operands to float
caused range_ to return tensor<?xT> even for compile-time constants,
breaking composite signatures that expected a static dimension.
* _aten_to_core: fix arange lowering — use si32 only for integer operands
Float operands (e.g. arange(0.5, 5.0, 0.5)) must not be cast to si32 as
that truncates the values. Only apply the integer-path optimisation when
start has an integer element type; fall back to target_type for float
operands where a dynamic shape is correct anyway.
0 commit comments