Flash Attention install with Triton backend replaces preinstalled Triton no matter what.
Author: HimeLexieCreated Aug 16, 2026Updated Sep 27, 2026
Some context here, my GPU is an AMD Radeon AI PRO R9700. This GPU requires a specific build of Triton (currently, triton-3.7.0+git1bff1d9d.rocm7.13.0a20260416 from https://rocm.nightlies.amd.com/v2/gfx120X-all/) for use with ComfyUI. The problem is that Flash Attention quietly (atleast in the command stdout) pulls AITER as a git submodule in the setup.py, the default build of which will replace your preinstalled Triton with "3.7.1". I would recommend passing "AITER_USE_SYSTEM_TRITON=1" to the AITER build if Triton is detected as already being installed.
I believe the relevant code in setup.py is this: (although I may be wrong)
if ROCM_BACKEND == "triton":
if os.path.isdir(".git"):
subprocess.run(["git", "submodule", "update", "--init", "third_party/aiter"], check=True)
else:
assert os.path.isdir("third_party/aiter"), (
"third_party/aiter is missing, please use source distribution or git clone"
)
subprocess.run(
[sys.executable, "-m", "pip", "install", "--no-build-isolation", "third_party/aiter"],
check=True,
)Steps to recreate:
- Install any Triton version besides 3.7.1.
- Run the recommended command:
FLASH_ATTENTION_TRITON_AMD_ENABLE="TRUE" pip install --no-build-isolation . - Check the current Triton version. (
pip list | grep tritonor similar command)
Source: Dao-AILab/flash-attention