Skip to content
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

[luci] Support quantized inputs in ReplaceNonConstFCWithBatchMatMulPass #14487

Merged

Conversation

jinevening
Copy link
Contributor

This supports quantized inputs in ReplaceNonConstFCWithBatchMatMulPass.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong [email protected]

@jinevening jinevening force-pushed the luci/rep_non_cosnt_fc_with_bmm_quant branch from 7f69c66 to c8a3b5c Compare December 20, 2024 04:32
This supports quantized inputs in ReplaceNonConstFCWithBatchMatMulPass.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong <[email protected]>
@jinevening jinevening force-pushed the luci/rep_non_cosnt_fc_with_bmm_quant branch from c8a3b5c to 3046ab5 Compare December 20, 2024 05:09
Comment on lines -168 to -169
if (x->dtype() != loco::DataType::FLOAT32 || y->dtype() != loco::DataType::FLOAT32)
return false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes this restriction.

Now x and y can be quantized inputs. To support the case, we copy the qparam of the original FC into newly created nodes (BMM, Reshape).

@jinevening
Copy link
Contributor Author

To reviewers: This PR is for Llama3.2 quantization.

Copy link
Contributor

@mhs4670go mhs4670go left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jinevening jinevening merged commit 5754f4a into Samsung:master Dec 24, 2024
9 checks passed
@jinevening jinevening deleted the luci/rep_non_cosnt_fc_with_bmm_quant branch December 24, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants