Skip to content

Commit

Permalink
Comment that data of THStorage may be NULL.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
  • Loading branch information
ezyang authored and soumith committed Jul 20, 2017
1 parent 6b69723 commit 4794230
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions torch/csrc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ One important case where this assumption is important is when tracking
the CUDA device a tensor is stored in: this information is stored
solely in the storage, so if a storage is NULL, we lose this information.

Although storage is never NULL, the data field of THStorage may be NULL. This
mostly occurs when we want to pre-allocate an output tensor struct, but then
have it be resized and filled with data by some operator: there's no point in
allocating data for it in this case!

## Files

### `Exceptions.h`
Expand Down

0 comments on commit 4794230

Please sign in to comment.