Skip to content
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

Fix RuntimeError for moe on XPU: tensors found at least two devices #5519

Merged
merged 4 commits into from May 21, 2024

Conversation

shiyang-weng
Copy link
Contributor

There is following error on XPU while unit testing "DeepSpeed/tests/unit/moe/test_moe.py"
DeepSpeed/deepspeed/moe/sharded_moe.py line 223, in top1gating
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, xpu:0 and cpu!

Fix it by device conversion.

@shiyang-weng
Copy link
Contributor Author

Hi @loadams, could you help review this PR? This PR makes the syntax more reasonable and fix issue on XPU.

@tjruwase tjruwase added this pull request to the merge queue May 21, 2024
Merged via the queue into microsoft:master with commit 695d79e May 21, 2024
12 checks passed
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.

None yet

3 participants