Skip to content

Commit

Permalink
c10:optional -> std::optional in fbgemm
Browse files Browse the repository at this point in the history
Reviewed By: jianyuh

Differential Revision: D63876537
  • Loading branch information
r-barnes authored and facebook-github-bot committed Oct 4, 2024
1 parent a0966e8 commit cf01f97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Tensor>& indice_weights,
const c10::optional<Tensor>& feature_requires_grad
const std::optional<Tensor>& indice_weights,
const std::optional<Tensor>& feature_requires_grad
{%- elif not nobag %}
const Tensor& offsets,
const int64_t pooling_mode,
Expand Down Expand Up @@ -610,9 +610,9 @@ class {{ autograd_func }} :
{{ args.split_function_args | join(", ") }}
{%- else %}
{%- if vbe %}
const c10::optional<Tensor>& B_offsets,
const c10::optional<Tensor>& vbe_output_offsets_feature_rank,
const c10::optional<Tensor>& vbe_B_offsets_rank_per_feature,
const std::optional<Tensor>& B_offsets,
const std::optional<Tensor>& vbe_output_offsets_feature_rank,
const std::optional<Tensor>& vbe_B_offsets_rank_per_feature,
const c10::SymInt max_B,
const c10::SymInt max_B_feature_rank,
const c10::SymInt vbe_output_size
Expand Down Expand Up @@ -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<at::TensorList>& ssd_tensors = c10::nullopt,
const std::optional<at::TensorList>& ssd_tensors = c10::nullopt,
{%- endif %}
const double gwd_lower_bound = 0
{%- else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<at::TensorList>& ssd_tensors = c10::nullopt,
const std::optional<at::TensorList>& ssd_tensors = c10::nullopt,
{%- endif %}
const double gwd_lower_bound = 0
) {
Expand Down
8 changes: 4 additions & 4 deletions fbgemm_gpu/docs/src/nitpick.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ cpp:identifier at::Tensor
cpp:identifier block_type_t
cpp:identifier c10
cpp:identifier c10::Error
cpp:identifier c10::optional<at::SymInt>
cpp:identifier c10::optional<at::Tensor>
cpp:identifier c10::optional<int64_t>
cpp:identifier c10::optional<Tensor>
cpp:identifier std::optional<at::SymInt>
cpp:identifier std::optional<at::Tensor>
cpp:identifier std::optional<int64_t>
cpp:identifier std::optional<Tensor>
cpp:identifier c10::SymInt
cpp:identifier c10::SymIntArrayRef
cpp:identifier int32_t
Expand Down

0 comments on commit cf01f97

Please sign in to comment.