Skip to content

Issue with 50-Series Graphics Card Compatibility for xFormers #1342

Open

Description

@KATe-AGI

🐛 Bug

Hello, my environment is equipped with PyTorch 2.8 and CUDA 12.8. When I run pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu128 with my 50-series graphics card, xFormers can be compiled and installed successfully. However, xFormers does not work during actual training—the error message indicates that the issue is kernel architecture incompatibility. I suspect if this precompiled package is only intended for H-series graphics cards?

Activity

  1. sirus20x6 commented on Oct 7, 2025

    @sirus20x6

    also have this issue on rtx pro 6000

  2. daitisuki commented on Oct 14, 2025

    @daitisuki

    you can try this guy's idea I found,I solve this problem by it:
    It's because the build check in xformers incorrectly enables FA3 for Blackwell, while FA3 only supports GA100/sm80 and Hopper/sm90.

    The invalid argument is triggered by setting an unsupported shared memory size, I think due to limited shared memory size in customer cards (RTX Blackwell/sm120).

    I've found a PR #1262 resolving this issue, which hasn't been merged yet.

    For a temporary workaround, I changed line 19 in xformers/ops/fmha/dispatch.py, setting _USE_FLASH_ATTENTION_3 to False (changing the file in the site-packages directory is enough, no need to rebuild).

  3. guidenglong1984 commented on Nov 28, 2025

    @guidenglong1984

    you can try this guy's idea I found,I solve this problem by it: It's because the build check in xformers incorrectly enables FA3 for Blackwell, while FA3 only supports GA100/sm80 and Hopper/sm90.

    The invalid argument is triggered by setting an unsupported shared memory size, I think due to limited shared memory size in customer cards (RTX Blackwell/sm120).

    I've found a PR #1262 resolving this issue, which hasn't been merged yet.

    For a temporary workaround, I changed line 19 in xformers/ops/fmha/dispatch.py, setting _USE_FLASH_ATTENTION_3 to False (changing the file in the site-packages directory is enough, no need to rebuild).

    thanks,niubi!working on xformers 0.0.32 post2(torch2.8+cuda12.9+python3.12)

  4. riverrsea commented on Apr 25, 2026

    @riverrsea

    你可以试试我找到的这个人的方法,我就是用它来解决这个问题的: 这是因为 xformers 中的构建检查错误地为 Blackwell 启用了 FA3,而 FA3 只支持 GA100/sm80 和 Hopper/sm90。

    无效参数的触发原因是设置了不支持的共享内存大小,我认为这是因为客户显卡(RTX Blackwell/sm120)的共享内存大小有限。

    我找到了一个 PR #1262,它解决了这个问题,但尚未合并。

    作为临时解决方案,我修改了 xformers/ops/fmha/dispatch.py​​ 中的第 19 行,将 _USE_FLASH_ATTENTION_3 设置为 False(只需修改 site-packages 目录中的文件即可,无需重新构建)。

    我修改了该文件。但是仍然发生错误。错误如下:

    NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs:
         query       : shape=(10, 77, 8, 64) (torch.float32)
         key         : shape=(10, 77, 8, 64) (torch.float32)
         value       : shape=(10, 77, 8, 64) (torch.float32)
         attn_bias   : <class 'xformers.ops.fmha.attn_bias.LowerTriangularMask'>
         p           : 0.0
    `fa2F@2.5.7-pt` is not supported because:
        dtype=torch.float32 (supported: {torch.bfloat16, torch.float16})
    `cutlassF-pt` is not supported because:
        requires device with capability <= (9, 0) but your GPU has capability (12, 0) (too new)
    

    我正在使用 eva-clip。这是 eva-clip 的求注意力的实现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions