[Dev] Fix a bug in general matmul ops with zero #79
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 pull request includes changes to the
bitblas/ops/impl/matmul_dequantize_impl.py
andtesting/python/module/test_bitblas_linear.py
files. The most important changes include the removal of theMatMulNTDequantizeEmitter
class, refactoring thedecode_func
method, and modifying the testing functions intest_bitblas_linear.py
.Refactoring:
bitblas/ops/impl/matmul_dequantize_impl.py
: Removed theMatMulNTDequantizeEmitter
class and its associated methods. This class was marked as needing refactoring and has been completely removed in this pull request.Code simplification:
bitblas/ops/impl/matmul_dequantize_impl.py
: Simplified thedecode_func
method by removing the redundant assignment ofE
tolast_output
. Thelast_output
is now directly computed without the intermediateE
variable. [1] [2] [3]Test modifications:
testing/python/module/test_bitblas_linear.py
: Refactored the testing functions to remove the use ofpytest.mark.parametrize
. The parameters are now directly passed to the testing functions. [1] [2] [3]Bug fixes:
testing/python/operators/test_general_matmul_ops.py
: Fixed a bug in thematmul_torch_forward
function where thematmul
function was called with incorrect parameters. Thematmul
function now correctly uses all thepermuted_inputs
except the last one.