Skip to content

Conversation

@elfiegg
Copy link

@elfiegg elfiegg commented Dec 16, 2025

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

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.

1 participant