From 47edbf95a9069003522521ff769830cfd872f068 Mon Sep 17 00:00:00 2001 From: Lirui Luo <77096730+liruiluo@users.noreply.github.com> Date: Tue, 24 Mar 2026 03:22:52 +0800 Subject: [PATCH] Clarify `FLASH_ATTENTION_SKIP_CUDA_BUILD ` guidance for `flash-attn` installs (#18473) ## Summary - replace the current `FLASH_ATTENTION_SKIP_CUDA_BUILD` wording with a more accurate description - explain that the variable disables local CUDA compilation instead of guaranteeing a compatible wheel - recommend pinning to a known-supported combination when relying on published wheels Addresses #17794. --------- Co-authored-by: Charlie Marsh --- docs/concepts/projects/config.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/concepts/projects/config.md b/docs/concepts/projects/config.md index bc76eb8b7..1cb270947 100644 --- a/docs/concepts/projects/config.md +++ b/docs/concepts/projects/config.md @@ -296,11 +296,14 @@ flash-attn = { FLASH_ATTENTION_SKIP_CUDA_BUILD = "TRUE" } !!! note - The `FLASH_ATTENTION_SKIP_CUDA_BUILD` environment variable ensures that `flash-attn` is installed - from a compatible, pre-built wheel, rather than attempting to build it from source, which requires - access to the CUDA development toolkit. If the CUDA toolkit is not available, the environment variable - can be omitted, and `flash-attn` will be installed from a pre-built wheel if one is available for the - current platform, Python version, and PyTorch version. + The `FLASH_ATTENTION_SKIP_CUDA_BUILD` environment variable enables `flash-attn` to be + resolved from a pre-built wheel, rather than attempting to build it from source, which + requires access to the CUDA development toolkit. + + If the CUDA toolkit is available during resolution, we recommend omitting the + `FLASH_ATTENTION_SKIP_CUDA_BUILD` variable, as setting `FLASH_ATTENTION_SKIP_CUDA_BUILD` + to `TRUE` can lead to an incompatible install if no compatible pre-built wheel is available + for the target PyTorch version, GPU version, and platform. Similarly, [`deep_gemm`](https://github.com/deepseek-ai/DeepGEMM) follows the same pattern: