docs: remove misleading FLASH_ATTENTION_SKIP_CUDA_BUILD recommendation - #17795
docs: remove misleading FLASH_ATTENTION_SKIP_CUDA_BUILD recommendation#17795like955 wants to merge 1 commit into
Conversation
|
I don’t think this is correct. I believe you need to set this if you’re on a system that does not have a GPU; otherwise, it includes the CUDAExtension and PyTorch will raise an error. I would have to test it though. |
|
Thank you for the feedback. I understand your concern about systems without a GPU. You're right that setting The Core Problem: On systems with a GPU, if a compatible pre-built wheel isn't available (e.g., due to a newer PyTorch version), setting this variable causes My Question:
If this is a required use case, perhaps we need a more nuanced approach in the docs:
I'm happy to adjust the PR based on your guidance. If the no-GPU install path is essential, we could update the warning to be more explicit about when to use the variable, rather than removing it entirely. |
|
We shipped a separate update (#18473). |
Summary
Description:
This PR updates the
flash-attninstallation guide to prevent users from accidentally creating broken environments.The Problem:
The documentation previously recommended setting
FLASH_ATTENTION_SKIP_CUDA_BUILD = "TRUE"to "ensure" a wheel installation. However, based on an analysis offlash-attn'ssetup.py:CachedWheelsCommand) automatically prefers downloading wheels before attempting any compilation, even without this variable.uvresolves to a version combination (e.g., latest Torch) for which no official wheel exists, setting this variable causessetup.pyto silently skip CUDA compilation and successfully install a "hollow" package containing only Python files. This leads to confusingImportError: No module named 'flash_attn_2_cuda'errors at runtime.Changes:
[tool.uv.extra-build-variables]from the examplepyproject.toml.Related Issue:
Fixes #17794