mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
c10::optional -> std::optional in a few places (#144340)
Test Plan: Sandcastle Pull Request resolved: https://github.com/pytorch/pytorch/pull/144340 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
f4969c8235
commit
3beb7006dd
@ -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()) {
|
||||
|
Reference in New Issue
Block a user