Skip to content

Rewrite THPUtils_PySequence_to_CUDAStreamList to return vector<optional<CUDAStream>>#13125

Closed
ezyang wants to merge 6 commits intomasterfrom
export-D10853224
Closed

Rewrite THPUtils_PySequence_to_CUDAStreamList to return vector<optional<CUDAStream>>#13125
ezyang wants to merge 6 commits intomasterfrom
export-D10853224

Conversation

@ezyang
Copy link
Copy Markdown
Contributor

@ezyang ezyang commented Oct 25, 2018

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

Differential Revision: D10853224
Differential Version: 61658841
@ezyang ezyang requested a review from teng-li October 25, 2018 15:45
Differential Revision: D10853224
Differential Version: 61671204
Differential Revision: D10853224
Differential Version: 61685989
Differential Revision: D10853224
Differential Version: 61786872
@ezyang
Copy link
Copy Markdown
Contributor Author

ezyang commented Oct 26, 2018

Canceled V5 job, because no CUDA jobs in V4 failed. Nevermind, let's get some full signal here.

Differential Revision: D10853224
Differential Version: 61828004
Differential Revision: D10853224
Differential Version: 61911843
@ezyang ezyang added the merged label Jun 25, 2019
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
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.

2 participants