[PR #360] [MERGED] [fix] handle empty tensor in per_token_cast_back #535

Closed
opened 2026-10-27 21:03:45 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/360
Author: @polarstormx
Created: 8/14/2025
Status: ✅ Merged
Merged: 8/14/2025
Merged by: @sphish

Base: main ← Head: avoid_empty


📝 Commits (1)

  • c9320fd [fix] handle empty tensor in per_token_cast_back

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 tests/utils.py (+2 -0)

📄 Description

In imbalanced token distribution, some ranks may receive empty tensors. The per_token_cast_back function would fail when trying to reshape an empty tensor with ambiguous dimensions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepEP/pull/360 **Author:** [@polarstormx](https://github.com/polarstormx) **Created:** 8/14/2025 **Status:** ✅ Merged **Merged:** 8/14/2025 **Merged by:** [@sphish](https://github.com/sphish) **Base:** `main` ← **Head:** `avoid_empty` --- ### 📝 Commits (1) - [`c9320fd`](https://github.com/deepseek-ai/DeepEP/commit/c9320fd35fa164fefc4c120a4000ef444973f67e) [fix] handle empty tensor in per_token_cast_back ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/utils.py` (+2 -0) </details> ### 📄 Description In imbalanced token distribution, some ranks may receive empty tensors. The `per_token_cast_back` function would fail when trying to reshape an empty tensor with ambiguous dimensions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:03:45 +00:00
Sign in to join this conversation.
No labels
pull-request
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
deepseek-ai/DeepEP#535
No description provided.