Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
sarus-llm / sarus_llm / liger_kernels.py
Size: Mime:
"""Centralize imports here in order to check if it is a mac or linux platform"""

import platform

try:
    from liger_kernel.ops.cross_entropy import LigerCrossEntropyFunction  # noqa:F401
    from liger_kernel.ops.swiglu import LigerSiLUMulFunction  # noqa:F401
    from liger_kernel.ops.rope import LigerRopeFunction  # noqa:F401
    from liger_kernel.ops.rms_norm import LigerRMSNormFunction  # noqa:F401
except ModuleNotFoundError as exception:
    if platform.system() == "Linux":
        raise exception
    else:
        # kernels not availables on other platforms
        pass