[GH-ISSUE #1321] [Bug] Intel Xeon-SP + Intel ARC770 Chat 回答时候出错 #889

Closed
opened 2026-10-29 14:45:48 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @jianweimama on GitHub (May 19, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1321

Originally assigned to: @aubreyli, @qiyuxinlin on GitHub.

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed.
  • 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed.

Describe the bug

硬件平台: 1x Xeon-SP 6438 + 1x ARC770 + 512G DRAM
KT: 自己从源码(v0.3.1)成功编译, 参考: https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/xpu.md

Reproduction

测试步骤:

export SYCL_CACHE_PERSISTENT=1
export ONEAPI_DEVICE_SELECTOR=level_zero:0
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
python ktransformers/local_chat.py --model_path /DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --gguf_path /DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --optimize_config_path ktransformers/optimize/optimize_rules/xpu/DeepSeek-V3-Chat.yaml --cpu_infer 32 --device xpu --max_new_tokens 200

出现 Chat 界面:
loading model.layers.60.post_attention_layernorm.weight to xpu
loading model.norm.weight to xpu

Chat: introduce china history.

回答问题时候报错:

/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20992,0,0], local id: [512,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20993,0,0], local id: [513,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20994,0,0], local id: [514,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20995,0,0], local id: [515,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21001,0,0], local id: [521,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21002,0,0], local id: [522,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21004,0,0], local id: [524,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21007,0,0], local id: [527,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [4160,0,0], local id: [64,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [4161,0,0], local id: [65,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.
/pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [4162,0,0], local id: [66,0,0] Assertion idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds" failed.

Environment

硬件平台: 1x Xeon-SP 6438 + 1x ARC770 + 512G DRAM

Originally created by @jianweimama on GitHub (May 19, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1321 Originally assigned to: @aubreyli, @qiyuxinlin on GitHub. ### Checklist - [ ] 1. I have searched related issues but cannot get the expected help. - [ ] 2. The bug has not been fixed in the latest version. - [ ] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback. - [ ] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed. - [ ] 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed. ### Describe the bug 硬件平台: 1x Xeon-SP 6438 + 1x ARC770 + 512G DRAM KT: 自己从源码(v0.3.1)成功编译, 参考: https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/xpu.md ### Reproduction 测试步骤: export SYCL_CACHE_PERSISTENT=1 export ONEAPI_DEVICE_SELECTOR=level_zero:0 export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 python ktransformers/local_chat.py --model_path /DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --gguf_path /DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --optimize_config_path ktransformers/optimize/optimize_rules/xpu/DeepSeek-V3-Chat.yaml --cpu_infer 32 --device xpu --max_new_tokens 200 出现 Chat 界面: loading model.layers.60.post_attention_layernorm.weight to xpu loading model.norm.weight to xpu Chat: introduce china history. 回答问题时候报错: /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20992,0,0], local id: [512,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20993,0,0], local id: [513,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20994,0,0], local id: [514,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [20995,0,0], local id: [515,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21001,0,0], local id: [521,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21002,0,0], local id: [522,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21004,0,0], local id: [524,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [21007,0,0], local id: [527,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [4160,0,0], local id: [64,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [4161,0,0], local id: [65,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. /pytorch/third_party/torch-xpu-ops/src/ATen/native/xpu/sycl/ScatterGatherKernels.cpp:219: operator(): global id: [4162,0,0], local id: [66,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size_ && "index out of bounds"` failed. ### Environment 硬件平台: 1x Xeon-SP 6438 + 1x ARC770 + 512G DRAM
Author
Owner

@rnwang04 commented on GitHub (May 19, 2025):

Could you please try solution of issue2 in https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/xpu.md#troubleshooting to see if it helps ?

<!-- gh-comment-id:2890815207 --> @rnwang04 commented on GitHub (May 19, 2025): Could you please try solution of issue2 in https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/xpu.md#troubleshooting to see if it helps ?
Author
Owner

@jianweimama commented on GitHub (May 20, 2025):

多谢 @rnwang04 , 升级 intel-level-zero-gpu to 1.3.29735.27-914~22.04 后, 问题解决了.

<!-- gh-comment-id:2892799297 --> @jianweimama commented on GitHub (May 20, 2025): 多谢 @rnwang04 , 升级 intel-level-zero-gpu to 1.3.29735.27-914~22.04 后, 问题解决了.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#889
No description provided.