-
-
Couldn't load subscription status.
- Fork 10.8k
[BugFix] Fix de-functionalization pass for rotary_embedding #23953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@ProExpertProg it seems like the existing test_functionalization does not run on master and is not tested on ci. Do you have any suggestions on how to verify this change? I've manually verified the graph for Qwen3-4B has been modified after the pass, and the test case's TinyLlama-1.1B-Chat-v1.0-FP8-e2e graph has also been modified the the same way as before. |
|
Could you add the test to CI? I'll take a closer look later |
|
The test is failing because "'LLMEngine' object has no attribute 'model_executor'" -- sorry, do you know what's the proper way to get the model from this config? |
|
@ProExpertProg I updated this PR, also fixed the test_functionalization test case in (#24376) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! Just a few nits for the unit test
734275f to
d2c827c
Compare
Signed-off-by: angelayi <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]> Signed-off-by: Tomer Asida <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]> Signed-off-by: Karan Goel <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]>
…ject#23953) Signed-off-by: angelayi <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
Purpose
Fixes #21101
Previously the fix_functionalization pass for rotary_embedding was written assuming the graph would have a specific pattern, where the rotary_embedding surrounded with slice scatters. This fails in the Qwen3-4B model where the graph no longer has this pattern. This PR adds a check for the slice_scatter pattern above, otherwise it will directly replace the auto_functionalized op with the op.
Test Plan
The issue runs successfully
Test Result