[AMD] Fix multimodal diffusion test crash on ROCm by falling back to SDPA (#22335)

This commit is contained in:
Bingxu Chen
2026-04-08 22:32:49 -07:00
committed by GitHub
parent 30b738d3a6
commit 6b96f8341d
2 changed files with 15 additions and 4 deletions
@@ -78,6 +78,8 @@ def _is_fa3_supported(device=None) -> bool:
# https://docs.nvidia.com/cuda/cuda-c-programming-guide/#shared-memory-8-x
# And for sgl-kernel right now, we can build fa3 on sm80/sm86/sm89/sm90a.
# That means if you use A100/A*0/L20/L40/L40s/4090 you can use fa3.
if torch.version.cuda is None:
return False
return (torch.version.cuda >= "12.3") and (
torch.cuda.get_device_capability(device)[0] == 9
or torch.cuda.get_device_capability(device)[0] == 8