try: import triton HAS_TRITON = True except ImportError: HAS_TRITON = False print("Triton is not installed. Please install Triton to use Triton kernels.") # There may exist import error even if we have triton installed. if HAS_TRITON: from .context_attn_unpad import context_attention_unpadded from .flash_decoding import flash_decoding_attention from .flash_decoding_utils import FDIntermTensors from .rms_layernorm import rms_layernorm from .gptq_triton import gptq_fused_linear_triton from .kvcache_copy import copy_kv_to_blocked_cache from .no_pad_rotary_embedding import rotary_embedding from .softmax import softmax __all__ = [ "context_attention_unpadded", "flash_decoding_attention", "copy_kv_to_blocked_cache", "softmax", "rms_layernorm", "gptq_fused_linear_triton", "rotary_embedding", "FDIntermTensors", ]