Skip to content

[Hardware] Enable XPU Device on Intel GPU #651

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

liangan1
Copy link

@liangan1 liangan1 commented Feb 25, 2025

Introduction

Enable XPU device on Intel GPU.

Limitation

  • Marlin kernel is not supported on xpu.
  • XPU is not supported by flash_attn repo, So, only torch native backend is available for MLA.
  • cuda graph is used for CUDA while no sycl graph supported for XPU now.

Validation command:

python -m ktransformers.local_chat --model_path deepseek-ai/DeepSeek-V2-Lite-Chat --gguf_path ./DeepSeek-V2-Lite-Chat-GGUF --device xpu --optimize-config-path ktransformers/optimize/optimize_rules/DeepSeek-V2-Chat-XPU.yaml

Chat: how are you
As an AI, I don't have feelings or emotions, so I can't answer that question in a human-like way. However, I'm here to help you with any questions or information you need. How can I assist you today?

@liangan1 liangan1 marked this pull request as draft February 25, 2025 06:29
@liangan1 liangan1 marked this pull request as ready for review February 25, 2025 08:32
@liangan1 liangan1 changed the title [WIP] Enable XPU Path Enable XPU Path Feb 25, 2025
@liangan1 liangan1 changed the title Enable XPU Path [Hardware] Enable XPU Device on Intel GPU Feb 25, 2025
@liangan1
Copy link
Author

@Azure-Tang can u help to review this PR? I have validated the functionality on both XPU and CUDA device and the output is expected.

@Atream
Copy link
Contributor

Atream commented Mar 1, 2025

Thank you for your contribution.
We will merge after planning and testing a unified architecture that is compatible with various GPUs. Until then, please use your own branches first. Remember to frequently merge the main branch to stay synchronized with us and achieve better performance.

@aubreyli
Copy link
Collaborator

aubreyli commented Mar 6, 2025

I verified this PR and it works as expected on my Intel Arc-770 card.

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.

4 participants