Add 2 bit SSE GEMM microkernels#9752
Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
These updates enable 2-bit quantization support for both QS8-QC2W and QD8-F32-QC2W using SSSE3 instructions with MADD optimization.
1. src/qs8-gemm/MRx4c8-ssevnni.c.in:
* Added support for QS8_QC2, QC2_F32, and QC2_F16 datatypes.
* Introduced the _MM_SET1_EPI8 macro for consistent constant generation.
* Updated the ISA and instruction selection logic to support MADD variants (specifically _mm_dpbusd_epi32_madd_kzp2 for 2-bit variants).
* Updated the function signature to include the row_sum parameter for QD8 variants.
2. scripts/generate-qs8-gemm.sh:
* Added generation rules for SSSE3 with MADD=1 for both QS8_QC2 and QC2_F32 variants.
3. src/xnnpack/gemm.h:
* Added microkernel declarations for xnn_qd8_f32_qc2w_gemm_minmax_ukernel_*x4c8__ssse3_madd.
* Added microkernel declarations for xnn_qs8_qc2w_gemm_minmax_fp32_ukernel_*x4c8__ssse3_madd.
PiperOrigin-RevId: 887841831
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.
Add 2 bit SSE GEMM microkernels
These updates enable 2-bit quantization support for both QS8-QC2W and QD8-F32-QC2W using SSSE3 instructions with MADD optimization.