[2/N] Change #include <c10/util/Optional.h> to #include <optional> (#130236)

Follows  #128301. The changes were made by grep and sed

Pull Request resolved: https://github.com/pytorch/pytorch/pull/130236
Approved by: https://github.com/ezyang
This commit is contained in:
cyy
2024-07-09 03:17:24 +00:00
committed by PyTorch MergeBot
parent d1e0653fad
commit 29861779ce
105 changed files with 361 additions and 356 deletions

View File

@ -653,7 +653,7 @@ struct NCCLTraceBuffer {
std::chrono::milliseconds timeout_ms,
bool isP2P) {
if (!enabled_) {
return c10::nullopt;
return std::nullopt;
}
auto traceback =
torch::CapturedTraceback::gather(true, true, capture_cpp_stack_);
@ -765,7 +765,7 @@ struct NCCLTraceBuffer {
bool can_compute_duration = false;
Event* startEvent = nullptr;
Event* endEvent = nullptr;
std::optional<float> duration = c10::nullopt;
std::optional<float> duration = std::nullopt;
std::unique_lock<std::mutex> guard(mutex_);