Skip to content

Fix XPU SDPA zero-head validation - #99

Open
laifenxiawucha wants to merge 1 commit into
mainfrom
fix/alignment-1969-xpu-sdpa-zero-heads
Open

laifenxiawucha wants to merge 1 commit into
mainfrom
fix/alignment-1969-xpu-sdpa-zero-heads

Conversation

@laifenxiawucha

Copy link
Copy Markdown
Owner

Reject zero key/value head counts before grouped-query modulo checks in shared SDPA eligibility and the XPU overrideable entry point. This converts a process-level SIGFPE into a normal validation error.

Tracker: https://github.com/intel-sandbox/torch-xpu-ops-exp/issues/1969

Test Plan:

  • lintrunner -a --take CLANGFORMAT,NEWLINE,PYFMT,RUFF,ATEN_CPU_GPU_AGNOSTIC -m origin/main
  • python3 -m py_compile test/test_transformers.py
  • git diff --check

Authored with assistance from OpenAI Codex.

Reject zero key/value head counts before grouped-query modulo checks in shared SDPA eligibility and the XPU overrideable entry point. This turns a process-level SIGFPE into a normal validation error.

Test Plan:
```
lintrunner -a --take CLANGFORMAT,NEWLINE,PYFMT,RUFF,ATEN_CPU_GPU_AGNOSTIC -m origin/main
python3 -m py_compile test/test_transformers.py
git diff --check
```

Authored with assistance from OpenAI Codex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant