Fix Qwen flash attention CUDA gating - #16453
johnstonconnor773-ops wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (3)Core ML/diffusion engine.⚙️ CodeRabbit configuration file Files:
IMPORTANT: Only comment on issues directly introduced by this PR's code changes.⚙️ CodeRabbit configuration file Files:
Documentation and README edits should be concise, factual, and tied to the changed behavior.📄 CodeRabbit inference engine (AGENTS.md) Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthrough
Priority: ➖ Normal Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Qwen text generation can launch comfy-kitchen's flash attention decode kernel on CUDA 12 PyTorch builds even though the CUDA backend is disabled for those builds, causing a driver/runtime error on the first decode step.
This change requires CUDA 13+ before selecting the fixed KV-cache flash decode path, preserving the regular KV-cache fallback for older builds. It also adds focused regression coverage for both unsupported and supported CUDA versions.
Tests:
python -m pytest tests-unit/comfy_test/test_llama_kv_cache.py -qFixes: #16449