mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[GH-ISSUE #144] CUDA backend cannot build with sm_70 (V100) in arch list: ptxas ldmatrix/cvt.pack errors + missing flash.h submodule #46
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
Comfy-Org/comfy-kitchen#46
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?
Originally created by @Joevy-1112 on GitHub (Aug 30, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/144
CUDA backend cannot build with sm_70 (V100) in the arch list: ptxas errors on ldmatrix / cvt.pack + missing flash.h
Environment: Tesla V100 (sm_70), CUDA 12.8 toolkit (nvcc 12.8.61), Ubuntu 24.04, gcc 13.3.
Build command:
Symptom
24 of 27
.cufiles compile fine for sm_70 (includingrms_rope.cu,adaln.cu,turing_int4/int8.cu,convrot_w4a4.cu, allsol_attn*.cu), but the build hard-fails on 3 sources:1.
ops/awq_w4a16.cu— ptxas cannot assemble compute_70:ldmatrixis used directly in the file and via shared wrapperssage_attention/mma.cuh(ldmatrix_m8n8x2/x4/x4_trans) andops/svdquant_utils.cuh(ldmatrix_x4) — none of these asm blocks are guarded by__CUDA_ARCH__, so this is a compile-time hard failure, not a runtime stub.2.
sage_attention/sage_attn_launcher.cu— ptxas:cvt.packdoes not appear verbatim in the source — it is generated by the compiler from an intrinsic/packing macro on sm_72+, so it cannot be fixed by a simple grep-and-guard.3.
ops/flash_decode.cu— missing header (submodule-dependent):flash_decode.cuincludesflash.hwhich lives in thethird_party/flash-attentionsubmodule (csrc/flash_attn/src/flash.h). A shallow clone without--recurse-submodulesleaves it empty.What works on sm_70
rms_rope.cu/adaln.cucompile and run correctly on V100 after building the remaining 24 sources withCOMFY_CUDA_ARCHS="70;75-real;80-real".rms_rope_split_half0.093 ms/iter vs eager 0.612 ms/iter (~6.6x);rms_adaln0.139 ms/iter vs eager 0.240 ms/iter (~1.7x), 1000 iters, numerics finite.Question for maintainers
How would you prefer to support sm_70 builds?
__CUDA_ARCH__ >= 750/>= 720(with a real fallback or trap on sm_70 — silently compiling away the asm without a fallback would produce wrong results), orCUDA_SOURCESwhen the arch list contains70(documenting thatawq_w4a16/sage_attn/flash_decodeneed sm_72+/sm_75+), orI have a working local build (the 3 sources excluded + bindings stubbed) with rms_rope/adaln verified on V100. I can share the patch or prepare a PR in whichever direction you prefer. Happy to do the
__CUDA_ARCH__guard work onmma.cuh/svdquant_utils.cuhif you confirm that's the desired shape — just want to avoid guessing about kernel fallback semantics in shared attention headers.@Joevy-1112 commented on GitHub (Aug 30, 2026):
Reference implementation (working local build, V100-verified):
sm70-build.patch: CMakeLists (exclude the 3 sm_72+/sm_75+ sources) + dlpack_bindings.cpp (5 binding call sites stubbed to throw instead of linking against the excluded kernels)typing-compat.patch:list[int]->typing.List[int]in eager/na.py + eager/sol_attn.py (torch 2.5.1infer_schemarejects lowercase generics; unrelated to sm_70)gist: https://gist.github.com/Joevy-1112/4f7df791e25e4aa11baad295fbc82637
rms_rope_split_half / rms_adaln verified running on V100 with this build (6.6x / 1.7x vs eager). Happy to turn this into a PR in the shape you prefer.