mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3589
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/Niko1221/Strata/pull/1659
Author: @W1nge
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:codex/cublas-f16-algo-fallback📝 Commits (1)
7aa0201prefill gemm: run a failing FP16 shape on a fixed cuBLAS algorithm; the default one fails once a second device's context exists (issue #1650)📊 Changes
2 files changed (+29 additions, -0 deletions)
View changed files
📝
include/strata/prefill/gemm.hpp(+7 -0)📝
src/prefill/gemm.cu(+22 -0)📄 Description
Issue #1650: with more than one CUDA device initialized in the process, cuBLAS 12 answers the default
algorithm of a few FP16 GEMM shapes (
CUDA_R_16Foperands,CUBLAS_COMPUTE_32F) withCUBLAS_STATUS_INTERNAL_ERROR(status 14), and the request aborts withprefill gemm: cublasGemmEx f16: cuBLAS status 14.Only initializing the other device's context is enough to set the state that does it: on this host,
cudaSetDevice(1); cudaFree(0);on the P100 makes the default-algorithm FP16 GEMM fail on the 2080 Tibefore any work has run there. The failing shapes depend on K as well as N (K = 10240: N a multiple
of 8 is safe; K = 2560: N = 8..32 fails too), so a "small N" guard is not enough.
The fixed algorithms (ALGO2 and up) run through that state, but they are markedly slower for the wide
shapes. So a
Gemmmoves only the shapes that failed: it remembers their(N, K)((K << 32) | N, 32slots) and runs them on
CUBLAS_GEMM_ALGO2. The failing call is harmless and is paid once per shapeper process.
Measured on one Windows host (CUDA 12.4.131, RTX 2080 Ti sm_75 + Tesla P100 sm_60, driver 537.13), the
3-request fixture with
STRATA_BF16_TC=1(the abort is the stock engine, not a number):CUBLAS_GEMM_DEFAULT)For reference, the same fixture with the tensor cores off is 6333 ms / 7899 ms: this change keeps the
STRATA_BF16_TCwin and removes the abort.Tested: the stock engine aborts on
--short-read 0(40-token prompt,STRATA_BF16_TC=1,cublasGemmEx f16: cuBLAS status 14) and this change answers it ([3], valid, 3.1 s); the 2K / 5.1K /warm fixture and the daily lend/source regression all pass with the same answers.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.