Skip to content

Commit

Permalink
c10::nullopt -> std::nullopt (#1032)
Browse files Browse the repository at this point in the history
Summary:
X-link: pytorch/torchrec#2515

X-link: pytorch/executorch#6461

X-link: pytorch/audio#3848

X-link: pytorch/ao#1151

Pull Request resolved: #1032

Reviewed By: houseroad

Differential Revision: D64835967

fbshipit-source-id: 9f9f65335aaf5497680561027ef9314e4b36f8d9
  • Loading branch information
r-barnes authored and facebook-github-bot committed Oct 23, 2024
1 parent aef8f6e commit c7e0101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fx2ait/fx2ait/csrc/AITModelImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ std::vector<torch::Tensor> AITModelImpl::processOutputs(
output.unsafeGetTensorImpl()->set_sizes_contiguous(size);
}

if (floating_point_output_dtype_ != c10::nullopt &&
if (floating_point_output_dtype_ != std::nullopt &&
output.is_floating_point()) {
outputs.emplace_back(output.to(*floating_point_output_dtype_));
} else {
Expand Down Expand Up @@ -394,7 +394,7 @@ std::vector<AITData> AITModelImpl::processInputs(
auto input_name = input_names_[python_input_idx];
const auto ait_input_idx = input_name_to_index_.at(input_name);
auto& input = inputs[python_input_idx];
if (floating_point_input_dtype_ != c10::nullopt &&
if (floating_point_input_dtype_ != std::nullopt &&
input.is_floating_point()) {
// Need to keep input alive; cannot just stash result of to()
// call in a local!
Expand Down

0 comments on commit c7e0101

Please sign in to comment.