enable torchao int4 on cpu side#69
Open
airMeng wants to merge 2 commits intomingfeima:cpu_opt_ww11from
Open
Conversation
1. brgemm impl: move brgemm out of inner loop 2. avx512 impl: move scaling out of inner loop 3. fp8_scaled_mm: change BLOCK_M to 128 to reduce access to B 4. cvt_fp8_bf16: ignore NaN handling ``` Comparing: True max_diff = 0.01562, asum = 10.562, bsum = 10.375 gemm_bf16(native): 89.812 us, gemm_fp8(opt): 124.585 us Comparing: True max_diff = 0.01562, asum = -32.500, bsum = -32.750 gemm_bf16(native): 83.805 us, gemm_fp8(opt): 125.586 us Comparing: True max_diff = 0.01562, asum = -35.750, bsum = -36.500 gemm_bf16(native): 89.579 us, gemm_fp8(opt): 151.284 us Comparing: True max_diff = 0.03125, asum = 4512.000, bsum = 4512.000 gemm_bf16(native): 262.104 us, gemm_fp8(opt): 615.823 us ``` ``` Comparing: True max_diff = 0.01562, asum = 10.562, bsum = 10.375 gemm_bf16(native): 86.403 us, gemm_fp8(opt): 95.792 us Comparing: True max_diff = 0.01562, asum = -32.500, bsum = -32.750 gemm_bf16(native): 84.178 us, gemm_fp8(opt): 100.573 us Comparing: True max_diff = 0.01562, asum = -35.750, bsum = -36.500 gemm_bf16(native): 90.365 us, gemm_fp8(opt): 114.198 us Comparing: True max_diff = 0.03125, asum = 4512.000, bsum = 4512.000 gemm_bf16(native): 267.053 us, gemm_fp8(opt): 404.231 us ```
2 tasks
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.
Motivation
Modifications
Checklist