Skip to content

Commit

Permalink
c10::optional -> std::optional in a few places (pytorch#144340)
Browse files Browse the repository at this point in the history
Test Plan: Sandcastle

Pull Request resolved: pytorch#144340
Approved by: https://github.com/malfet
  • Loading branch information
r-barnes authored and pytorchmergebot committed Jan 7, 2025
1 parent f4969c8 commit 3beb700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/csrc/api/include/torch/nn/parallel/data_parallel.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Tensor data_parallel(
return module->forward(std::move(input)).to(*output_device);
}

autograd::Scatter scatter(*devices, /*chunk_sizes=*/nullopt, dim);
autograd::Scatter scatter(*devices, /*chunk_sizes=*/std::nullopt, dim);
auto scattered_inputs = fmap<Tensor>(scatter.apply({std::move(input)}));
// Input tensor might not be big enough to scale across all available devices
if (scattered_inputs.size() < devices->size()) {
Expand Down

0 comments on commit 3beb700

Please sign in to comment.