Rewrite THPUtils_PySequence_to_CUDAStreamList to return vector<optional<CUDAStream>>#13125
Closed
Rewrite THPUtils_PySequence_to_CUDAStreamList to return vector<optional<CUDAStream>>#13125
Conversation
Differential Revision: D10853224 Differential Version: 61658841
Differential Revision: D10853224 Differential Version: 61671204
This was referenced Oct 25, 2018
Differential Revision: D10853224 Differential Version: 61685989
Differential Revision: D10853224 Differential Version: 61786872
Contributor
Author
|
|
Differential Revision: D10853224 Differential Version: 61828004
Differential Revision: D10853224 Differential Version: 61911843
gchanan
approved these changes
Oct 29, 2018
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…al<CUDAStream>> (pytorch#13125) Summary: Pull Request resolved: pytorch#13125 Previously, it returned a vector of THCStream*, which we eventually turned into CUDAStream. No need to spatter the conversion code everywhere: just do it correctly to begin with. An important side effect of doing it this way is that we no longer pass nullptr to CUDAStream; instead, we create the default stream. I will rely on this in a later patch. Reviewed By: gchanan Differential Revision: D10853224 fbshipit-source-id: f6bd6594eba4626eb41a4a5e67fc64c9bbb46a1a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack:
:black_circle: #13125 Rewrite THPUtils_PySequence_to_CUDAStreamList to return vector<optional> 💛
:white_circle: #13021 Delete default constructor from CUDAStream. 💛
:white_circle: #13133 Add c10::Stream, make at::cuda::CUDAStream use it. 💛
:white_circle: #13232 Delete DeviceGuard(int64_t) constructor. 💛
Previously, it returned a vector of THCStream*, which we eventually turned
into CUDAStream. No need to spatter the conversion code everywhere: just
do it correctly to begin with. An important side effect of doing it this
way is that we no longer pass nullptr to CUDAStream; instead, we create
the default stream. I will rely on this in a later patch.
#commitClose
Differential Revision: D10853224