Fix external_models import path and migrate model loading tests (#16458)

This commit is contained in:
Alison Shao
2026-01-08 23:43:49 -08:00
committed by GitHub
parent 9d4d57dbfa
commit e46f79431b
8 changed files with 24 additions and 21 deletions

View File

@@ -45,7 +45,7 @@ _DEEPGEMM_ON_H20 = get_bool_env_var("SGLANG_DEEPGEMM_ON_H20")
# TODO(kaixih@nvidia): ideally we should merge this logic into
# `fill_gateup_input_triton_kernel` to directly generate e8m0 scale.
@torch.compile
@torch.compile(disable=_is_hip or _is_npu)
def _cast_to_e8m0_with_rounding_up(x: torch.Tensor) -> torch.Tensor:
temp = x.to(torch.float32).view(torch.int32)
exp = torch.bitwise_right_shift(temp, 23)