[PR #522] Fix compatibility with torch2.10 #608

Open
opened 2026-10-27 21:04:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/522
Author: @elfiegg
Created: 12/16/2025
Status: 🔄 Open

Base: main ← Head: fix


📝 Commits (1)

  • e9f0b7c Compatibility of torch2.10

📊 Changes

1 file changed (+9 additions, -36 deletions)

View changed files

📝 csrc/deep_ep.cpp (+9 -36)

📄 Description

PyTorch 2.10 introduced stricter validation on tensor metadata operations. Specifically, when tensor.record_stream() is called, PyTorch 2.10+ internally calls set_stride() or similar metadata operations. If that tensor was created from .detach() upstream, PyTorch now strictly forbids these metadata modifications.

So only call record_stream() on tensors it creates and owns, not on input tensors passed by the caller


🔄 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/522 **Author:** [@elfiegg](https://github.com/elfiegg) **Created:** 12/16/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix` --- ### 📝 Commits (1) - [`e9f0b7c`](https://github.com/deepseek-ai/DeepEP/commit/e9f0b7ce224516b618ebe09fd45f1af21ab64d24) Compatibility of torch2.10 ### 📊 Changes **1 file changed** (+9 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `csrc/deep_ep.cpp` (+9 -36) </details> ### 📄 Description PyTorch 2.10 introduced stricter validation on tensor metadata operations. Specifically, when `tensor.record_stream()` is called, PyTorch 2.10+ internally calls `set_stride()` or similar metadata operations. If that tensor was created from `.detach()` upstream, PyTorch now strictly forbids these metadata modifications. So only call `record_stream()` on tensors it creates and owns, not on input tensors passed by the caller --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#608
No description provided.