mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #272] [CLOSED] Add FP8 per-tensor scaling to cuBLASLt for fair comparison #334
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepGEMM#334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/272
Author: @yurekami
Created: 1/1/2026
Status: ❌ Closed
Base:
main← Head:fix/cublaslt-fp8-blockwise-scaling📝 Commits (1)
5753b21Add FP8 per-tensor scaling support to cuBLASLt for fair comparison📊 Changes
4 files changed (+59 additions, -5 deletions)
View changed files
📝
csrc/apis/gemm.hpp(+35 -0)📝
csrc/jit_kernels/impls/smxx_cublaslt.hpp(+18 -4)📝
deep_gemm/__init__.py(+2 -0)📝
tests/test_fp8.py(+4 -1)📄 Description
Summary
This PR addresses #199 where the cuBLASLt comparison in
test_fp8.pyuses tensorwise scaling (no scaling) while DeepGEMM uses blockwise scaling, making the performance comparison misleading.Changes
scale_aandscale_boptional parameters tocall_cublaslt_api()CUBLASLT_MATMUL_DESC_A_SCALE_POINTERandB_SCALE_POINTERwhen providedcublaslt_fp8_gemm_nt()function that accepts scale tensors__init__.pytest_fp8.pyto use per-tensor scaling (max of blockwise scales)How it works
The test now computes the maximum value from the blockwise scales and uses it as a single per-tensor scale for cuBLASLt:
This provides a fairer comparison where both implementations apply some form of FP8 dequantization.
Limitations
This is an approximation - cuBLASLt uses per-tensor scaling while DeepGEMM uses more precise blockwise (128x128) scaling. For a fully aligned comparison, cuBLASLt would need blockwise scaling support using
CUBLASLT_MATMUL_SCALE_MODE_BLOCK_2D(available in CUDA 12.0+). This could be a future enhancement.Test Plan
test_fp8.pyruns without errorsFixes #199
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.