Skip to content

Incorrect CUDA_MINIMUM_COMPUTE_CAPABILITY check in fmha/flash3.py #1361

@klondenberg-bioptimus

Description

@klondenberg-bioptimus

Inside xformers flash3.py, there's an incorrect check of CUDA_MINIMUM_COMPUTE_CAPABILITY

See

def not_supported_reasons(cls, d: Inputs) -> List[str]:
reasons = super(FwOp, cls).not_supported_reasons(d)
device_type = d.query.device.type
if device_type == "cuda" and (torch.version.hip is None):
device_capability = torch.cuda.get_device_capability(d.device)
if device_capability > cls.CUDA_MINIMUM_COMPUTE_CAPABILITY:
reasons.append(
f"requires device with capability == {cls.CUDA_MINIMUM_COMPUTE_CAPABILITY} "
f"but your GPU has capability {device_capability} (too new)"
)
check_lastdim_alignment_stride1(reasons, "query", d.query, 8)

It should be a "smaller-than" comparison, but it's greater-than.

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