Skip to content

Commit 55af4f9

Browse files
authored
Merge pull request #215 from laekov/gate-ctgus-tmp-fix
Temporary fix of incontiguous gate tensor by assertion
2 parents ee3c561 + e00ca7b commit 55af4f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fmoe/functions.py

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def prepare_forward(gate, num_expert, world_size):
6060
world_size: number of workers that hold different experts.
6161
comm: the communicator of all workers in the expert-parallel group.
6262
"""
63+
assert(gate.is_contiguous())
6364
pos, local_expert_count, global_expert_count = count_by_gate(gate,
6465
num_expert, world_size)
6566
with torch.no_grad():

0 commit comments

Comments
 (0)