Support true on-policy (#12058)
This commit is contained in:
@@ -6,6 +6,7 @@ import torch
|
||||
import torch.nn.functional as F
|
||||
from utils import GeluAndMul, SiluAndMul, precision
|
||||
|
||||
from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
torch.manual_seed(1234)
|
||||
@@ -17,6 +18,8 @@ class TestActivation(CustomTestCase):
|
||||
dtype = [torch.float16, torch.bfloat16]
|
||||
|
||||
def _silu_and_mul_test(self, m, n, dtype):
|
||||
set_global_server_args_for_scheduler(ServerArgs(model_path="dummy"))
|
||||
|
||||
x = torch.randn([m, n], dtype=dtype)
|
||||
|
||||
out = torch.ops.sgl_kernel.silu_and_mul_cpu(x)
|
||||
|
||||
@@ -20,6 +20,7 @@ from utils import (
|
||||
torch_w8a8_per_column_moe,
|
||||
)
|
||||
|
||||
from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
torch.manual_seed(1234)
|
||||
@@ -149,6 +150,8 @@ class TestSharedExpert(CustomTestCase):
|
||||
self._int8_shared_expert(*params)
|
||||
|
||||
def _fp8_shared_expert(self, M, N, K, routed_scaling_factor):
|
||||
set_global_server_args_for_scheduler(ServerArgs(model_path="dummy"))
|
||||
|
||||
dtype = torch.bfloat16
|
||||
prepack = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user