vllm.kernels.oink_ops ¶
oink_rms_supported module-attribute ¶
oink_rms_supported = (
lambda x, weight, epsilon, variance_size=None: (
variance_size is None
and weight is not None
and dim() >= 2
and dtype == dtype
and is_contiguous()
and _can_view_as_2d(x)
and _is_oink_stride_compatible_2d(
view(-1, shape[-1])
)
)
)
Oink rms only supports 2d-like inputs with contiguous weight and no variance_size override.
_can_view_as_2d ¶
Return True if x.view(-1, x.shape[-1]) is viewable (no copy).
Source code in vllm/kernels/oink_ops.py
_is_oink_stride_compatible_2d ¶
Return True if x_2d meets Oink's pointer-path stride constraints.