[Core] Replace routing replay with device cache and async D2H pipeline (#39917)
Signed-off-by: Tomer Barnatan <tbarnatan@nvidia.com>
This commit is contained in:
@@ -246,6 +246,9 @@ class FusedMoE(PluggableLayer):
|
||||
not supported by the router (or the experts).
|
||||
"""
|
||||
|
||||
# Auto-incrementing layer ID for routing replay buffer binding.
|
||||
_next_moe_layer_id: int = 0
|
||||
|
||||
# --8<-- [end:fused_moe]
|
||||
|
||||
def __init__(
|
||||
@@ -290,6 +293,10 @@ class FusedMoE(PluggableLayer):
|
||||
):
|
||||
super().__init__()
|
||||
|
||||
# Assign unique layer ID for routing replay buffer binding.
|
||||
self.moe_layer_id = FusedMoE._next_moe_layer_id
|
||||
FusedMoE._next_moe_layer_id += 1
|
||||
|
||||
if params_dtype is None:
|
||||
params_dtype = torch.get_default_dtype()
|
||||
self.params_dtype = params_dtype
|
||||
|
||||
Reference in New Issue
Block a user