-
Notifications
You must be signed in to change notification settings - Fork 52
[Dev] Refactor the weight transformation to support upcoming stage3 transform #130
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
Merged
Conversation
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
…ability and maintainability
…d maintainability
…d maintainability
…d maintainability
…d maintainability
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.
PR #110 #114 enabling warp memory dequantization through Ladder Transfrom Stage3. However, such a transformation is 32bits level and make it hard to apply when the compressed bits are 2bit or 1bit. We should put the transformation before the weight compression.
This pull request introduced a new transform pipeline. which use the tir version of weight compress ref to pr #126 instead of cpu numpy simulated version.
This pull request includes several changes to the
bitblasmodule, focusing on refactoring and enhancing functionality. The most important changes involve the removal of thematmulandmatmul_dequantizemodules, the introduction of a deprecation decorator, and updates to various matrix operations.Refactoring and Removal:
matmulandmatmul_dequantizemodules frombitblas/ops/__init__.pyandbitblas/ops/matmul.py. This includes all associated classes and functions. ([[1]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-b4614d98b88a14674bc57a6c3e018791f7585b8310cff91f9bb672d82ccc7f8cL4-R4),[[2]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-f5fc0fd9c3e7bf9bc75de88c0ff9f60fe03a9a6db36d3a6a88ac81107fc47d8fL1-L276))New Features:
deprecateddecorator inbitblas/__init__.pyto mark functions as deprecated and emit warnings when they are used. ([bitblas/__init__.pyR93-R114](https://github.com/microsoft/BitBLAS/pull/130/files#diff-c2248c838997d60356d36c7ad50e42b7bfcc09238719cc55cccb6b87e48472e7R93-R114))Matrix Operations Enhancements:
QuantCompressandQuantCompressConfigtobitblas/ops/general_matmul/__init__.pyand integrated them into thedispatch_tirand_assign_weight_compressmethods. ([[1]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edR16),[[2]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edR296))transform_weightmethod inbitblas/ops/general_matmul/__init__.pyto handle weight compression and transformation more efficiently. ([[1]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edL455-L458),[[2]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-74fe5dd2824cb03a0fb2b0a913a2fc5caeb9c08e5368c318cd32b3af7e6f52edL467-R492))forwardandretrieve_output_shapemethods tobitblas/ops/ladder_permutate/__init__.pyandbitblas/ops/lop3_permutate/__init__.pyto enhance tensor operations. ([[1]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-240200715f9a3998fc8f27b583c31a1c2679ed5e7a941c41a7a1b21df23a9abdR61-R77),[[2]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-0f5a4f22da4cc57a720a7a5eb160ff863316113eb51d4c447e332b4ab2bb5114L45-R61))Code Cleanup:
[[1]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-c2248c838997d60356d36c7ad50e42b7bfcc09238719cc55cccb6b87e48472e7L42-R45),[[2]](https://github.com/microsoft/BitBLAS/pull/130/files#diff-240200715f9a3998fc8f27b583c31a1c2679ed5e7a941c41a7a1b21df23a9abdR8))These changes collectively aim to streamline the codebase, improve functionality, and prepare for future updates.