Repository navigation
Conversation
Checkpoint broadcast, PP flag reductions, the PLE export all-reduce, DSpark parameters, and the Hugging Face vision tower all used device='cuda' or torch.cuda.current_device(). On Ascend that targets a CUDA device that is not there, so export and model construction fail before any NPU kernel runs. A CPU-only process hits the same current_device() error. accelerator_device() returns the current NPU or CUDA device, otherwise CPU or MPS. CUDA still uses the current CUDA device, which is what device='cuda' already selected.
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.
Checkpoint broadcast, pipeline-parallel flag reductions, the PLE export all-reduce, DSpark parameter placement, and the Hugging Face vision tower used
device='cuda'ortorch.cuda.current_device(). On Ascend those calls target a CUDA device that is not present, so export and model construction fail before an NPU kernel runs. A CPU-only process raises the samecurrent_device()error. The chunked broadcast also treated any non-CUDA tensor as needing a copy to CUDA, which drops an NPU tensor onto the wrong device.accelerator_device()returns the current NPU device, otherwise the current CUDA device, otherwise CPU or MPS. CUDA still uses the current CUDA device, which is whatdevice='cuda'already selected.Checked with
python3 -m pytest tests/test_accelerator_device.py(2 passed) on a machine without CUDA: the helper returns CPU and does not calltorch.cuda.current_device().flake8is clean on the changed files.