Skip to content

[XPU] Add inference benchmark for XPU #1696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Egor-Krivov
Copy link
Contributor

Benchmark prints latency of token generation on XPU. It is useful for choosing between backends on XPU.

Current benchmark doesn't work on XPU due to:

python benchmarking/inference_benchmark.py  --device xpu --nf4
Benchmarking batch size: 1
Traceback (most recent call last):
  File "/home/jovyan/triton/bitsandbytes/benchmarking/inference_benchmark.py", line 122, in <module>
    backend_config = PyTorchConfig(
  File "<string>", line 37, in __init__
  File "/home/jovyan/triton/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/optimum_benchmark/backends/pytorch/config.py", line 55, in __post_init__
    super().__post_init__()
  File "/home/jovyan/triton/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/optimum_benchmark/backends/config.py", line 102, in __post_init__
    raise ValueError(f"`device` must be either `cuda`, `cpu`, `mps`, `xla` or `gpu`, but got {self.device}")
ValueError: `device` must be either `cuda`, `cpu`, `mps`, `xla` or `gpu`, but got xpu

@matthewdouglas matthewdouglas merged commit adc7fda into bitsandbytes-foundation:main Jul 8, 2025
2 checks passed
Copy link

github-actions bot commented Jul 8, 2025

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants