Skip to content

Fix compatibility issue with EmbeddingBag for IEN Publish #3181

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
30 changes: 24 additions & 6 deletions torchrec/distributed/embeddingbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,18 @@ def create_sharding_infos_by_sharding_device_group(
getattr(config, "num_embeddings_post_pruning", None)
# TODO: Need to check if attribute exists for BC
),
total_num_buckets=config.total_num_buckets,
use_virtual_table=config.use_virtual_table,
virtual_table_eviction_policy=config.virtual_table_eviction_policy,
total_num_buckets=(
getattr(config, "total_num_buckets", None)
# TODO: Need to check if attribute exists for BC
),
use_virtual_table=(
getattr(config, "use_virtual_table", None)
# TODO: Need to check if attribute exists for BC
),
virtual_table_eviction_policy=(
getattr(config, "virtual_table_eviction_policy", None)
# TODO: Need to check if attribute exists for BC
),
),
param_sharding=parameter_sharding,
param=param,
Expand Down Expand Up @@ -692,9 +701,18 @@ def create_grouped_sharding_infos(
getattr(config, "num_embeddings_post_pruning", None)
# TODO: Need to check if attribute exists for BC
),
total_num_buckets=config.total_num_buckets,
use_virtual_table=config.use_virtual_table,
virtual_table_eviction_policy=config.virtual_table_eviction_policy,
total_num_buckets=(
getattr(config, "total_num_buckets", None)
# TODO: Need to check if attribute exists for BC
),
use_virtual_table=(
getattr(config, "use_virtual_table", None)
# TODO: Need to check if attribute exists for BC
),
virtual_table_eviction_policy=(
getattr(config, "virtual_table_eviction_policy", None)
# TODO: Need to check if attribute exists for BC
),
),
param_sharding=parameter_sharding,
param=param,
Expand Down
Loading