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

Unify arg names to align across kernels & acc & aten ops (Frontend Diff) #2340

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
8 changes: 4 additions & 4 deletions torchrec/distributed/quant_embedding_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ def __init__(
fused_params
)

index_remapping = [
index_remappings = [
table.pruning_indices_remapping for table in config.embedding_tables
]
if all(v is None for v in index_remapping):
index_remapping = None
if all(v is None for v in index_remappings):
index_remappings = None
self._runtime_device: torch.device = _get_runtime_device(device, config)
# 16 for CUDA, 1 for others like CPU and MTIA.
self._tbe_row_alignment: int = 16 if self._runtime_device.type == "cuda" else 1
Expand All @@ -245,7 +245,7 @@ def __init__(
],
device=device,
# pyre-ignore
index_remapping=index_remapping,
index_remappings=index_remappings,
pooling_mode=self._pooling,
feature_table_map=self._feature_table_map,
row_alignment=self._tbe_row_alignment,
Expand Down
2 changes: 1 addition & 1 deletion torchrec/quant/embedding_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def __init__(
row_alignment=row_alignment,
feature_table_map=feature_table_map,
# pyre-ignore
index_remapping=(
index_remappings=(
index_remappings if index_remappings_non_none_count > 0 else None
),
)
Expand Down
Loading