Files
vLLM/vllm/models/inkling/nvidia/ops/__init__.py
T
Roberto L. CastroLucas Wilkinsonmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
6c95a641e9 [2/N][Feat][Perf] Add new warmup infrastructure for JITs. Add predicate filtering for JIT warmup, and migrate Inkling FA4 (#49315)
Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
Signed-off-by: Roberto L. Castro <38211239+LopezCastroRoberto@users.noreply.github.com>
Co-authored-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2026-08-11 07:46:07 -04:00

46 lines
1.2 KiB
Python

# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Inkling kernels (NVIDIA).
``rmsnorm`` / ``sconv`` import eagerly. The SwiGLU kernels and the FA4
relative-attention wrapper are exposed lazily to keep this package's
import path lightweight.
"""
from typing import TYPE_CHECKING
from .norm import add_rmsnorm, rmsnorm
from .sconv import fused_sconv
_LAZY_EXPORTS = {
"silu_and_mul_triton": "silu_and_mul",
"sink_silu_mul_epilogue": "silu_and_mul",
"INKLING_FA4_REL_ATTENTION_KERNEL": "fa4_rel_attention",
}
if TYPE_CHECKING:
from .fa4_rel_attention import ( # noqa: F401
INKLING_FA4_REL_ATTENTION_KERNEL,
)
from .silu_and_mul import ( # noqa: F401
silu_and_mul_triton,
sink_silu_mul_epilogue,
)
__all__ = [
"add_rmsnorm",
"rmsnorm",
"fused_sconv",
*sorted(_LAZY_EXPORTS),
]
def __getattr__(name: str):
module = _LAZY_EXPORTS.get(name)
if module is not None:
import importlib
mod = importlib.import_module(f".{module}", __name__)
return getattr(mod, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")