Repository navigation
Conversation
If __torch_function__ was disabled, this TLS should propagate to other threads. Although I was thinking about #73942 when I did this, this doesn't actually help solve the problem, because when I disable __torch_function__ as part of the disabled __torch_function__ implementation, this is prior to when snapshotting happens (also snapshotting only happens for Python tensors anyway). I intend to add some more TLS to this struct soon, which is why it's a struct and not just a bool. Testing is not so easy to do because on CPU there isn't an easy way to get Python code running in another thread. Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 8389bee (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
albanD
left a comment
There was a problem hiding this comment.
CI looks like it is in a bad state but the change sounds good.
If __torch_function__ was disabled, this TLS should propagate to other threads. Although I was thinking about #73942 when I did this, this doesn't actually help solve the problem, because when I disable __torch_function__ as part of the disabled __torch_function__ implementation, this is prior to when snapshotting happens (also snapshotting only happens for Python tensors anyway). I intend to add some more TLS to this struct soon, which is why it's a struct and not just a bool. Testing is not so easy to do because on CPU there isn't an easy way to get Python code running in another thread. Signed-off-by: Edward Z. Yang <ezyangfb.com> [ghstack-poisoned]
If __torch_function__ was disabled, this TLS should propagate to other threads. Although I was thinking about #73942 when I did this, this doesn't actually help solve the problem, because when I disable __torch_function__ as part of the disabled __torch_function__ implementation, this is prior to when snapshotting happens (also snapshotting only happens for Python tensors anyway). I intend to add some more TLS to this struct soon, which is why it's a struct and not just a bool. Testing is not so easy to do because on CPU there isn't an easy way to get Python code running in another thread. Signed-off-by: Edward Z. Yang <ezyangfb.com> ghstack-source-id: 90ce891 Pull Request resolved: #75110
|
@pytorchbot merge this |
|
Hey @ezyang. |
Summary: If __torch_function__ was disabled, this TLS should propagate to other threads. Although I was thinking about #73942 when I did this, this doesn't actually help solve the problem, because when I disable __torch_function__ as part of the disabled __torch_function__ implementation, this is prior to when snapshotting happens (also snapshotting only happens for Python tensors anyway). I intend to add some more TLS to this struct soon, which is why it's a struct and not just a bool. Testing is not so easy to do because on CPU there isn't an easy way to get Python code running in another thread. Signed-off-by: Edward Z. Yang <ezyangfb.com> Pull Request resolved: #75110 Approved by: https://github.com/albanD Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/3f108a5cc132f5940553980c2b84947f7d9e1ed2 Reviewed By: atalman Differential Revision: D35359970 Pulled By: atalman fbshipit-source-id: 98b3910b05f79f5a4860f12959878d72c6ce6f56
Stack from ghstack (oldest at bottom):
If torch_function was disabled, this TLS should propagate to
other threads.
Although I was thinking about #73942
when I did this, this doesn't actually help solve the problem, because
when I disable torch_function as part of the disabled
torch_function implementation, this is prior to when snapshotting
happens (also snapshotting only happens for Python tensors anyway).
I intend to add some more TLS to this struct soon, which is why it's
a struct and not just a bool.
Testing is not so easy to do because on CPU there isn't an easy way
to get Python code running in another thread.
Signed-off-by: Edward Z. Yang [email protected]