We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ee3c561 + e00ca7b commit 55af4f9Copy full SHA for 55af4f9
fmoe/functions.py
@@ -60,6 +60,7 @@ def prepare_forward(gate, num_expert, world_size):
60
world_size: number of workers that hold different experts.
61
comm: the communicator of all workers in the expert-parallel group.
62
"""
63
+ assert(gate.is_contiguous())
64
pos, local_expert_count, global_expert_count = count_by_gate(gate,
65
num_expert, world_size)
66
with torch.no_grad():
0 commit comments