Signed-off-by: kimi-no-na-wa <kimi-no-na-wa@users.noreply.github.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Co-authored-by: kimi-no-na-wa <kimi-no-na-wa@users.noreply.github.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
co-authored by
kimi-no-na-wa
Wentao Ye
parent
36fa72d2d0
commit
674b6d95d6
@@ -2,6 +2,7 @@
|
|||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
@@ -537,10 +538,11 @@ def _make_unquantized_flashinfer_test_layer(
|
|||||||
method.moe = moe_config
|
method.moe = moe_config
|
||||||
method.unquantized_backend = UnquantizedMoeBackend.FLASHINFER_TRTLLM
|
method.unquantized_backend = UnquantizedMoeBackend.FLASHINFER_TRTLLM
|
||||||
method.moe_kernel = None
|
method.moe_kernel = None
|
||||||
|
mock_kernel = MagicMock()
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
method,
|
method,
|
||||||
"_init_moe_kernel",
|
"_init_moe_kernel",
|
||||||
lambda _: setattr(method, "moe_kernel", object()),
|
lambda _: setattr(method, "moe_kernel", mock_kernel),
|
||||||
)
|
)
|
||||||
|
|
||||||
layer = torch.nn.Module()
|
layer = torch.nn.Module()
|
||||||
|
|||||||
Reference in New Issue
Block a user