Add additional matching logic to MMGroupQuantRewriterPass#473
Add additional matching logic to MMGroupQuantRewriterPass#473Max191 wants to merge 2 commits intonod-ai:mainfrom
Conversation
stellaraccident
left a comment
There was a problem hiding this comment.
Aside from the test failures, I think I need to see the IR we are trying to match. But this seems like it might be tricky to keep working.
| if quantization == "int4" and not compile_to == "linalg": | ||
| from shark_turbine.transforms.quantization import mm_group_quant | ||
|
|
||
| print(param_set) |
The IR this is matching looks like this: This change basically just rewrites the parameter to the viewed type and elides the view ( This pass was already pretty specific to llama, especially since it was matching for a specific parameter name, so I figured that this should be okay for now. Maybe the view rewrite could be moved to its own pass, but this just seemed like the easiest path forward for me, and I like the idea of having fewer passes to call after exporting. |
This adds additional matching logic on
tensor.viewops required for using MMGroupQuantRewriterPass in the llama.turbine model (used here stellaraccident/llama.turbine#2).