Repository navigation
Conversation
…lel_size exceeds available devices Co-authored-by: GitHub Copilot Co-authored-by: hongbolv <33214277+hongbolv@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix segmentation fault in device initialization
Fix XPU segfault when tensor_parallel_size exceeds available devices
Mar 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting
tensor_parallel_sizehigher than available XPU devices causes a segfault (null deref in Level Zero driver) because the device count validation inParallelConfigonly checked CUDA platforms. XPU workers spawn on non-existent device IDs with no guard.device_count()classmethod to basePlatformclass (returns 0; already overridden on CUDA/ROCm/XPU subclasses)world_size > device_countvalidation and multi-nodennodes > 1check to cover XPUcuda_device_count_stateless()with genericcurrent_platform.device_count()in the validation pathWith this change, XPU users get a clear
ValueErrorinstead of a driver-level segfault:Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.sh/usr/bin/curl curl -LsSf REDACTED s/all_reduce_utils.py s/__�� s/custom_all_reduce.py s/cuda_communicator.py s/quick_all_reduce.py s/symm_mem.py s/cuda_wrapper.p--norc s/base_device_co--noprofile s/all2all.py s/sh�� s/ray_communicator.py s/cpu_communicator.py(dns block)If you need me to access, download, or install something from one of these locations, you can either:
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.