Skip to content

Commit 3beb700

Browse files
r-barnespytorchmergebot
authored andcommitted
c10::optional -> std::optional in a few places (pytorch#144340)
Test Plan: Sandcastle Pull Request resolved: pytorch#144340 Approved by: https://github.com/malfet
1 parent f4969c8 commit 3beb700

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/csrc/api/include/torch/nn/parallel/data_parallel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Tensor data_parallel(
275275
return module->forward(std::move(input)).to(*output_device);
276276
}
277277

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

0 commit comments

Comments
 (0)