intel / intel/torch-xpu-ops

FA4 backend is not supported on XPU

Open Beginner friendly
#5,274 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
113
Forks
129
Avg merge
5d 9h
Merged PRs (30d)
112

Description

### 🐛 Describe the bug

test/nn/attention/test_fa4.py currently only instantiates CUDA device tests. We want to enable XPU test collection for this file so that the coverage matrix reflects XPU. However, FA4 itself is currently CUDA-specific and is not supported by the XPU backend.

The FA4 tests depend on CUDA-only capability checks and the `flash_attn.cute.interface` package:

```
def _fa4_dependencies_available() -> bool:
if not torch.cuda.is_available():
return False
major, _ = torch.cuda.get_device_capability(torch.cuda.current_device())
if major not in (9, 10):
return False

importlib.import_module("flash_attn.cute.interface")

```

### Versions

Pytorch 2.14

Contributor guide

Open the contributing guide

Research direction

Start with test/nn/attention/test_fa4.py, examining how device tests are instantiated and how _fa4_dependencies_available gates collection. Run the file's test collection with an XPU environment; the work is done when XPU appears in the coverage matrix without attempting the CUDA-only FA4 path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.