Skip to content
Closed
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
7 changes: 4 additions & 3 deletions torchrec/distributed/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ def get_device_from_parameter_sharding(
if len(set(device_type_list)) == 1:
return device_type_list[0]
else:
assert (
ps.sharding_type == "row_wise"
), "Only row_wise sharding supports sharding across multiple device types for a table"
assert ps.sharding_type in [
ShardingType.ROW_WISE.value,
ShardingType.COLUMN_WISE.value,
], "Only row_wise or column_wise sharding supports sharding across multiple device types for a table"
return device_type_list


Expand Down
7 changes: 4 additions & 3 deletions torchrec/distributed/quant_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ def get_device_from_parameter_sharding(
if len(set(device_type_list)) == 1:
return device_type_list[0]
else:
assert (
ps.sharding_type == "row_wise"
), "Only row_wise sharding supports sharding across multiple device types for a table"
assert ps.sharding_type in [
ShardingType.ROW_WISE.value,
ShardingType.COLUMN_WISE.value,
], "Only row_wise or column_wise sharding supports sharding across multiple device types for a table"
return device_type_list


Expand Down
Loading