Skip to content

Commit

Permalink
Update on "Multiprocessing support for NT"
Browse files Browse the repository at this point in the history
Fixes #110161

Allows NTs to be used in DataLoaders with `num_workers > 1`.

[ghstack-poisoned]
  • Loading branch information
jbschlosser committed Oct 10, 2023
2 parents 3939e2f + da2fd0e commit a514685
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions tools/autograd/gen_python_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@
"fill.Scalar", # only used by the functionalization pass
"lift.*",
"normal_functional", # only used by the functionalization pas
"_nested_view_from_buffer_copy",
"_nested_view_from_buffer_copy_out",
"nbytes",
"itemsize",
]
Expand Down
2 changes: 1 addition & 1 deletion torch/multiprocessing/reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def rebuild_nested_tensor(
sizes = rebuild_sizes_func(*rebuild_sizes_args)
strides = rebuild_strides_func(*rebuild_strides_args)
offsets = rebuild_offsets_func(*rebuild_offsets_args)
return torch._nested_view_from_buffer(buffer, sizes, strides, offsets)
return torch._nested_view_from_buffer_copy(buffer, sizes, strides, offsets)


def reduce_nested_tensor(nt):
Expand Down

0 comments on commit a514685

Please sign in to comment.