We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d82b8f commit 403a520Copy full SHA for 403a520
1 file changed
megatron/core/distributed/finalize_model_grads.py
@@ -24,7 +24,16 @@
24
from megatron.plugin.platform import get_platform
25
26
cur_platform = get_platform()
27
-# FlagScale End
+
28
29
+try:
30
+ from megatron.plugin.utils import get_device_type_for_comm
31
+except ImportError:
32
33
+ def get_device_type_for_comm(group):
34
+ """Fallback: return current platform device name for communication."""
35
+ return cur_platform.device_name()
36
37
38
from .. import parallel_state
39
from ..transformer.moe.moe_utils import get_updated_expert_bias
0 commit comments