Update engine.py (#1596)

wall_clock_breakdown disable failed in moe layer due to incorrectly used a function as property
This commit is contained in:
Paige Wang
2021-11-30 03:14:09 +08:00
committed by GitHub
parent 7a132a9f4b
commit c3f1d82b07

View File

@ -1014,11 +1014,11 @@ class DeepSpeedEngine(Module):
for _, module in self.module.named_modules(): for _, module in self.module.named_modules():
if isinstance(module, TopKGate): if isinstance(module, TopKGate):
self.gate_modules.append(module) self.gate_modules.append(module)
if self.wall_clock_breakdown: if self.wall_clock_breakdown():
module.wall_clock_breakdown = True module.wall_clock_breakdown = True
if isinstance(module, MOELayer): if isinstance(module, MOELayer):
self.moe_layers.append(module) self.moe_layers.append(module)
if self.wall_clock_breakdown: if self.wall_clock_breakdown():
module.wall_clock_breakdown = True module.wall_clock_breakdown = True
if not self.pipeline_parallelism: if not self.pipeline_parallelism: