diff options
author | Kaiyu Shi <skyisno.1@gmail.com> | 2018-06-10 23:41:50 +0800 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2018-06-10 11:41:50 -0400 |
commit | 0169ac59365435ec1a773d0c2a818cfb95abd8e2 (patch) | |
tree | ba182cfe666f030735452e2d0c43649a8aea766c | |
parent | bf8689d0e5a5fe65da4175446973273aa5ba9fd3 (diff) | |
download | pytorch-0169ac59365435ec1a773d0c2a818cfb95abd8e2.tar.gz pytorch-0169ac59365435ec1a773d0c2a818cfb95abd8e2.tar.bz2 pytorch-0169ac59365435ec1a773d0c2a818cfb95abd8e2.zip |
Fix sample code for cuda stream (#8319)
-rw-r--r-- | docs/source/notes/cuda.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/source/notes/cuda.rst b/docs/source/notes/cuda.rst index bc7d08f7a3..63047bb11f 100644 --- a/docs/source/notes/cuda.rst +++ b/docs/source/notes/cuda.rst @@ -92,7 +92,7 @@ relative order, unless explicit synchronization functions (such as used. For example, the following code is incorrect:: cuda = torch.device('cuda') - s = torch.cuda.stream() # Create a new stream. + s = torch.cuda.Stream() # Create a new stream. A = torch.empty((100, 100), device=cuda).normal_(0.0, 1.0) with torch.cuda.stream(s): # sum() may start execution before normal_() finishes! |