uuid
stringlengths
36
36
file_name
stringlengths
5
50
repo_name
stringclasses
110 values
file_path
stringlengths
7
112
commit_hash
stringclasses
110 values
starcount
int64
0
0
input
stringlengths
39
33.8k
category
dict
licenses
listlengths
1
2
github_url
stringlengths
94
193
3fed2f1b-c00b-47df-86e8-85fac9efc3b4
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def jagged_flash_attention_basic_kernel(q_ptr, k_ptr, v_ptr, offset_ptr, o_ptr, lse_i_ptr, stride_qm, stride_qd, stride_kd, stride_kn, stride_vn, stride_vd, stride_om, stride_od, max_seq_len, D: tl.constexpr, NEXT_D: tl.constexpr, use_mask: tl.constexpr, allow_tf32: tl.constexpr, BLOCK_SIZE_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
b69d2cf0-95a2-423a-a626-19d6cb20f407
bnrelu.py
neuro-ml/kerops
kerops/kernels/bnrelu.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _ApplyBNReLU_cl3d_backward_impl(Input_ptr, Weight_ptr, Bias_ptr, Grad_ptr, Outgrad_ptr, Weight_outgrad_ptr, Bias_outgrad_ptr, numel_no_channels, BLOCK_SIZE: tl.constexpr, num_channels: tl.constexpr, block_other: tl.constexpr): pid = tl.program_id(0) Input_ptr += pid * BLOCK_SIZE ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound", "Memory-Bound" ] ...
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/bnrelu.py
5322126e-9117-4fd6-bd2b-3de14befa10d
argmax.py
daemyung/practice-triton
argmax.py
27f727726f1507c8380a1c11751d851c7c4a07ce
0
@triton.jit def argmax_kernel(output_ptr, input_ptr, num_batches, size, block_size: tl. constexpr): batch = tl.program_id(0) output_block_ptr = tl.make_block_ptr(output_ptr, shape=(num_batches,), strides=(1,), offsets=(batch,), block_shape=(1,), order=(0,)) input_block_ptr = tl.make_block_ptr(in...
{ "Data Type": [ "fp32" ], "Functionality": [ "Top-K Selection" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/daemyung/practice-triton/blob/27f727726f1507c8380a1c11751d851c7c4a07ce/argmax.py
fd103ed2-89cc-476f-a89e-f223e86b5d3b
GELUglu.py
huyz2023/2by4-pretrain
sparse/GELUglu.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _gelu_glu_bwd_kernel(grad_output_ptr, grad_input_ptr, input_ptr, grad_output_row_stride, grad_input_row_stride, input_row_stride, grad_output_col_stride, grad_input_col_stride, input_col_stride, grad_output_page_stride, grad_input_page_stride, input_page_stride, n_pages, BLOCK_SIZE: tl.c...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/GELUglu.py
b78a037f-d294-4568-94ea-bab6c450fa01
associative_rnn_scan.py
TushaarGVS/linear-rnn
linear_rnn/triton/associative_rnn_scan.py
48320589b73154484be7d09a144923a2b9e56b85
0
@triton.jit def _associative_rnn_scan_bwd_kernel(): pass
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/TushaarGVS/linear-rnn/blob/48320589b73154484be7d09a144923a2b9e56b85/linear_rnn/triton/associative_rnn_scan.py
fd49ac89-d287-4343-b1e7-e546da6abbf4
triton_jagged_tensor_ops.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/triton/jagged/triton_jagged_tensor_ops.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def tensor_elementwise_mul(x, y): return x * y
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/jagged/triton_jagged_tensor_ops.py
b2943844-2b11-4fe4-b90a-1c6e1ebcd741
triton_kernels.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/triton_kernels.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def _triton_first_order_fwd(x_ptr: tl.tensor, y_ptr: tl.tensor, z_ptr: tl. tensor, sph_1_0_ptr: tl.tensor, sph_1_1_ptr: tl.tensor, sph_1_2_ptr: tl .tensor, BLOCK_SIZE: tl.constexpr, vector_length: tl.constexpr): """ First order spherical harmonics in Triton. Computationally not that int...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/triton_kernels.py
6b382133-1769-4334-a6ac-ea7373510dc5
GELUglu.py
huyz2023/2by4-pretrain
sparse/GELUglu.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def tanh(x): tanh_neg = (tl.math.exp(x * 2) - 1) / (tl.math.exp(x * 2) + 1) tanh_pos = (1 - tl.math.exp(-2 * x)) / (1 + tl.math.exp(-2 * x)) tanh = tl.where(x > 0, tanh_pos, tanh_neg) return tanh
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/GELUglu.py
fe78e351-fd17-4f43-a401-eb4f64797791
triton_fused_attn_ad.py
LouChao98/vqtree
ops/triton_fused_attn_ad.py
27a53274df7a804bce27dffcce5f5be73f64b6f3
0
@triton.heuristics({'EVEN_M': lambda args: args['seqlen_q'] % args[ 'BLOCK_M'] == 0, 'TOTAL_SLOTS': lambda args: sum(args['CODEBOOK_SIZE'] ** i for i in range(1, args['CODEBOOK_NUM'] + 1))}) @triton.jit def _fwd_kernel(Q, CODEBOOK_K, CODEBOOK_V, KCNT, VCNT, Out, softmax_scale, stride_qb, stride_qh, stride_q...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ...
[ "Apache" ]
https://github.com/LouChao98/vqtree/blob/27a53274df7a804bce27dffcce5f5be73f64b6f3/ops/triton_fused_attn_ad.py
5dee5ab7-230c-4c73-b3fd-4aa6aef7426c
wy_fast.py
sustcsonglin/flash-linear-attention
fla/ops/delta_rule/wy_fast.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for num_warps in [1, 2, 4, 8, 16]], key=['BT', 'BK', 'BV']) @triton.jit def bwd_prepare_wy_repr_kernel(k, v, beta, A, dw, du, dk, dv, dbeta, offsets, indices, T: tl.cons...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Memory-Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/delta_rule/wy_fast.py
a64c01e5-8feb-4826-8caa-64280d7be379
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/gla/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({}, num_warps=2), triton.Config({}, num_warps=4), triton.Config({}, num_warps=8)], key=['BK', 'NC', 'BT']) @triton.jit def chunk_gla_bwd_kernel_intra(q, k, g, dA,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Memo...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/chunk.py
be7559f4-befc-4c5a-86c2-f17eaa7ed922
block_offsets.py
Forkxz/TritonDeepLearningKernel
kernel/block_offsets.py
add54b6318e8fa5fdbf8c7b47659de9fceaa5691
0
@triton.jit def block_offsets_2d(shape_x, shape_y, stride_x, stride_y, offset_x, offset_y, block_shape_x, block_shape_y, require_mask=False): offs_x = tl.arange(0, block_shape_x) + offset_x offs_y = tl.arange(0, block_shape_y) + offset_y ptrs = offs_x[:, None] * stride_x + offs_y[None, :] * stride_y ...
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/Forkxz/TritonDeepLearningKernel/blob/add54b6318e8fa5fdbf8c7b47659de9fceaa5691/kernel/block_offsets.py
49a57e59-6b3a-4a5b-a54d-579bb92b5c93
triton_implicit_gemm_1x1_0x0_1x1.py
l1351868270/implicit_gemm.triton
triton_implicit_gemm_1x1_0x0_1x1.py
64eb8548ccf4576883c928f6315be8b24680a455
0
@triton.autotune(configs=get_autotune_config(), key=['GEMM_M', 'GEMM_N', 'GEMM_K']) @triton.jit def conv2d_kernel_1x1_1x1_0x0_1x1(x_ptr, w_ptr, y_ptr, N, C, H, W, K, P, Q, R, S, U, V, pad_h, pad_w, dila_h, dila_w, GEMM_M, GEMM_N, GEMM_K, stride_am, stride_ak, stride_bk, stride_bn, stride_cm, stride_cn, ...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/l1351868270/implicit_gemm.triton/blob/64eb8548ccf4576883c928f6315be8b24680a455/triton_implicit_gemm_1x1_0x0_1x1.py
66ca0a7e-3044-4054-9572-e48a84e580fd
triton_fused_attention.py
pytorch-labs/tritonbench
tritonbench/kernels/triton_fused_attention.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(list(filter(keep, configsOrig)), key=['N_CTX']) @triton.jit def _attn_fwd(Q, K, V, sm_scale, M, Out, desc_q, desc_k, desc_v, desc_o, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn, stride_kk, stride_vz, stride_vh, stride_vk, stride_vn, stride_oz, stride_oh, stri...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/kernels/triton_fused_attention.py
d159d9b3-bf80-48b6-adf0-f8ae054b043a
mlstm_matmul.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_matmul.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def mlstm_matmul_kernel_backward(dH, dB, Q, K, V, dQ, dK, dV, F, dF, I, dI, M, B, NH: tl.constexpr, S: tl.constexpr, D: tl.constexpr, SB: tl.constexpr ): bh_id = tl.program_id(0) sb_id = tl.program_id(1) batch_id = bh_id // NH head_id = bh_id % NH batch_offset_dh = batch_id * NH ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_matmul.py
aaf9342a-2fc0-47a4-a123-58f4a92788de
layernorm_gated.py
sustcsonglin/flash-linear-attention
fla/modules/layernorm_gated.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'HAS_BIAS': lambda args: args['B'] is not None, 'HAS_Z': lambda args: args['Z'] is not None}) @triton.jit def layer_norm_fwd_kernel(X, Y, W, B, Z, Mean, Rstd, stride_x_row, stride_y_row, stride_z_row, M, N, eps, BLOCK_N: tl.constexpr, HAS_BIAS: tl.constexpr, HAS_Z: tl.constexpr, NORM_BEF...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/layernorm_gated.py
e45d6b24-d5c8-45cc-b1bf-50ded8c8c077
bgmv_expand.py
IBM/vllm
vllm/lora/ops/bgmv_expand.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def _bgmv_expand_kernel(input_ptr, lora_ptr, out_ptr, N, K, lora_indices, xm_stride, xk_stride, l0_stride, lora_k_stride, lora_n_stride, cm_stride, cn_stride, BLOCK_N: tl.constexpr, BLOCK_K: tl.constexpr, SPLIT_N: tl.constexpr, EVEN_K: tl.constexpr, ADD_INPUTS: tl.constexpr, CAST_TYPE: tl.co...
{ "Data Type": [ "fp32", "bf16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/lora/ops/bgmv_expand.py
1f2dca18-a3cd-441e-8a5f-75bcbedf659d
mlstm_matmul.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_matmul.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def scan_add_op(x1, x2): return x1 + x2
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_matmul.py
43a7b7ff-eadb-490b-9acd-84f7d2a3ee0f
test_fused_chunk.py
sustcsonglin/flash-linear-attention
tests/test_fused_chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def attention_fwd_kernel(q, k, v, h, o, s_qh, s_qt, s_qd, s_hh, s_ht, T, scale, BT: tl.constexpr, BD: tl.constexpr, NT: tl.constexpr, STORE: tl. constexpr, IFCOND: tl.constexpr): i_bh = tl.program_id(0) b_h = tl.zeros([BD, BD], dtype=tl.float32) for i in range(0, tl.cdiv(T, BT)): ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/tests/test_fused_chunk.py
242c3dab-c302-4bf0-96fc-8162444aedf6
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/gla/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BK': BK, 'BV': BV}, num_warps= num_warps) for BK in [32, 64] for BV in [64, 128] for num_warps in [2, 4, 8]], key=['BT']) @triton.jit def chunk_gla_bwd_kernel_dv(k, g, A, do, dh, dv, offsets,...
{ "Data Type": [ "fp32", "bf16" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/chunk.py
80930cb4-c6ca-4869-ac5f-29e8b9906e6b
paged_attn.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/paged_attn.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _inner_paged_attn_unroll_4_kernel(q, k_cache, v_cache, stride_km, block_base_ptrs, base_offs_kv, alibi_slope, block_offs, seq_len, qkv, qk_max, exp_sum, BLOCK_SIZE: tl.constexpr, LO: tl.constexpr, HI: tl. constexpr): for block_idx in range(LO, HI, 4): offs_kv_0 = tl.load(block_ba...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn.py
57901932-eb13-48bb-80fb-5ac1397e137c
swiglu.py
dame-cell/Triformer
triformer/swiglu.py
0712537d576166b93fa09aa9509b2661b9ed8a68
0
@triton.jit def swiglu_backward(grad_output_ptr, grad_e_ptr, grad_g_ptr, e_ptr, g_ptr, n_cols, sigmoid_ptr, f_ptr, grad_output_stride, grad_e_stride, grad_g_stride, e_stride, g_stride, sigmoid_stride, f_stride, BLOCK_SIZE: tl.constexpr): pid = tl.program_id(axis=0) col_offset = tl.arange(0, BLOCK_SI...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/swiglu.py
ca5df2aa-d6b2-436b-ad6e-334a25e38f83
lightning_attn2_no_decay.py
OpenNLPLab/lightning-attention
lightning_attn/ops/triton/lightning_attn2_no_decay.py
d7439519541e966084eeaaf3ffd63eecc216f414
0
@triton.jit def _bwd_inter_kernel(Q, K, V, DO, DQ, DK, DV, b: tl.constexpr, h: tl. constexpr, n: tl.constexpr, d: tl.constexpr, e: tl.constexpr, BLOCK: tl .constexpr, NUM_BLOCK: tl.constexpr, CBLOCK: tl.constexpr, NUM_CBLOCK: tl.constexpr): off_bh = tl.program_id(0) off_bh % h qk_offset = off_bh...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/OpenNLPLab/lightning-attention/blob/d7439519541e966084eeaaf3ffd63eecc216f414/lightning_attn/ops/triton/lightning_attn2_no_decay.py
c521d63c-9555-41f2-9185-de188587390f
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/linear_attn/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_linear_attn_bwd_kernel_dh(q, do, dh, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, s_h_h, s_h_t, scale, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr, NT: tl.constexpr): i_k, i_v, i_bh = tl.program_id(0), tl.program_id(1), tl.pr...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/linear_attn/chunk.py
89f28703-00f8-4324-8d3c-5d383c132016
normalization.py
ai-compiler-study/triton-kernels
triton_kernels/kernels/normalization.py
2308e5e9d965059fe2d19b4d535debac4970b69e
0
@triton.jit def _layer_norm_modulation_fwd(X, Y, W, B, Mean, Rstd, stride, seq_len, N, eps, BLOCK_SIZE: tl.constexpr): row = tl.program_id(0) batch_idx = row // seq_len Y += row * stride X += row * stride W += batch_idx * stride B += batch_idx * stride cols = tl.arange(0, BLOCK_SIZE) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ai-compiler-study/triton-kernels/blob/2308e5e9d965059fe2d19b4d535debac4970b69e/triton_kernels/kernels/normalization.py
50f5f29f-f284-422f-95ef-6638cd047f96
avgpool.py
neuro-ml/kerops
kerops/kernels/avgpool.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _AvgPoolCeilStats_cl3d_impl(X_ptr, Out_ptr, Mean_ptr, Sqmean_ptr, h_input, w_input, d_input, d_output, batch_stride_input, H_stride_input, W_stride_input, batch_stride_output, H_stride_output, W_stride_output, numel_no_channels_output, num_channels: tl.constexpr, almost_half_d: tl .const...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/avgpool.py
44cf831b-a88e-40b6-914b-3c52caca46e3
softmax.py
shaRk-033/learn
learn_triton/softmax.py
3108e580bf00448a10fd41e3885fa952b46439ab
0
@triton.jit def softmax_kernel(inp_ptr, out_ptr, b, t, c, BLOCK_SIZE: tl.constexpr): bid = tl.program_id(0) tid = tl.program_id(1) if bid >= b or tid >= t: return cols = tl.arange(0, BLOCK_SIZE) offset = bid * t * c + tid * c + cols mask = cols < c x = tl.load(inp_ptr + offset, mask=...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "CC0" ]
https://github.com/shaRk-033/learn/blob/3108e580bf00448a10fd41e3885fa952b46439ab/learn_triton/softmax.py
f4086042-eb57-44c2-8406-648d389752ae
matmul.py
sustcsonglin/flash-linear-attention
fla/ops/utils/matmul.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def leaky_relu(x): return tl.where(x >= 0, x, 0.01 * x)
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "Low Latency" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/matmul.py
9d977a77-0a9d-44fe-8a4a-f1679ef7d33d
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_bwd_kernel_V(k, v, z, h, A, do, dh, dq, dk, dv, dA, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, s_h_h, s_h_t, s_h_d, scale, T: tl. constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl. constexpr, BV: tl.constexpr): i_k, i_t, i_bh = tl.program_id(0), tl.program_id...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
dd0ac36c-0d7f-4fec-8eaf-5ab99edcd368
quant_triton.py
CompendiumLabs/ziggy
ziggy/backends/quant_triton.py
bd12fe50ca3475743f62ae26d4c184108e441e03
0
@triton.jit def matmul_float_kernel(A, B, C, N, M, K, stride_an, stride_ak, stride_bk, stride_bm, stride_cn, stride_cm, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_K: tl.constexpr): dtype = C.dtype.element_ty pid_n = tl.program_id(0) pid_m = tl.program_id(1) rn = pid_n * B...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/CompendiumLabs/ziggy/blob/bd12fe50ca3475743f62ae26d4c184108e441e03/ziggy/backends/quant_triton.py
f2af12dc-f012-439b-bcf8-16486d668412
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_fwd_kernel_intra_V(q, k, z, A, s_k_h, s_k_t, s_k_d, scale, T: tl.constexpr, K: tl.constexpr, BT: tl.constexpr, BC: tl.constexpr, BK: tl.constexpr, NC: tl.constexpr): i_k, i_c, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) i_t, i_i, i_j = i_c // (NC * NC), i_c % (N...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
e8622bcb-db14-44d9-adcb-257ca07eab7d
scaled_quant.py
drisspg/transformer_nuggets
transformer_nuggets/fp8/scaled_quant.py
a4c66bbeebaa479ad8b6ed82d7efbafa41b17260
0
@triton.jit def dynamic_scaled_cast(inpt_ptr: torch.Tensor, output_ptr: torch.Tensor, abs_max_ptr: torch.Tensor, spin_lock: torch.Tensor, numel: int, XBLOCK: tl.constexpr, float8_dtype: tl.constexpr, max_val: tl.constexpr): """Quantize tensor to fp8 using current global absmax""" n_blocks = tl.num_progr...
{ "Data Type": [ "int8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Memory-Bound" ] }
[ "BSD" ]
https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/fp8/scaled_quant.py
45e590dd-7a3c-444a-bf55-6af49405bf85
k_fused_matmul_fw.py
cpuhrsch/torchfused
torchfused/triton/k_fused_matmul_fw.py
6c40ed160dcecbe7825f268f7c86bccd359e0ebf
0
@triton.autotune(configs=[triton.Config({'BLOCK_ROW': 16, 'BLOCK_COL': 16}, num_stages=5, num_warps=1), triton.Config({'BLOCK_ROW': 32, 'BLOCK_COL': 32}, num_stages=5, num_warps=1), triton.Config({'BLOCK_ROW': 64, 'BLOCK_COL': 32}, num_stages=5, num_warps=2), triton.Config({ 'BLOCK_ROW': 32, 'BLOCK_COL'...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD" ]
https://github.com/cpuhrsch/torchfused/blob/6c40ed160dcecbe7825f268f7c86bccd359e0ebf/torchfused/triton/k_fused_matmul_fw.py
f7ae9f93-489e-4fd5-b45e-db9d45f58144
quant_triton.py
CompendiumLabs/ziggy
ziggy/backends/quant_triton.py
bd12fe50ca3475743f62ae26d4c184108e441e03
0
@triton.jit def matmul_quant_kernel(A, B, C, N, M, K, K1, stride_an, stride_ak, stride_bk, stride_bm, stride_cn, stride_cm, scale, zero_point, BITS: tl .constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, BLOCK_SIZE_K1: tl.constexpr): dtype = C.dtype.element_ty...
{ "Data Type": [ "fp32", "int8", "uint8" ], "Functionality": [ "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound",...
[ "MIT" ]
https://github.com/CompendiumLabs/ziggy/blob/bd12fe50ca3475743f62ae26d4c184108e441e03/ziggy/backends/quant_triton.py
4f055ba2-8e8d-4b65-989b-b19e4874a19b
06-fused-attention.py
triton-lang/triton
python/tutorials/06-fused-attention.py
a2b398e0bb1b120f31cf386d6ae3261c3ab84207
0
@triton.jit def _attn_bwd_preprocess(O, DO, Delta, Z, H, N_CTX, BLOCK_M: tl.constexpr, HEAD_DIM: tl.constexpr): off_m = tl.program_id(0) * BLOCK_M + tl.arange(0, BLOCK_M) off_hz = tl.program_id(1) off_n = tl.arange(0, HEAD_DIM) o = tl.load(O + off_hz * HEAD_DIM * N_CTX + off_m[:, None] * HEAD_DIM + ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/triton-lang/triton/blob/a2b398e0bb1b120f31cf386d6ae3261c3ab84207/python/tutorials/06-fused-attention.py
b076a099-4288-404c-911a-b081727d520c
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({}, num_warps=2), triton.Config({}, num_warps=4), triton.Config({}, num_warps=8)], key=['BC', 'BK']) @triton.jit def chunk_rwkv6_fwd_A_kernel_intra_sub_intra_spli...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Coalesced", "Blocked Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py
a0025e28-0746-4d9e-bb24-18053ce379b0
z_order.py
Kitsunetic/space-filling-pytorch
space_filling_pytorch/functional/z_order.py
0de955ad1036973ee7506c5a0124c208acec722d
0
@triton.jit def _calculate_zorder(fx, fy, fz, space_size): x = ((fx + 1) / 2 * space_size).to(tl.int64) y = ((fy + 1) / 2 * space_size).to(tl.int64) z = ((fz + 1) / 2 * space_size).to(tl.int64) x = tl.minimum(tl.maximum(x, 0), space_size - 1) y = tl.minimum(tl.maximum(y, 0), space_size - 1) z = ...
{ "Data Type": [ "fp32" ], "Functionality": [], "Memory Access Pattern": [ "Transposed Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/Kitsunetic/space-filling-pytorch/blob/0de955ad1036973ee7506c5a0124c208acec722d/space_filling_pytorch/functional/z_order.py
834e54f1-1ce6-424e-a37a-b8bc89efdeec
cross_entropy.py
ardywibowo/triton-mode
kernels/cross_entropy.py
5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1
0
@triton.jit def triton_cross_entropy_forward(input_ptr, input_stride, target_ptr, target_stride, loss_output_ptr, loss_output_stride, num_classes, num_valid_targets, ignore_label, smoothing_factor: tl.constexpr, reduction_mode: tl.constexpr, BLOCK_SIZE: tl.constexpr): row_id = tl.program_id(0).to(tl.int...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Softmax" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ardywibowo/triton-mode/blob/5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1/kernels/cross_entropy.py
514b2699-68b0-4166-9e48-359401f2a1ee
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/linear_attn/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_linear_attn_bwd_kernel_dqkv(q, k, v, h, do, dh, dq, dk, dv, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, s_h_h, s_h_t, scale, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr, NT: tl.constexpr): i_k, i_t, i_bh = tl.program_id(0), ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/linear_attn/chunk.py
f35c6d9e-1bb6-42a6-b3bf-22b95cb2e626
mhmoe_bwd.py
dtadpole/triton-playground
mhmoe_bwd.py
2d317976722d63080133b1bf88b1f0cdec98f831
0
@triton.jit def _mlp_wide_kernel_bwd_dw1w2(pid_h, pid_e, x_ptr, w1_ptr, w2_ptr, o_ptr, dx_ptr, dw1_ptr, dw2_ptr, do_ptr, H, B, D: tl.constexpr, E, stride_xb, stride_xd, stride_w1d, stride_w1e, stride_w2e, stride_w2d, stride_ob, stride_od, stride_dxb, stride_dxd, stride_dw1d, stride_dw1e, stride_dw2e, st...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe_bwd.py
d8147557-5e28-4b54-9d2b-db80fd84ae11
utils.py
huyz2023/2by4-pretrain
sparse/utils.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _soft_threshold(a0, a1, a2, a3): x1, x2, x3, x4, x5, x6 = tl.abs(a0) > tl.abs(a1), tl.abs(a0) > tl.abs(a2 ), tl.abs(a0) > tl.abs(a3), tl.abs(a1) > tl.abs(a2), tl.abs(a1 ) > tl.abs(a3), tl.abs(a2) > tl.abs(a3) m0, m1, m2, m3 = (x2 & x3 | x1 & x2 | x1 & x3, ~x1 & x5 | x4 & x5 | ~x1...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/utils.py
3e563cf1-4a15-483f-8db0-7b40621112a6
RzLinearForward.py
apd10/RzLinear
python/rz_linear/impl/RzLinearForward.py
eb56657b2de0a97f398f88af421b0fbcbc5469c9
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 128, 'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 32}, num_stages=3, num_warps=8), triton.Config({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K': 32}, num_stages=3, num_warps=8), triton.Config({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 64, 'BLOCK_SIZ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Coalesced", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearForward.py
5e4fffd9-e14a-4bf7-a094-9d0f4377b78b
y_4.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_4.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def fourth_order_bwd(coord_ptr: tl.tensor, coord_grad_ptr: tl.tensor, sph_grad_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl. constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr, output_stride: tl.constexpr): block_id = tl.program_id(0) coord_stride = 3 coord_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Memory-Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_4.py
13dbadc6-77e5-4822-8ad4-db75cbf0f44b
flash_triton.py
MayDomine/Burst-Attention
burst_attn/flash_triton.py
b088c554072935074ea9c643de5ee363be5ab1f6
0
@triton.jit def _bwd_kernel_one_col_block(start_n, Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride_qm, stride_kn, stride_vn, stride_bm, stride_dom, stride_dqm, stride_dkn, stride_dvn, seqlen_q, seqlen_k, headdim, ATOMIC_ADD: tl.constexpr, BIAS_TYPE: tl.constexpr, IS_CAUSAL: tl.constexpr, BL...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Attention Mechanisms", "Matrix Multiplication", "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/MayDomine/Burst-Attention/blob/b088c554072935074ea9c643de5ee363be5ab1f6/burst_attn/flash_triton.py
5b0222d0-40c9-44d6-9305-fa0136e4416c
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/rebased/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def _parallel_rebased_bwd_dkv(i_bh, i_c, i_k, i_v, i_h, q, k, v, do, dz, dk, dv, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, scale, B: tl.constexpr, H: tl.constexpr, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BTL: tl.constexpr, BTS: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr): p_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Matrix Multiplication", "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rebased/parallel.py
6e8a194d-0aed-429d-8a29-942bafe62aad
tl_evaluate.py
2986002971/TSP_GA
algorithm/tl_evaluate.py
930dd889a3b99e18cd9e07c344fc9cbc3ce6d9c8
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE': 32}, num_warps=4), triton.Config({'BLOCK_SIZE': 64}, num_warps=8), triton.Config({ 'BLOCK_SIZE': 128}, num_warps=8), triton.Config({'BLOCK_SIZE': 256}, num_warps=16)], key=['n_paths', 'n_cities']) @triton.jit def evaluate_paths_kernel(dist_matrix_ptr, p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/2986002971/TSP_GA/blob/930dd889a3b99e18cd9e07c344fc9cbc3ce6d9c8/algorithm/tl_evaluate.py
705819f8-d177-4232-b148-dca7e6e633ff
paged_attn_v2.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/paged_attn_v2.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _single_query_cached_kv_attention_v2_unroll4(exp_sums, max_logits, out, q, k_cache, v_cache, head_mapping, scale, block_tables, seq_lens, partiton_size, max_num_blocks_per_seq, alibi_slopes, stride_qm, stride_qn, stride_om, stride_on, stride_ok, stride_km, stride_kn, stride_kk, stride_ex...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound"...
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn_v2.py
60a6b4c9-ca74-46f7-b620-ed6b512cc8aa
chunk_h_split.py
sustcsonglin/flash-linear-attention
fla/ops/common/chunk_h_split.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not None, 'STORE_FINAL_STATE': lambda args: args['ht'] is not None, 'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BK': BK, 'BV': BV}, num_warps= num_warps, num_stages=num_stages) for BK ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Persistent Kernels" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/common/chunk_h_split.py
8a0c1d45-0ee4-4b70-a724-b28e532e0284
lightningAttention2.py
Computational-Machine-Intelligence/LeetDecoding
leetDecoding/methods/lightningAttention2.py
1b545c2f5bacc155255250d1f70ac9484744559a
0
@triton.jit def _fwd_kernel(Q, K, V, Out, S, b: tl.constexpr, h: tl.constexpr, n: tl. constexpr, d: tl.constexpr, e: tl.constexpr, BLOCK: tl.constexpr, NUM_BLOCK: tl.constexpr, BLOCK_MODEL: tl.constexpr): off_bh = tl.program_id(0) off_h = off_bh % h off_e = tl.program_id(1) qk_offset = off_bh * ...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication", "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/Computational-Machine-Intelligence/LeetDecoding/blob/1b545c2f5bacc155255250d1f70ac9484744559a/leetDecoding/methods/lightningAttention2.py
006edbee-aca4-431a-a039-c2ae16158575
swiglu.py
dame-cell/Triformer
triformer/swiglu.py
0712537d576166b93fa09aa9509b2661b9ed8a68
0
@triton.jit def swiglu_forward_optimized(e_ptr, g_ptr, output_ptr, sigmoid_ptr, f_ptr, e_stride, g_stride, output_stride, sigmoid_stride, f_stride, BLOCK_SIZE: tl.constexpr, n_cols): row_idx = tl.program_id(axis=0) col_offset = tl.arange(0, BLOCK_SIZE) mask = col_offset < n_cols e_ptr += row_idx...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "MIT" ]
https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/swiglu.py
8edb5183-1d49-41a4-b064-f713cd7c7a3d
test_triton.py
pytorch/xla
test/test_triton.py
40efdb7b6571ce92797b5ba42619b79c1b147b3e
0
@triton.jit def _attn_fwd(Q, K, V, sm_scale, M, Out, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn, stride_kk, stride_vz, stride_vh, stride_vk, stride_vn, stride_oz, stride_oh, stride_om, stride_on, Z, H, N_CTX, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, HEAD_DIM: tl.con...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication", "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/pytorch/xla/blob/40efdb7b6571ce92797b5ba42619b79c1b147b3e/test/test_triton.py
8c5238cc-c037-4b47-b27f-b517a0dadced
cross_entropy_loss_kernels.py
BobMcDear/attorch
attorch/cross_entropy_loss_kernels.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.autotune(configs=warps_kernel_configs(), key=['batch_dim', 'feat_dim']) @triton.heuristics({'BLOCK_SIZE_BATCH': BLOCK_SIZE_BATCH_heuristic, 'BLOCK_SIZE_FEAT': lambda args: next_power_of_2(args['feat_dim'])}) @triton.jit def cross_entropy_loss_forward_kernel(input_pointer, target_pointer, weight_pointer,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/cross_entropy_loss_kernels.py
a74682cf-3a90-4677-b098-f7898cae3980
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/hgrn/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.autotune(configs=[triton.Config({'BD': 32}, num_warps=1), triton. Config({'BD': 32}, num_warps=2), triton.Config({'BD': 32}, num_warps=4), triton.Config({'BD': 32}, num_warps=8), triton.Config({'BD': 64}, num_warps=1), triton.Config({'BD': 64}, num_warps=2), triton.Config({ 'BD': 64}, num_warps=...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/hgrn/chunk.py
09e3a5f7-b511-46a3-93e4-ca2098887d89
triton_chunk.py
NX-AI/xlstm-jax
xlstm_jax/models/xlstm_pytorch/blocks/mlstm/backend/triton_chunk.py
6615e620ba4ecdbe4fd9cc4e9a5a313b133e84a7
0
@triton.jit def chunk_mlstm_bwd_kernel_dqkvif(q, k, v, C, m, m_total, norm, i, f, dh, dC, dq, dk, dv, s_qk_h, s_qk_t, s_qk_d, s_vh_h, s_vh_t, s_vh_d, s_C_h, s_C_t, scale, B: tl.constexpr, H: tl.constexpr, T: tl.constexpr, K: tl. constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl. con...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compu...
[ "Apache", "BSD" ]
https://github.com/NX-AI/xlstm-jax/blob/6615e620ba4ecdbe4fd9cc4e9a5a313b133e84a7/xlstm_jax/models/xlstm_pytorch/blocks/mlstm/backend/triton_chunk.py
b533c264-f2a6-46f8-ac1f-f1b856309aba
wy_fast.py
sustcsonglin/flash-linear-attention
fla/ops/gated_delta_rule/wy_fast.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for num_warps in [2, 4, 8]], key=['BK']) @triton.jit def fwd_prepare_wy_repr_kernel_chunk32(k, g, beta, Aw, Au, offsets, indices, T: tl.constexpr, K: tl.constexpr, H: tl...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings", "Grid-Stride Loops" ], "Performance Objective": [ "Hi...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gated_delta_rule/wy_fast.py
d7b0c935-63df-4ee8-a4db-e04227fcfa37
shape.py
2niuhe/triton_utils
src/triton_utils/shape.py
6184906ac3b86dac3ccbfac128ec393ccecde5df
0
@triton.jit def load_1d(ptr, sz: tl.constexpr, n, max, stride=1): """Chunk 1d vector (defined by ptr) into 1d grid, where each chunk has size sz. Load the nth chunk. Ie, load [n*sz,...,(n+1)*sz-1].""" offs = get_1d_offest(sz, n) mask = get_1d_mask(offs, max) return tl.load(ptr + offs, mask)
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "Apache" ]
https://github.com/2niuhe/triton_utils/blob/6184906ac3b86dac3ccbfac128ec393ccecde5df/src/triton_utils/shape.py
abd8d704-a5d9-4edd-8154-cd775adf20b5
fused_chunk.py
sustcsonglin/flash-linear-attention
fla/ops/gla/fused_chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def bwd_inner_chunk(q, k, g, dA, dq, dk, s_k_h, s_k_t, s_k_d, T: tl. constexpr, K: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr): i_k, i_t, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) p_k = tl.make_block_ptr(k + i_bh * s_k_h, (T, K), (s_k_t, s_k_d), (i_t * BT, i_k * B...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bo...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/fused_chunk.py
dfffff6c-5718-4d9e-8554-1123df93f9ca
ln_linear_triton_2.py
ethansmith2000/fused-layer-norm
ln_linear_triton_2.py
84fe243a829364acdcfd7cd70b699db04838af0f
0
@triton.jit def _layer_norm_bwd_dx_fused(DX, DY, DSc, DSh, Y, Sc, Sh, Mean, Rstd, Lock, stride, N, GROUP_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr): row = tl.program_id(0) cols = tl.arange(0, BLOCK_SIZE_N) mask = cols < N Y += row * stride DY += row * stride DX += row * stride loc...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access", "Shared Memory Intensive" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute ...
[ "MIT" ]
https://github.com/ethansmith2000/fused-layer-norm/blob/84fe243a829364acdcfd7cd70b699db04838af0f/ln_linear_triton_2.py
0556ec3b-dfff-4fcf-bfe4-7f2f435207f6
test_sampler.py
Coco58323/vllm_blend
tests/kernels/test_sampler.py
1fe36887b3c8402d71d119f6a2ff545c2fffff4d
0
@triton.jit def _uniform_to_exponential_kernel(input, output, n: tl.constexpr): idx = tl.arange(0, n) x = tl.load(input + idx) y = _uniform_to_exponential(x) tl.store(output + idx, y)
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "Apache" ]
https://github.com/Coco58323/vllm_blend/blob/1fe36887b3c8402d71d119f6a2ff545c2fffff4d/tests/kernels/test_sampler.py
88444d28-55e3-434c-8f2a-ca5d9b2c5a02
triton_conv3d.py
l1351868270/implicit_gemm.triton
triton_conv3d.py
64eb8548ccf4576883c928f6315be8b24680a455
0
@triton.autotune(configs=get_autotune_config(), key=['N', 'C', 'D', 'H', 'W', 'K', 'D_out', 'H_out', 'W_out', 'T', 'R', 'S', 'stride_d', 'stride_h', 'stride_w', 'pad_d', 'pad_h', 'pad_w', 'dila_d', 'dila_h', 'dila_w']) @triton.jit def conv3d_kernel(x_ptr, w_ptr, y_ptr, N, C, D, H, W, K, D_out, H_out, W_...
{ "Data Type": [ "fp16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound", "Memory-Boun...
[ "MIT" ]
https://github.com/l1351868270/implicit_gemm.triton/blob/64eb8548ccf4576883c928f6315be8b24680a455/triton_conv3d.py
0cdc9206-f8ac-4983-a3c9-9a7b7091b772
chunk_fuse.py
elephantmipt/rebased_minimal
flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
e7b945509972fab9f9c1c7be431abf7d6bf62c95
0
@triton.jit def chunk_abc_fwd_kernel_o(p, v, o, rv, cv, pv, s_qk_h, s_qk_t, s_qk_d, s_sk_h, s_sk_t, s_sk_m, T, BT: tl.constexpr, BM: tl.constexpr, BV: tl. constexpr, DM: tl.constexpr, DV: tl.constexpr, NT: tl.constexpr): i_v, i_m, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) n_bh = tl.num...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Comp...
[ "Apache" ]
https://github.com/elephantmipt/rebased_minimal/blob/e7b945509972fab9f9c1c7be431abf7d6bf62c95/flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
aa3dc7ca-31b5-4d4d-864c-523094a3cabe
blocksparse_logsumexp.py
kimiasa/Experiments
src/models/attention/blocksparse_logsumexp.py
c4e73bfefd8290695ec52b6386b6b81838ca94a1
0
@triton.heuristics({'num_warps': lambda *args, **meta: num_warps(args[3] * meta['BLOCK'])}) @triton.heuristics({'TN': lambda *args, **meta: next_power_of_2(args[3] * meta['BLOCK'])}) @triton.jit def _forward(X, OUT, LUT, sizemax, stride_zx, stride_zout, stride_hout, **meta ): TN = meta['TN'] BLOCK =...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "Apache" ]
https://github.com/kimiasa/Experiments/blob/c4e73bfefd8290695ec52b6386b6b81838ca94a1/src/models/attention/blocksparse_logsumexp.py
090c7a0b-2d5b-41b2-ae7d-fd6bf3dd7f24
06-fused-attention.py
2lambda123/triton
python/tutorials/06-fused-attention.py
09e27725b89043a07f49c440db6a9aedcfba8432
0
@triton.jit def _fwd_kernel(Q, K, V, sm_scale, L, Out, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn, stride_kk, stride_vz, stride_vh, stride_vk, stride_vn, stride_oz, stride_oh, stride_om, stride_on, Z, H, N_CTX, BLOCK_M: tl.constexpr, BLOCK_DMODEL: tl. constexpr, BLOCK_N:...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ]...
[ "MIT" ]
https://github.com/2lambda123/triton/blob/09e27725b89043a07f49c440db6a9aedcfba8432/python/tutorials/06-fused-attention.py
3756e1f0-c01b-4b42-bb9d-de07cfbb77e8
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/simple_gla/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=4)], key=['BT', 'BK', 'BV']) @triton.jit def chunk_simple_gla_fwd_kernel_o(q, k, v, h, g, o, offsets, indices, scale, T: tl.constexpr, H: tl.constexpr, K: tl.constexpr, V: tl.const...
{ "Data Type": [ "bf16", "fp32" ], "Functionality": [ "Attention Mechanisms", "Quantization" ], "Memory Access Pattern": [ "Strided Access", "Blocked Access" ], "Parallelization Strategy": [ "Grid-Stride Loops", "Thread-Block Mappings" ], "Performance Objective": [ ...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/simple_gla/chunk.py
4fceec9b-8d2a-47cc-a208-fb9e821e4377
fused_moe_a16w4.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/fused_moe_a16w4.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _fused_moe_kernel_a16w4_perchannel(A, B, C, scale_b_ptr, zero_points_ptr, topk_weights_ptr, sorted_token_ids_ptr, expert_ids_ptr, num_tokens_post_padded_ptr, N, K, EM, num_valid_tokens, stride_am, stride_ak, stride_be, stride_bn, stride_bk, stride_cm, stride_cn, stride_scale_be, stride_s...
{ "Data Type": [ "int8", "bf16", "fp32" ], "Functionality": [ "Quantization", "Top-K Selection", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access", "Transposed Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Obje...
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/fused_moe_a16w4.py
a8ad76d1-6af5-4b88-892c-7131230d4b1c
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/retention/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not None, 'STORE_FINAL_STATE': lambda args: args['ht'] is not None, 'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BK': BK, 'BV': BV}, num_warps= num_warps, num_stages=num_stages) for BK ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/retention/chunk.py
49950adc-5589-4676-af7f-0b95a107d8e9
dot_triton.py
markdewing/AI_kernels
dot/triton/dot_triton.py
32b2fe4b1e81cf60a16ef188e37f2d47428ce23d
0
@triton.jit def dot_product_kernel(x_ptr, y_ptr, output_ptr, n_elements, BLOCK_SIZE: tl .constexpr): pid = tl.program_id(axis=0) block_start = pid * BLOCK_SIZE offsets = block_start + tl.arange(0, BLOCK_SIZE) mask = offsets < n_elements x = tl.load(x_ptr + offsets, mask=mask) y = tl.load(y_p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/markdewing/AI_kernels/blob/32b2fe4b1e81cf60a16ef188e37f2d47428ce23d/dot/triton/dot_triton.py
23cd9919-1bc6-4aea-9f69-aad2aa2f2839
sb_varlen_bwd.py
shawntan/stickbreaking-attention
stickbreaking_attention/sb_varlen/sb_varlen_bwd.py
8dd32ad5e58f0ee0232fd4782dc53d354ff8d283
0
@triton.jit def locked_add(Lock_ptr, Count_ptr, A_ptrs, a, B_ptrs, b, N_mask, NO_N_MASK, D_mask, NO_D_MASK: tl.constexpr): while tl.atomic_cas(Lock_ptr, 0, 1) == 1: pass count = tl.load(Count_ptr, eviction_policy='evict_last') if NO_D_MASK: if NO_N_MASK: if count == 0: ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Low Latency" ] }
[ "Apache" ]
https://github.com/shawntan/stickbreaking-attention/blob/8dd32ad5e58f0ee0232fd4782dc53d354ff8d283/stickbreaking_attention/sb_varlen/sb_varlen_bwd.py
7f7cdfd8-dd2a-4c5f-825b-860f5d4fc16a
y_1.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_1.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def first_order_bwd(coord_ptr: tl.tensor, coord_grad_ptr: tl.tensor, sph_grad_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl. constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr, output_stride: tl.constexpr): block_id = tl.program_id(0) coord_stride = 3 coord_s...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_1.py
2a143289-7f7a-4301-8cd6-b7852faa3ceb
triton_flash_attention.py
IBM/vllm
vllm/attention/ops/triton_flash_attention.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.autotune(configs=[triton.Config({'BLOCK_M': 256, 'BLOCK_N': 64, 'waves_per_eu': 2, 'PRE_LOAD_V': False}, num_stages=1, num_warps=8), triton.Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'waves_per_eu': 2, 'PRE_LOAD_V': False}, num_stages=1, num_warps=4), triton.Config({ 'BLOCK_M': 256, 'BLOCK_N': 128,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/attention/ops/triton_flash_attention.py
06dc48e5-e255-4b73-9331-51d5c246c0ca
dropout_rng.py
ROCm/aotriton
tritonsrc/dropout_rng.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.jit def debug_fill_dropout_rng(R, stride_rz, stride_rh, stride_rm, stride_rn, seqlen_q, seqlen_k, philox_seed, philox_offset_base, BLOCK_M: tl. constexpr, BLOCK_N: tl.constexpr): start_m = tl.program_id(0) off_h = tl.program_id(1) off_z = tl.program_id(2) d_offset = off_h * stride_rh + o...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Memory-Bound" ] }
[ "MIT" ]
https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/dropout_rng.py
2fcb6b4b-d342-4810-8e57-787ada488273
mhmoe_bwd.py
dtadpole/triton-playground
mhmoe_bwd.py
2d317976722d63080133b1bf88b1f0cdec98f831
0
@triton.jit def _mlp_wide_kernel_bwd_dx(pid_h, pid_b, x_ptr, w1_ptr, w2_ptr, o_ptr, dx_ptr, dw1_ptr, dw2_ptr, do_ptr, H, B, D: tl.constexpr, E, stride_xb, stride_xd, stride_w1d, stride_w1e, stride_w2e, stride_w2d, stride_ob, stride_od, stride_dxb, stride_dxd, stride_dw1d, stride_dw1e, stride_dw2e, strid...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe_bwd.py
c290ae95-140d-49ca-bf58-a327ab667240
smem_triton_matmul.py
WesKwong/gemm-example-cuda2py
triton_mm/smem_triton_matmul.py
901c4488a79b6d71f7a4dc15dcdfc9546b879a23
0
@triton.jit def smem_triton_matmul(c_ptr, a_ptr, b_ptr, M, N, K, stride_am, stride_ak, stride_bk, stride_bn, stride_cm, stride_cn, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr): raw_pid_m = tl.program_id(0) raw_pid_n = tl.program_id(1...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings", "Persistent Kernels" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/WesKwong/gemm-example-cuda2py/blob/901c4488a79b6d71f7a4dc15dcdfc9546b879a23/triton_mm/smem_triton_matmul.py
60cd7074-f5da-4801-bf48-534ee82c78c0
copy.py
chengzeyi/stable-fast
src/sfast/triton/ops/copy.py
3a6f35c7045f8f6812515957ca62ef37260ff080
0
@eval( """triton.heuristics({ 'BLOCK_M': lambda kwargs: min(4096, triton.next_power_of_2(kwargs['size_inp_0'])), 'BATCH_STRIDE_INP_IS_1': lambda kwargs: kwargs['batch_stride_inp'] == 1, 'STRIDE_INP_0_IS_1': lambda kwargs: kwargs['stride_inp_0'] == 1, 'BATCH_STRIDE_OUT_IS_1': lambda kwargs: kwargs['b...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Memory-Bound" ] }
[ "MIT" ]
https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/copy.py
52b19649-738b-4b5d-b8bd-609bca2dcadc
preprocess_cumsum_gk.py
berlino/seq_icl
src/models/sequence/rnn/gla_triton/inter_chunk_contribution/preprocess_cumsum_gk.py
9b9223d15348b5a415fb453ed988ed5f7ab9fbdc
0
@triton.jit def stable_log_sigmoid(x): max_value = tl.where(x < 0, x, 0) abs_value = tl.where(x > 0, x, -x) return max_value - tl.log(1 + tl.exp(-abs_value))
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/gla_triton/inter_chunk_contribution/preprocess_cumsum_gk.py
1da3bedd-0ea9-4a1e-b787-49c4893f39be
fused_moe_a16w4.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/fused_moe_a16w4.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _fused_moe_kernel_a16w4_subchannel(A, B, C, scale_b_ptr, zero_points_ptr, topk_weights_ptr, sorted_token_ids_ptr, expert_ids_ptr, num_tokens_post_padded_ptr, N, K, EM, num_valid_tokens, stride_am, stride_ak, stride_be, stride_bn, stride_bk, stride_cm, stride_cn, stride_scale_be, stride_s...
{ "Data Type": [ "int8" ], "Functionality": [ "Matrix Multiplication", "Attention Mechanisms" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/fused_moe_a16w4.py
72381e7b-efbe-42ec-bcc7-02dd2d8675ed
y_0.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_0.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def zeroth_order_bwd(coord_ptr: tl.tensor, coord_grad_ptr: tl.tensor, sph_grad_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl. constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr, output_stride: tl.constexpr): block_id = tl.program_id(0)
{ "Data Type": [], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_0.py
96d3e5c8-a2b2-4caf-a2d2-f0b0671b6574
quantize.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/triton/quantize.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _compute_exp(group_max, rounding_mode, rand_bits, MBITS: tl.constexpr): """Compute shared exponent of group using specified rounding mode. Args: group_max (Tensor): Group of values to compute exponent of. rounding_mode (int or RoundingMode): Which rounding mode to use. r...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/quantize.py
30aea82c-19d0-417f-9cf2-abd252b59a7d
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_bwd_kernel_intra_V(q, k, z, dA, dq, dk, s_k_h, s_k_t, s_k_d, T: tl.constexpr, K: tl.constexpr, BT: tl.constexpr, BC: tl.constexpr, BK: tl.constexpr, NC: tl.constexpr): i_k, i_c, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) i_t, i_i = i_c // NC, i_c % NC p_z =...
{ "Data Type": [], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
0e7cd672-1e72-48ba-b85f-b3d9b3529a63
rtn_kernel.py
ArthurinRUC/libquant
libquant/triton/rtn_kernel.py
f2a42a78a96e867862d24d931b70500332ece5cb
0
@triton.jit def quant_rtn_triton(mat: tl.tensor, scale: tl.tensor, zero_point: tl. tensor, quant_dim: int, nbits: int, per_channel: bool, per_tensor: bool, use_zero_point: bool, group_size: int, scale_dtype: tl.dtype, zero_dtype: tl.dtype, quant_dtype: tl.dtype, device: tl.dtype) ->tl.Tuple[ tl.tensor, ...
{ "Data Type": [ "fp32", "int8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/ArthurinRUC/libquant/blob/f2a42a78a96e867862d24d931b70500332ece5cb/libquant/triton/rtn_kernel.py
d19a6587-227e-47d3-82af-4397af3e33c3
glu_kernels.py
BobMcDear/attorch
attorch/glu_kernels.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.autotune(configs=element_wise_kernel_configs(), key=['size']) @triton.jit def glu_backward_kernel(output_grad_pointer, input1_pointer, input2_pointer, input1_grad_pointer, input2_grad_pointer, size, param, act_func: tl. constexpr, BLOCK_SIZE: tl.constexpr): """ Calculates the input gradient of t...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/glu_kernels.py
14d6b032-07e3-479f-afba-018a5bb6e96f
modulation.py
ai-compiler-study/triton-kernels
triton_kernels/ops/modulation.py
2308e5e9d965059fe2d19b4d535debac4970b69e
0
@triton.jit def triton_modulation_scale_shift(x_ptr, modulation_ptr, output_ptr, batch_size, head_size, modulation_size, is_mod1, XBLOCK: tl.constexpr): pid = tl.program_id(0) xoffset = pid * XBLOCK + tl.arange(0, XBLOCK)[:] batch_idx = xoffset // batch_size head_dim_idx = xoffset % head_size mo...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations", "Normalization" ], "Memory Access Pattern": [ "Coalesced", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Low Latency" ] }
[ "MIT" ]
https://github.com/ai-compiler-study/triton-kernels/blob/2308e5e9d965059fe2d19b4d535debac4970b69e/triton_kernels/ops/modulation.py
f5fa9512-df93-43c8-be9e-b332055b0317
sampling.py
falkaer/multi-scale-music
seq/sampling.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.jit def _logsumexp(X, OUT, xm_stride, xn_stride, out_stride, N, BLOCK_N: tl. constexpr): rm = tl.program_id(0) alpha = tl.zeros((1,), tl.float32) + -float('inf') res = tl.zeros((1,), tl.float32) for bn in range(0, N, BLOCK_N): rn = bn + tl.arange(0, BLOCK_N) Xmn = X + rm * xm...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/seq/sampling.py
c95d09f9-2474-4dce-8b77-528236596854
softmax.py
dame-cell/Triformer
triformer/softmax.py
0712537d576166b93fa09aa9509b2661b9ed8a68
0
@triton.jit def softmax_kernel_backward(grad_out_ptr, probs_ptr, grad_in_ptr, grad_stride, probs_stride, out_stride, seq_len, BLOCK_SIZE: tl. constexpr, num_warps: tl.constexpr): batch_idx = tl.program_id(0) probs_start_ptr = probs_ptr + batch_idx * probs_stride grad_start_ptr = grad_in_ptr + batch_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/softmax.py
3f008594-2d5f-43ff-9467-54adf244ea10
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/hgrn/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_hgrn_bwd_kernel_o(g, gc, o, dx, dg, s_b, s_t, s_d, T: tl. constexpr, D: tl.constexpr, BT: tl.constexpr, BD: tl.constexpr): i_d, i_b = tl.program_id(0), tl.program_id(1) o_d = i_d * BD + tl.arange(0, BD) mask = o_d < D for i_t in range(tl.cdiv(T, BT) - 1, -1, -1): p_g = ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/hgrn/chunk.py
943d5d1b-75b2-49d6-8775-f5cd28ee9e60
cumsum.py
sustcsonglin/flash-linear-attention
fla/ops/utils/cumsum.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BT': 16}, num_warps=2), triton. Config({'BT': 32}, num_warps=4), triton.Config({'BT': 32}, num_warps=2), triton.Config({'BT': 64}, num_warps=8), triton.Config({'BT': 64}, num_warps=4)], ke...
{ "Data Type": [ "fp32" ], "Functionality": [], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/cumsum.py
d4e4674a-0ac2-49d8-bf16-e5324188a47b
triton_ops.py
huyz2023/2by4-pretrain
sparse/triton_ops.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _soft_threshold24_triton(dense_ptr, sparse_ptr, mask_ptr, dense_row_stride, sparse_row_stride, mask_row_stride, dense_col_stride, sparse_col_stride, mask_col_stride, m, k, BLOCK_SIZE: tl.constexpr, ARRAY_LAYOUT: tl.constexpr): if ARRAY_LAYOUT == 'row': row_idx = tl.program_id(0) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/triton_ops.py
05304651-6ea3-4b33-a724-8242f59e5ec0
mamba_ssm.py
Charlie-XIAO/sparse-vllm
vllm/model_executor/layers/mamba/ops/mamba_ssm.py
d228909a30b0c245c35417fb7d2acdf9a3690042
0
@triton.jit def softplus(dt): dt = tl.where(dt <= 20.0, tl.math.log1p(tl.exp(dt)), dt) return dt
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/Charlie-XIAO/sparse-vllm/blob/d228909a30b0c245c35417fb7d2acdf9a3690042/vllm/model_executor/layers/mamba/ops/mamba_ssm.py
a24a6db0-d013-472f-aa2f-4b7f7c770497
causal_product_bwd.py
calclavia/Triton-Transformer
ttx/attention/causal_product_bwd.py
d1d1e5b5651cf7959866b0198d90a665e1f45354
0
@triton.jit def causal_product_bwd_kernel(q_ptr, k_ptr, v_ptr, grad_out, grad_Q_ptr, grad_K_ptr, grad_V_ptr, batch, length, dim, vdim, **meta): BLOCK_SIZE = meta['BLOCK_SIZE'] pid = tl.program_id(axis=0) state = tl.zeros((BLOCK_SIZE, BLOCK_SIZE), dtype=tl.float32) cur_qk_pos = pid * matrix_size * di...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation" ], "Memory Access Pattern": [ "Tiled", "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/calclavia/Triton-Transformer/blob/d1d1e5b5651cf7959866b0198d90a665e1f45354/ttx/attention/causal_product_bwd.py
e1a91636-50d2-4089-a5a6-18102bcab37e
k_layer_norm.py
cpuhrsch/torchfused
torchfused/triton/k_layer_norm.py
6c40ed160dcecbe7825f268f7c86bccd359e0ebf
0
@triton.jit def _layer_norm_fw(X, Y, W, B, M, V, stride, N, eps, **META): """ Fused layernorm kernel over a 3d tensor. The layer norm is applied over the last dimension. Compute y = (x - E(x))/(sqrt(var(x) + epsilon)) * gamma + beta """ y = _layer_norm_non_affine(X, M, V, stride, N, eps...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/cpuhrsch/torchfused/blob/6c40ed160dcecbe7825f268f7c86bccd359e0ebf/torchfused/triton/k_layer_norm.py
9bdd2ff5-9f28-4614-bdb9-b519f0ff99ea
paged_attn_v1.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/paged_attn_v1.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _single_query_cached_kv_attention_v1(out, q, k_cache, v_cache, head_mapping, scale, block_tables, seq_lens, max_num_blocks_per_seq, stride_qm, stride_qn, stride_om, stride_on, stride_km, stride_kn, stride_kk, SLOT_SIZE: tl.constexpr, HEAD_SIZE: tl.constexpr): head_idx = tl.program_id(axi...
{ "Data Type": [ "fp16" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn_v1.py
2bb44c20-7403-4987-8920-de61d4b20097
triton_kernels.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/triton_kernels.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def _triton_second_order_bwd(x_ptr: tl.tensor, y_ptr: tl.tensor, z_ptr: tl. tensor, g_x_ptr: tl.tensor, g_y_ptr: tl.tensor, g_z_ptr: tl.tensor, g_1_0_ptr: tl.tensor, g_1_1_ptr: tl.tensor, g_1_2_ptr: tl.tensor, g_2_0_ptr: tl.tensor, g_2_1_ptr: tl.tensor, g_2_2_ptr: tl.tensor, g_2_3_ptr: tl.te...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/triton_kernels.py
cc1b6b08-4b84-41f0-8801-561eb1ccdb1d
kernels.py
pytorch-labs/tritonbench
tritonbench/operators/jagged_mean/kernels.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_RAGGED': b_r, 'BLOCK_SIZE_M': b_m}, num_warps=w, num_stages=s) for b_r, b_m, w, s in itertools.product(BLOCK_SIZES_RAGGED, BLOCK_SIZES_M, NUM_WARPS, NUM_STAGES)], key=['M']) @triton.jit def triton_jagged_mean_kernel_variable_length_loop_buffer_then_sum( ...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/jagged_mean/kernels.py
c2c30b99-5b11-48aa-a966-7d545ba2a465
cvmm.py
dtadpole/nanoGPT_lightning
cvmm.py
5db66f7714a9a40191f4f208ecbb650ad8c93cc6
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 64, 'BLOCK_SIZE_N': 64, 'BLOCK_SIZE_K': 16, 'GROUP_SIZE_M': 8, 'K_BLOCKS': 64}, num_stages= 4, num_warps=4), triton.Config({'BLOCK_SIZE_M': 64, 'BLOCK_SIZE_N': 64, 'BLOCK_SIZE_K': 16, 'GROUP_SIZE_M': 8, 'K_BLOCKS': 32}, num_stages=4, num_warps=4),...
{ "Data Type": [ "fp16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/dtadpole/nanoGPT_lightning/blob/5db66f7714a9a40191f4f208ecbb650ad8c93cc6/cvmm.py
fbb2a0d9-7c7c-42af-8046-40b931ce9c09
flash_triton.py
MayDomine/Burst-Attention
burst_attn/flash_triton.py
b088c554072935074ea9c643de5ee363be5ab1f6
0
@triton.autotune(configs=[triton.Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'SEQUENCE_PARALLEL': False}, num_warps=8, num_stages=1, pre_hook= init_to_zero('DQ')), triton.Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'SEQUENCE_PARALLEL': True}, num_warps=8, num_stages=1, pre_hook= init_to_zero('DQ'))], key=['CACH...
{ "Data Type": [ "fp16" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "Apache" ]
https://github.com/MayDomine/Burst-Attention/blob/b088c554072935074ea9c643de5ee363be5ab1f6/burst_attn/flash_triton.py
cbbfcf20-c932-4670-846d-fb6982e7b184
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/delta_rule/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BK': BK, 'BV': BV}, num_warps= num_warps, num_stages=num_stages) for BK, BV in [(32, 64), (64, 32), ( 64, 64), (64, 128), (128, 64)] for num_warps in [1, 2, 4] for num_stages in [2, 3, 4]]...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/delta_rule/chunk.py
a3bb1f0d-12d4-4f1f-af81-35201c7a5bc1
gemm_streamk_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py
6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2
0
@triton.jit def linear_tile(tile_id, M: tl.constexpr, N: tl.constexpr, K: tl.constexpr, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr): pid_m = tile_id // tl.cdiv(N, BLOCK_SIZE_N) pid_n = tile_id % tl.cdiv(N, BLOCK_SIZE_N) return pid_m...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Memory-Bound" ] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py
f1703945-6176-40cb-8eaf-73d5f402dbbb
sb_varlen_fwd.py
shawntan/stickbreaking-attention
stickbreaking_attention/sb_varlen/sb_varlen_fwd.py
8dd32ad5e58f0ee0232fd4782dc53d354ff8d283
0
@triton.jit def _forward_one_row(seq_block_id, seq_length, qk_scale, M_range, N_range, D_range, D_mask, cm, Q_head_seq_ptr, stride_qm, stride_qd: tl.constexpr, K_head_seq_ptr, stride_kn, stride_kd: tl.constexpr, V_head_seq_ptr, stride_vn, stride_vd: tl.constexpr, O_head_seq_ptr, stride_om, stride_od: tl...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops", "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", "High Throughput" ...
[ "Apache" ]
https://github.com/shawntan/stickbreaking-attention/blob/8dd32ad5e58f0ee0232fd4782dc53d354ff8d283/stickbreaking_attention/sb_varlen/sb_varlen_fwd.py
4655e66d-50dd-4e01-87a7-dbc096fc693b
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/generalized_delta_rule/iplr/fused_recurrent.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def fused_recurrent_fwd_kernel(q, k, v, alpha, beta, o, ha, h0, ht, s_k_h, s_v_h, scale, B, H, T, K: tl.constexpr, V: tl.constexpr, BK: tl. constexpr, BV: tl.constexpr, USE_INITIAL_STATE: tl.constexpr, STORE_FINAL_STATE: tl.constexpr): i_v, i_k, i_bh = tl.program_id(0), tl.program_id(1), tl....
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access", "Register Intensive" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/generalized_delta_rule/iplr/fused_recurrent.py
5400e181-7552-4332-b506-bdb00f476d7a
layer_norm_kernels.py
BobMcDear/attorch
attorch/layer_norm_kernels.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.autotune(configs=warps_kernel_configs(), key=['batch_dim', 'feat_dim']) @triton.heuristics({'BLOCK_SIZE_BATCH': BLOCK_SIZE_BATCH_heuristic, 'BLOCK_SIZE_FEAT': lambda args: next_power_of_2(args['feat_dim'])}) @triton.jit def layer_norm_backward_kernel(output_grad_pointer, input_pointer, mean_pointer, inv...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups", "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ...
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/layer_norm_kernels.py