-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[SR] Make sigrid_transforms fusion work on graph outputs #73091
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
Conversation
This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)! [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 97f88da (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. |
CI Flow Status⚛️ CI FlowRuleset - Version:
|
This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)! [ghstack-poisoned]
Pull Request resolved: #73091 This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 149529436 Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)!
This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)! [ghstack-poisoned]
Pull Request resolved: #73091 This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 149756644 Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)!
This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)! [ghstack-poisoned]
Pull Request resolved: #73091 This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 149896109 Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)!
This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)! [ghstack-poisoned]
This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)! [ghstack-poisoned]
Pull Request resolved: #73091 This is a re-work of D33669034; the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034. Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 150704445 Differential Revision: [D34290401](https://our.internmc.facebook.com/intern/diff/D34290401/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D34290401/)!
Summary: Pull Request resolved: #73091 This is a re-work of D33669034 (c76c491); the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034 (c76c491). Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 150704445 Reviewed By: d1jang Differential Revision: D34290401 fbshipit-source-id: 9573e6f08ee9e8282de961bf5f5cc8d32b81e601
Hey @mikeiovine. |
Summary: Pull Request resolved: pytorch/pytorch#73091 This is a re-work of D33669034 (pytorch/pytorch@c76c491); the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034 (pytorch/pytorch@c76c491). Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 150704445 Reviewed By: d1jang Differential Revision: D34290401 fbshipit-source-id: 9573e6f08ee9e8282de961bf5f5cc8d32b81e601 (cherry picked from commit 715b0077bd18cb144b9653f5f51057b9440252ad)
Summary: Pull Request resolved: pytorch/pytorch#73091 This is a re-work of D33669034 (pytorch/pytorch@c76c491); the change was backed out due to a data race causing crashes. The `output_types` vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe. The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and `use_offsets` are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing the `std::optional` sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034 (pytorch/pytorch@c76c491). Once the output types are determined, they can be moved into the op lambda and shared as read-only data. ghstack-source-id: 150704445 Reviewed By: d1jang Differential Revision: D34290401 fbshipit-source-id: 9573e6f08ee9e8282de961bf5f5cc8d32b81e601 (cherry picked from commit 715b0077bd18cb144b9653f5f51057b9440252ad)
Stack from ghstack (oldest at bottom):
This is a re-work of D33669034; the change was backed out due to a data race causing crashes.
The
output_types
vector was the culprit. It was previously lazily initialized on the first iteration. This was problematic because of static runtime's hidden assumption that ops are thread-safe.The re-work now only does the list unpack fusion if the output dtypes can be statically determined, e.g. if the sigrid transforms instance and
use_offsets
are both constant. Note that this is true for all the models we care about. Also, we were already partially making this assumption by dereferencing thestd::optional
sigrid transforms instance in most of the ops. Another advantage of this is that it makes the code simpler compared to D33669034.Once the output types are determined, they can be moved into the op lambda and shared as read-only data.
Differential Revision: D34290401
NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!