[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.pyandtesting/python/module/test_bitblas_linear.pyfiles. The most important changes include the removal of theMatMulNTDequantizeEmitterclass, refactoring thedecode_funcmethod, and modifying the testing functions intest_bitblas_linear.py.Refactoring:
bitblas/ops/impl/matmul_dequantize_impl.py: Removed theMatMulNTDequantizeEmitterclass 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_funcmethod by removing the redundant assignment ofEtolast_output. Thelast_outputis now directly computed without the intermediateEvariable. [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_forwardfunction where thematmulfunction was called with incorrect parameters. Thematmulfunction now correctly uses all thepermuted_inputsexcept the last one.