[Kernel][Helion][1/N] Add Helion kernel for rms_norm_per_block_quant (#36895)
Signed-off-by: Sean Chen <seachen@redhat.com> Co-authored-by: Yanan Cao <gmagogsfm@gmail.com>
This commit is contained in:
co-authored by
Yanan Cao
parent
bf5149b516
commit
ce3ef17bec
@@ -2,6 +2,8 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""Utility functions for Helion kernel management."""
|
||||
|
||||
import torch
|
||||
|
||||
from vllm.logger import init_logger
|
||||
from vllm.platforms import current_platform
|
||||
|
||||
@@ -78,3 +80,16 @@ def canonicalize_gpu_name(name: str) -> str:
|
||||
|
||||
def get_canonical_gpu_name(device_id: int | None = None) -> str:
|
||||
return canonicalize_gpu_name(get_gpu_name(device_id))
|
||||
|
||||
|
||||
def get_fp8_dtype() -> torch.dtype:
|
||||
return current_platform.fp8_dtype()
|
||||
|
||||
|
||||
def get_int8_min_max() -> tuple[int, int]:
|
||||
qtype_traits = torch.iinfo(torch.int8)
|
||||
return qtype_traits.min, qtype_traits.max
|
||||
|
||||
|
||||
def get_int8_min_scaling_factor() -> float:
|
||||
return torch.finfo(torch.float32).eps
|
||||
|
||||
Reference in New Issue
Block a user