[Intel HPU] fix bug about RP 5138#5380
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes compatibility issues in the HPU (Intel Habana Processing Unit) model runner introduced by PR #5138. The changes update the fused_mlp_forward function signature to match the expected interface with proper parameter naming and type annotations.
Key Changes:
- Added missing
ForwardMetaimport - Updated
fused_mlp_forwardfunction signature to accepthidden_statesandforward_metaparameters instead of genericx
| hidden_states: paddle.Tensor, | ||
| forward_meta: Optional[ForwardMeta] = None, | ||
| ): | ||
| """ """ |
There was a problem hiding this comment.
Empty docstring should be removed or replaced with a meaningful description of the function's purpose, parameters, and return value.
| """ """ | |
| """ | |
| The forward function for the MLP (Multi-Layer Perceptron) layer. | |
| Args: | |
| hidden_states (paddle.Tensor): The input tensor to the MLP layer. | |
| forward_meta (Optional[ForwardMeta]): Optional metadata for the forward pass. | |
| Returns: | |
| paddle.Tensor: The output tensor after applying the MLP layer and (optionally) all-reduce. | |
| """ |
3465f50 to
83ef39c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5380 +/- ##
==========================================
Coverage ? 59.25%
==========================================
Files ? 325
Lines ? 40216
Branches ? 6087
==========================================
Hits ? 23828
Misses ? 14552
Partials ? 1836
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for your contribution! |
Motivation
#5138 breaks hpu function, fixed it
Modifications
hpu_model_runner.py
Usage or Command
no command usage change
Accuracy Tests
no impact on accuracy
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.conducted by local tests
releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.