Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aiter/ops/chunk_gated_delta_rule_fwd_h.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from torch import Tensor

from ..jit.core import compile_ops
from .triton._triton_kernels.gated_delta_rule.utils.prefill_metadata import (
from .triton._triton_kernels.gated_delta_net.utils.prefill_metadata import (
GatedDeltaRulePrefillMetadata,
build_gated_delta_rule_prefill_metadata,
)
Expand Down Expand Up @@ -297,7 +297,7 @@ def chunk_gated_delta_rule_fwd_h_hip_fn(
)

if is_varlen:
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
prepare_chunk_offsets,
prepare_rebased_cu_seqlens,
)
Expand Down
2 changes: 1 addition & 1 deletion aiter/ops/flydsl/linear_attention_prefill_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from aiter.jit.core import AITER_CONFIGS

from ..triton._triton_kernels.gated_delta_rule.utils import (
from ..triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
build_gated_delta_rule_prefill_metadata,
prepare_chunk_offsets,
Comment thread
Boss2002n marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
prepare_chunk_indices,
)
from aiter.ops.triton._triton_kernels.chunk_delta_attn.utils.l2norm import l2norm_fwd
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_delta_h import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_delta_h import (
chunk_gated_delta_rule_fwd_h,
)

Expand Down Expand Up @@ -218,7 +218,7 @@ def chunk_delta_attn_fwd(
lower_bound=lower_bound,
)
else:
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
chunk_local_cumsum,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
For training with gradients, please use the flash-linear-attention library.
"""

from aiter.ops.triton._triton_kernels.gated_delta_rule import gated_delta_rule_utils
from aiter.ops.triton._triton_kernels.gated_delta_rule.decode.fused_recurrent import (
from aiter.ops.triton._triton_kernels.gated_delta_net import gated_delta_rule_utils
from aiter.ops.triton._triton_kernels.gated_delta_net.decode.fused_recurrent import (
_fused_recurrent_gated_delta_rule_fwd_kernel,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk import (
chunk_gated_delta_rule_fwd,
chunk_gated_delta_rule_fwd_opt,
chunk_gated_delta_rule_fwd_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_delta_h import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_delta_h import (
chunk_gated_delta_rule_fwd_h,
chunk_gated_delta_rule_fwd_h_opt,
chunk_gated_delta_rule_fwd_h_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_o import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_o import (
chunk_fwd_o,
chunk_fwd_o_opt,
chunk_fwd_o_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_cumsum_kkt import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_cumsum_kkt import (
fused_chunk_local_cumsum_scaled_dot_kkt_fwd,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_solve_tril_recompute import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_solve_tril_recompute import (
fused_solve_tril_recompute_w_u,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
This module provides optimized Triton kernels for decode/inference operations.
"""

from aiter.ops.triton._triton_kernels.gated_delta_rule.decode.fused_rearrange_sigmoid_gdr import (
from aiter.ops.triton._triton_kernels.gated_delta_net.decode.fused_rearrange_sigmoid_gdr import (
fused_rearrange_sigmoid_gated_delta_rule_update_kernel,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.decode.fused_recurrent import (
from aiter.ops.triton._triton_kernels.gated_delta_net.decode.fused_recurrent import (
_fused_recurrent_gated_delta_rule_fwd_kernel,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.decode.fused_sigmoid_gating_recurrent import (
from aiter.ops.triton._triton_kernels.gated_delta_net.decode.fused_sigmoid_gating_recurrent import (
fused_sigmoid_gating_delta_rule_update,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
autotune_cache_kwargs,
input_guard,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@
This module provides optimized Triton kernels for prefill/training operations.
"""

from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk import (
chunk_gated_delta_rule_fwd,
chunk_gated_delta_rule_fwd_opt,
chunk_gated_delta_rule_fwd_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_delta_h import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_delta_h import (
chunk_gated_delta_rule_fwd_h,
chunk_gated_delta_rule_fwd_h_opt,
chunk_gated_delta_rule_fwd_h_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_o import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_o import (
chunk_fwd_o,
chunk_fwd_o_opt,
chunk_fwd_o_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_cumsum_kkt import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_cumsum_kkt import (
fused_chunk_local_cumsum_scaled_dot_kkt_fwd,
fused_cumsum_kkt,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_gdn_gating_prefill import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_gdn_gating_prefill import (
fused_gdn_gating_and_sigmoid,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_solve_tril_recompute import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_solve_tril_recompute import (
fused_solve_tril_recompute_w_u,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@

import torch

from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_delta_h import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_delta_h import (
chunk_gated_delta_rule_fwd_h,
chunk_gated_delta_rule_fwd_h_opt,
chunk_gated_delta_rule_fwd_h_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.chunk_o import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.chunk_o import (
chunk_fwd_o,
chunk_fwd_o_opt,
chunk_fwd_o_opt_vk,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_cumsum_kkt import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_cumsum_kkt import (
fused_chunk_local_cumsum_scaled_dot_kkt_fwd,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.prefill.fused_solve_tril_recompute import (
from aiter.ops.triton._triton_kernels.gated_delta_net.prefill.fused_solve_tril_recompute import (
fused_solve_tril_recompute_w_u,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
build_gated_delta_rule_prefill_metadata,
chunk_local_cumsum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_AMD,
IS_NVIDIA_HOPPER,
RCP_LN2,
autotune_cache_kwargs,
check_shared_mem,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
prepare_chunk_indices,
prepare_chunk_offsets,
prepare_rebased_cu_seqlens,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.op import exp
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.op import exp
from aiter.ops.triton.utils.tuned_config_utils import autotune_configs

NUM_WARPS = [2, 4] if IS_NVIDIA_HOPPER else [2, 4, 8, 16]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_NVIDIA_HOPPER,
autotune_cache_kwargs,
check_shared_mem,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
prepare_chunk_indices,
prepare_rebased_cu_seqlens,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.op import exp
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.op import exp
from aiter.ops.triton.utils.tuned_config_utils import autotune_configs

BKV_LIST = [64, 128] if check_shared_mem() else [32, 64]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_AMD,
RCP_LN2,
autotune_cache_kwargs,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
prepare_chunk_indices,
prepare_rebased_cu_seqlens,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.op import exp
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.op import exp
from aiter.ops.triton.utils.tuned_config_utils import autotune_configs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_AMD,
autotune_cache_kwargs,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
prepare_chunk_indices,
prepare_rebased_cu_seqlens,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.op import exp
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.solve_tril import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.op import exp
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.solve_tril import (
FLA_TRIL_PRECISION,
solve_tril,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
# Copyright (C) 2024-2026, Advanced Micro Devices, Inc. All rights reserved.
# Adapted from flash-linear-attention: Copyright (c) 2023-2025, Songlin Yang, Yu Zhang

from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.cumsum import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.cumsum import (
chunk_local_cumsum,
chunk_local_cumsum_scalar,
chunk_local_cumsum_vector,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.index import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.index import (
prepare_chunk_indices,
prepare_chunk_offsets,
prepare_num_chunks,
prepare_rebased_cu_seqlens,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.l2norm import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.l2norm import (
l2norm_bwd,
l2norm_fwd,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.prefill_metadata import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.prefill_metadata import (
GatedDeltaRulePrefillMetadata,
build_gated_delta_rule_prefill_metadata,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.solve_tril import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.solve_tril import (
solve_tril,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.wy_representation import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.wy_representation import (
chunk_scaled_dot_kkt_fwd,
recompute_w_u_fwd,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
autotune_cache_kwargs,
check_shared_mem,
input_guard,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.index import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.index import (
prepare_chunk_indices,
)
from aiter.ops.triton.utils.tuned_config_utils import autotune_configs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import torch.nn.functional as F
import triton

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
tensor_cache,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import triton.language as tl
from torch import nn

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_AMD,
autotune_cache_kwargs,
input_guard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import triton.language as tl
import triton.language.extra.libdevice as tldevice

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_GATHER_SUPPORTED,
IS_TMA_SUPPORTED,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
IS_TMA_SUPPORTED,
autotune_cache_kwargs,
input_guard,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.index import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.index import (
prepare_chunk_indices,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.op import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.op import (
make_tensor_descriptor,
)
from aiter.ops.triton.utils.tuned_config_utils import autotune_configs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import triton
import triton.language as tl

from aiter.ops.triton._triton_kernels.gated_delta_rule.gated_delta_rule_utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.gated_delta_rule_utils import (
autotune_cache_kwargs,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.index import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.index import (
prepare_chunk_indices,
)
from aiter.ops.triton._triton_kernels.gated_delta_rule.utils.op import exp
from aiter.ops.triton._triton_kernels.gated_delta_net.utils.op import exp
from aiter.ops.triton.utils.tuned_config_utils import autotune_configs


Expand Down
2 changes: 1 addition & 1 deletion aiter/ops/triton/gated_delta_net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This module provides high-level Triton implementations for gated delta rule.
"""

from aiter.ops.triton._triton_kernels.gated_delta_rule.utils import (
from aiter.ops.triton._triton_kernels.gated_delta_net.utils import (
GatedDeltaRulePrefillMetadata,
build_gated_delta_rule_prefill_metadata,
)
Expand Down
4 changes: 2 additions & 2 deletions aiter/ops/triton/gated_delta_net/causal_conv1d_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
Decode-stage counterpart of the prefill ``causal_conv1d_prefill`` module: a
single-/few-token autoregressive conv update that directly outputs split
q/k/v. The ``@triton.jit`` / Gluon kernels live in
``aiter.ops.triton._triton_kernels.gated_delta_rule.decode.causal_conv1d_update_split_qkv``.
``aiter.ops.triton._triton_kernels.gated_delta_net.decode.causal_conv1d_update_split_qkv``.
"""

import torch
import triton

from aiter.ops.triton._triton_kernels.gated_delta_rule.decode.causal_conv1d_update_split_qkv import (
from aiter.ops.triton._triton_kernels.gated_delta_net.decode.causal_conv1d_update_split_qkv import (
PAD_SLOT_ID,
_causal_conv1d_update_split_qkv_kernel,
gluon_causal_conv1d_update_split_qkv_kernel,
Expand Down
Loading
Loading