Skip to content

Commit

Permalink
async --> non_blocking for Python 3.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Mar 7, 2019
1 parent bb947de commit a104f3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nn/parallel/data_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def async_copy_to(obj, dev, main_stream=None):
if torch.is_tensor(obj):
obj = Variable(obj)
if isinstance(obj, Variable):
v = obj.cuda(dev, async=True)
v = obj.cuda(dev, non_blocking=True)
if main_stream is not None:
v.data.record_stream(main_stream)
return v
Expand Down

0 comments on commit a104f3b

Please sign in to comment.