Fix int8 GEMM by using dedicated BLAS Lt handle on ROCm/CUDA#2018
Open
zjin-lcf wants to merge 1 commit into
Open
Fix int8 GEMM by using dedicated BLAS Lt handle on ROCm/CUDA#2018zjin-lcf wants to merge 1 commit into
zjin-lcf wants to merge 1 commit into
Conversation
cigemmlt_* was casting the regular BLAS handle (rocblas on HIP) to hipBLASLt/cuBLASLt, causing OOB writes and 62 gfx950 test failures. Create m_lt_handle in Context and route igemmlt through it; add a gemmex fallback when hipBLASLt is unavailable. Skip CUDA-only library path tests on HIP and add int8 regression coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
(hip|cublas)Lthandle inContextinstead of casting the regular BLAS handlecigemmlt_32,cigemmlt_8, andcigemmlt_8_rowscalethroughm_lt_handleforigemmltigemmlt_32_gemmex_fallbackfor ROCm builds without hipBLASLt (NO_HIPBLASLT)BNB_CUDA_VERSIONevaluator tests on HIP; add int8 regression testsProblem
cigemmlt_*passedContext::m_handle(arocblas_handleon HIP) cast tohipblasLtHandle_t. hipBLASLt then ran with invalid state, causing OOB GPU writes, corrupted quant stats, and 62 test failures on gfx950 (50 Linear8bitLt, 10 int8 functional, 2 CUDA-only evaluator tests).Test plan
pytest tests/ -v --tb=short -n 4→ 3452 passed, 16 skipped, 32 xfailed, 0 failed (~96s)