diff --git a/fbgemm_gpu/codegen/training/backward/embedding_backward_split_host_template.cpp b/fbgemm_gpu/codegen/training/backward/embedding_backward_split_host_template.cpp index 16a04c1d2..9628abb88 100644 --- a/fbgemm_gpu/codegen/training/backward/embedding_backward_split_host_template.cpp +++ b/fbgemm_gpu/codegen/training/backward/embedding_backward_split_host_template.cpp @@ -564,8 +564,8 @@ class {{ autograd_func }} : {%- if not nobag and dense and not vbe %} const Tensor& offsets, const int64_t pooling_mode, - const c10::optional& indice_weights, - const c10::optional& feature_requires_grad + const std::optional& indice_weights, + const std::optional& feature_requires_grad {%- elif not nobag %} const Tensor& offsets, const int64_t pooling_mode, @@ -610,9 +610,9 @@ class {{ autograd_func }} : {{ args.split_function_args | join(", ") }} {%- else %} {%- if vbe %} - const c10::optional& B_offsets, - const c10::optional& vbe_output_offsets_feature_rank, - const c10::optional& vbe_B_offsets_rank_per_feature, + const std::optional& B_offsets, + const std::optional& vbe_output_offsets_feature_rank, + const std::optional& vbe_B_offsets_rank_per_feature, const c10::SymInt max_B, const c10::SymInt max_B_feature_rank, const c10::SymInt vbe_output_size @@ -1025,7 +1025,7 @@ Tensor {{ bwd_mdesc }}_embedding_codegen_lookup_{{ optimizer }}_function( {%- endif %} const bool apply_global_weight_decay = false, {%- if ssd %} - const c10::optional& ssd_tensors = c10::nullopt, + const std::optional& ssd_tensors = c10::nullopt, {%- endif %} const double gwd_lower_bound = 0 {%- else %} diff --git a/fbgemm_gpu/codegen/training/pt2/embedding_split_host_pt2_autograd_template.cpp b/fbgemm_gpu/codegen/training/pt2/embedding_split_host_pt2_autograd_template.cpp index 3666de5b9..9c0eb320b 100644 --- a/fbgemm_gpu/codegen/training/pt2/embedding_split_host_pt2_autograd_template.cpp +++ b/fbgemm_gpu/codegen/training/pt2/embedding_split_host_pt2_autograd_template.cpp @@ -1005,7 +1005,7 @@ Tensor {{ bwd_mdesc }}_embedding_codegen_lookup_{{ optimizer }}_function_pt2( {%- endif %} const bool apply_global_weight_decay = false, {%- if ssd %} - const c10::optional& ssd_tensors = c10::nullopt, + const std::optional& ssd_tensors = c10::nullopt, {%- endif %} const double gwd_lower_bound = 0 ) { diff --git a/fbgemm_gpu/docs/src/nitpick.ignore b/fbgemm_gpu/docs/src/nitpick.ignore index 2bb503fc5..a8dcceda7 100644 --- a/fbgemm_gpu/docs/src/nitpick.ignore +++ b/fbgemm_gpu/docs/src/nitpick.ignore @@ -12,10 +12,10 @@ cpp:identifier at::Tensor cpp:identifier block_type_t cpp:identifier c10 cpp:identifier c10::Error -cpp:identifier c10::optional -cpp:identifier c10::optional -cpp:identifier c10::optional -cpp:identifier c10::optional +cpp:identifier std::optional +cpp:identifier std::optional +cpp:identifier std::optional +cpp:identifier std::optional cpp:identifier c10::SymInt cpp:identifier c10::SymIntArrayRef cpp:identifier int32_t