Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c10:optional -> std::optional in fbgemm #3223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading