Using CUDA 12.8 for Flash-Attn Build | Generated by AI
CUDA 12.8 is available at /usr/local/cuda-12.8/bin/nvcc. The default nvcc is CUDA 13.2 (that’s why the build picked 13.2). You need to explicitly use CUDA 12.8.
Correct install command
CUDA_HOME=/usr/local/cuda-12.8 \
PATH=/usr/local/cuda-12.8/bin:$PATH \
MAX_JOBS=16 \
TORCH_CUDA_ARCH_LIST="8.9" \
pip install flash-attn==2.8.4 --no-build-isolation
This will:
- ✅ Use CUDA 12.8 (matching PyTorch 2.10.0+cu128)
- ✅ Build only sm_89 kernels (RTX 4070) — ~10x faster compile
- ✅ Run 16 parallel jobs (vs 2 before)
- ✅ No ABI mismatch at runtime
Expected compile time: ~3–8 minutes instead of 20–60+ minutes.
