fix(dflash): auto-detect GPU arch to prevent sm_120a on consumer Blackwell#48
Open
easel wants to merge 1 commit intoLuce-Org:mainfrom
Open
fix(dflash): auto-detect GPU arch to prevent sm_120a on consumer Blackwell#48easel wants to merge 1 commit intoLuce-Org:mainfrom
easel wants to merge 1 commit intoLuce-Org:mainfrom
Conversation
3 tasks
2f759e7 to
653df28
Compare
This was referenced Apr 27, 2026
Contributor
|
@easel thanks for the contribution! Is the speed problem still present ? |
Contributor
Author
Yes. I think it's related to the workflow -- I'm putting together a small benchmark script to compare. |
ffdc796 to
e6dc0cd
Compare
e6dc0cd to
858b84b
Compare
Contributor
Author
|
This may not be necessary if expectation is to always build multi-arch binary. I ran into it because claude got excited about optimizing and ended up with a slightly incompatible build. |
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.
Problem
On CUDA 13.2+ with consumer Blackwell GPUs (for example, RTX 5090, SM 12.0), using an unset
CMAKE_CUDA_ARCHITECTURESornativecan resolve tosm_120ainstead ofsm_120, which can triggerCUDA_ERROR_ILLEGAL_INSTRUCTIONat runtime onconsumer hardware.
Fix (auto-detect only)
CMAKE_CUDA_ARCHITECTURESis unset ornative, runnvidia-smi --query-gpu=compute_cap --format=csv,noheader.12.0) and setCMAKE_CUDA_ARCHITECTURESexplicitly (for example120).dflash/CMakeLists.txtso it can be reviewed andmerged independently from consumer-specific workaround behavior.
Test plan
cmake -B build -S dflash/printsdflash27b: GPU compute_cap 12.0 → CUDA_ARCHITECTURES=120on Blackwell hardware.cmake --build buildsucceeds without CUDA-arch related compiler/runtime errors on a Blackwell consumer system.