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
Support FP16 as intermediate results in graph computation
This commit is a demo aimed at using FP16 as the data type for
intermediate results in graph inference, reducing computation
and improving inference speed. Verification was conducted with
the CANN backend on Qwen2.5, Qwen3-MoE, and DeepSeek-Lite-V2,
showing performance improvements of 3%–10% depending on the
concurrency and model.
The main changes include modifying operators involved in graph
by replacing hardcoded FP32 data types with type inference based
on input, adding FP16 support for GET_ROWS, and casting t_embd
and t_logits back to FP32 at the end of inference.
In fact, this is only a very basic validation. For full FP16 support,
the following are still needed:
1. Modify all operators that currently hardcode FP32 to perform type
inference based on the data type.
2. Add FP16 support to all backend operators.
3. Extend test cases to include FP16 data types.
Co-authored-by: noemotiovon <[email protected]>
0 commit comments