supports HPU double dequantization#8
Closed
rsshaik1 wants to merge 11 commits into
Closed
Conversation
* fix 4bit XPU dequant 4bit Signed-off-by: jiqing-feng <[email protected]> * fix default value Signed-off-by: jiqing-feng <[email protected]> * fix ipex linear set Signed-off-by: jiqing-feng <[email protected]> * fix ipex linear set to false when calling state dict Signed-off-by: jiqing-feng <[email protected]> * fix Int8Param device patch Signed-off-by: jiqing-feng <[email protected]> --------- Signed-off-by: jiqing-feng <[email protected]>
* fix xpu to cpu Signed-off-by: jiqing-feng <[email protected]> * fix xpu cpu data device Signed-off-by: jiqing-feng <[email protected]> --------- Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
* fix intel cpu/xpu warning Signed-off-by: jiqing-feng <[email protected]> * fix error log Signed-off-by: jiqing-feng <[email protected]> * fix lib Signed-off-by: jiqing-feng <[email protected]> * rm return Nonr Signed-off-by: jiqing-feng <[email protected]> * error log only without ipex Signed-off-by: jiqing-feng <[email protected]> * fix import eerror Signed-off-by: jiqing-feng <[email protected]> * fix format Signed-off-by: jiqing-feng <[email protected]> --------- Signed-off-by: jiqing-feng <[email protected]>
* enable xpu 8bit optim * add deqaunt_blockwise * dequantize_blockwise * add bakcend synchronize * refine code * ipex dep * ipex dep too * ipex version check --------- Co-authored-by: jiqing-feng <[email protected]>
Authored by: Chetan Kumar Verma <[email protected]> Co-authored-by: Ruheena Suhani Shaik <[email protected]> Co-authored-by: Bhargav Eede <[email protected]> Co-authored-by: Vivek Goel <[email protected]> Co-authored-by: Ruheena Suhani Shaik <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
Signed-off-by: jiqing-feng <[email protected]>
rsshaik1
force-pushed
the
double_quant
branch
2 times, most recently
from
May 5, 2025 12:44
b862ecc to
a35e7e1
Compare
vivekgoe
reviewed
May 6, 2025
| ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, Optional[torch.Tensor]]: | ||
| assert_on_hpu([A, col_stats, row_stats, out_col, out_row]) | ||
| return double_quant_impl(A, col_stats, row_stats, out_col, out_row, threshold) | ||
| assert_on_hpu([A, col_stats, row_stats, out_col, out_row]) |
There was a problem hiding this comment.
I think we are not using this function anywhere on HPU. Please check and if that is the case lets add an assert.
| ): | ||
| assert quant_state is not None | ||
| if A.device.type in ("cpu", "xpu") and A.requires_grad == False: | ||
| if A.device.type in ("cpu", "xpu", "hpu") and A.requires_grad == False: |
There was a problem hiding this comment.
Let's do this in a different way. Remove "hpu" check from here, add a check such that we do not enter elif part for "hpu", then we will always go to else case.
After making this change if there is no path to get to gemv_4bit for HPU, remove the content of that function and add assert there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates the support for double dequantization on HPU.