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: revert float literal changes in ir.Function and subgraph contexts
Python float/int literals passed to onnxscript ops become initializers
in the root graph. This breaks in two contexts:
1. ir.Function bodies: functions cannot reference outer-scope
initializers (unlike subgraphs which can). Affected:
- linear_attention.py (scale in LinearAttention function)
- packed_multi_head_attention.py (bias in function body)
- causal_conv.py (axis/width in CausalConvWithState function)
2. Component code that may run in subgraph or function contexts:
- minimax.py (_scaled_add in MoE expert dispatch)
- granitemoehybrid.py (residual multiplier in MoE+Mamba layers)
- _mamba_block.py (conv bias, time_step_min in Scan body)
- _gated_deltanet.py (conv bias)
Reverts these files to use op.Constant(value_float=...) which creates
inline Constant nodes that live in whatever graph context they are
built in.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: G Ramalingam <grama@microsoft.com>
0 commit comments