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
203cae00-18cd-4f73-9919-f4c8e964f077
kernels.py
pytorch-labs/tritonbench
tritonbench/operators/sum/kernels.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_K': b}, num_warps=w) for b, w in itertools.product([2, 4, 16, 32, 128, 256], [2, 4, 8])], key=['N']) @triton.jit def triton_sum_kernel_2D_result_dim_1(input_ptr, output_ptr, M: tl. constexpr, N: tl.constexpr, K: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, B...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/sum/kernels.py
683528ff-21dc-4e7c-be90-58e192bdd603
gemm_a16w8.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/gemm_a16w8.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _triton_gemm_a16w8_sub_channel_kernel(A, B, C, scale_b, bias, zero_points, M, N, K, stride_am, stride_ak, stride_bn, stride_bk, stride_cm, stride_cn, stride_zpk, stride_zpn, stride_scalek, stride_scalen, add_bias: tl.constexpr, add_zero_points: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/gemm_a16w8.py
c5831adf-3388-428d-9adb-9b92d80bed77
layernorm.py
sustcsonglin/flash-linear-attention
fla/modules/layernorm.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({}, num_warps=2), triton.Config({}, num_warps=4), triton.Config({}, num_warps=8), triton.Config({}, num_warps=16), triton.Config({}, num_warps=32)], key=['N', 'HAS_RESIDUAL', 'STORE_RESIDUAL_OUT', 'IS_RMS_NORM', 'HAS_BIAS']) @triton...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "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/fla/modules/layernorm.py
ec15a21e-2872-4637-b17e-81c3c60d4e50
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/gsa/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 in [32, 64] for BV in [32, 64] for num_warps in [2, 4, 8] for num_stages in [2, 3, 4]], key=['BT']) @triton.jit def chun...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access", "Transposed Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gsa/chunk.py
4b05f8aa-476d-4b90-b0cb-9c78955c0028
mlstm_scan.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_scan.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def reduce_mlstm_triton(F_REDUCED_IN, F_REDUCED_OUT, C, N, NH: tl.constexpr, D: tl.constexpr, NSB: tl.constexpr, BLOCK_SIZE: tl.constexpr): bh_id = tl.program_id(0) x_id = tl.program_id(1) y_id = tl.program_id(2) batch_id = bh_id // NH head_id = bh_id % NH nsb_range = tl.arange(0...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py
c775be82-a8e2-4755-9d15-d9d2fdf331a0
mlstm_scan.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_scan.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def roll_op(a1, b1_last, b1_cur, a2, b2_last, b2_cur): return a1 + a2, tl.where(a2 == 1, b1_cur, 0) + b2_last, b2_cur
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py
723fee45-0116-4b18-9403-354cfe2b1f3a
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def jagged_2_softmax_backward_kernel(grad_output_ptr, softmax_output_ptr, grad_input_ptr, offsets_row_ptr, offsets_col_ptr, offsets_overall_ptr, grad_output_stride, softmax_output_stride, grad_input_stride, transpose, max_seq_len_row: tl.constexpr, max_seq_len_col: tl.constexpr, BLOCK_SIZE: ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
59b8c65e-8a9d-4eb0-8a49-f36eda5a4381
kl.py
ardywibowo/triton-mode
kernels/kl.py
5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1
0
@triton.jit def triton_kl_forward(y_pred_ptr, y_pred_stride, y_true_ptr, y_true_stride, output_loss_ptr, output_loss_stride, num_classes, epsilon, BLOCK_SIZE: tl.constexpr, log_target: tl.constexpr=False, reduction_mode: tl. constexpr=REDUCE_BATCH_MEAN): row_id = tl.program_id(0).to(tl.int64) y_pred...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/ardywibowo/triton-mode/blob/5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1/kernels/kl.py
30740efe-faab-4c6a-a9da-b62c8d379e71
test.py
Aalanli/AMDGPUExperiments
test.py
2a6fd9e1e81d1916e3d87db4dda930e2fa417527
0
@triton.jit def test(at, bt, ct, k): midx = tl.arange(0, 32) kidx = tl.arange(0, 32) nidx = tl.arange(0, 32) aidx = midx[:, None] * 32 + kidx[None, :] bidx = kidx[:, None] * 32 + nidx[None, :] cidx = midx[:, None] * 32 + nidx[None, :] a_ptrs = at + aidx b_ptrs = bt + bidx c_ptrs = ct...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/Aalanli/AMDGPUExperiments/blob/2a6fd9e1e81d1916e3d87db4dda930e2fa417527/test.py
f7119a9c-0bf5-469a-844f-759f16760205
fused_rotary_emb.py
tascj/kaggle-lmsys-chatbot-arena
human_pref/inference/ops/fused_rotary_emb.py
83cd93d50b9283c18711e8c63e4e1c6399c7b9ce
0
@wrap_jit_func(type_hint=dict(Q=Tensor, K=Tensor, PostionIds=Tensor, InvFreq=Tensor, scaling_factor=float, OutQ=Tensor, OutK=Tensor, stride_bq=int, stride_sq=int, stride_hq=int, stride_dq=int, stride_bk= int, stride_sk=int, stride_hk=int, stride_dk=int, stride_bp=int, stride_sp=int, max_seq_len=int, BLO...
{ "Data Type": [ "fp32", "fp16", "bf16" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "Hig...
[ "Apache" ]
https://github.com/tascj/kaggle-lmsys-chatbot-arena/blob/83cd93d50b9283c18711e8c63e4e1c6399c7b9ce/human_pref/inference/ops/fused_rotary_emb.py
4efaee35-c75d-4f5c-8424-f258ebfd3ef4
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_fwd_kernel_o(q, v, g, h, o, A, offsets, ind...
{ "Data Type": [ "fp32", "bf16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "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
2d261111-e9c4-4247-abba-85e8407ab595
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _multi_head_jagged_flash_attention_fwd_kernel(q_ptr, k_ptr, v_ptr, offset_ptr, o_ptr, lse_i_ptr, stride_qh, stride_qm, stride_qd, stride_kh, stride_kn, stride_kd, stride_vh, stride_vn, stride_vd, stride_oh, stride_om, stride_od, stride_lse_h, num_heads: tl.constexpr, max_seq_len: tl.cons...
{ "Data Type": [ "fp32", "bf16" ], "Functionality": [ "Attention Mechanisms", "Softmax", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings", "Grid-Stride Loops" ], "Performance Objective": [ "Comput...
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
aa5c6a98-da4b-4b90-9be0-e4a00ab26b49
mlstm_matmul.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_matmul.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def mlstm_matmul_kernel_backward_db(dH, Q, K, V, F, I, M, B, dB, 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 * S * D + head_id * S...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_matmul.py
03082872-4113-4a3f-8432-9b3df03409c0
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({'BK': BK}, num_warps=num_warps, num_stages=num_stages) for BK in [32, 64] for num_warps in [1, 2, 4, 8] for num_stages in [2, 3, 4]], key=['BC']) @triton.jit def chunk_rwkv6_fwd_A_kernel_intra_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks", "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Thr...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py
af45c3e7-e57c-45df-8d0a-061adf132ddc
kernels.py
pytorch-labs/tritonbench
tritonbench/operators/jagged_sum/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, BLOCK_SIZES, NUM_WARPS, NUM_STAGES)], key=['M']) @triton.jit def triton_jagged_sum_kernel_variable_length_loop_buffer_then_sum( input_p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/jagged_sum/kernels.py
7505340d-3573-43b3-becd-e287423981c1
triton_flash_attention.py
IBM/vllm
vllm/attention/ops/triton_flash_attention.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def load_fn(block_ptr, first, second, pad): if first and second: tensor = tl.load(block_ptr, boundary_check=(0, 1), padding_option=pad) elif first: tensor = tl.load(block_ptr, boundary_check=(0,), padding_option=pad) elif second: tensor = tl.load(block_ptr, boundary_check...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Memory-Bound" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/attention/ops/triton_flash_attention.py
feab1add-a03a-45e1-9a8b-92ffbf911c83
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/based/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def parallel_based_fwd_kernel(q, k, v, o, z, 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): i_kv, i_c, i_bh = tl.program_id(0), tl...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/based/parallel.py
84ed0301-81a1-45f6-b51b-ce832f2a056f
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), triton.Config({}, num_warps=8)], key=['BT', 'BK', 'BV']) @triton.jit def chunk_simple_gla_bwd_kernel_dqkg(q, k, v, h, g, do, dh, dq, dk, dg, offsets, indices, scale, B: tl.cons...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ]...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/simple_gla/chunk.py
35265897-fe76-4437-a48d-a82641778823
hilbert.py
Kitsunetic/space-filling-pytorch
space_filling_pytorch/functional/hilbert.py
0de955ad1036973ee7506c5a0124c208acec722d
0
@triton.jit def _encode_hilbert_kernel(xyz_ptr, code_ptr, B, N, space_size, x_offset, y_offset, z_offset, str_xyz_B, str_xyz_N, str_xyz_C, BLK: tl.constexpr, ASSIGN_BATCH_INDEX: tl.constexpr): pid_b = tl.program_id(0) pid_n = tl.program_id(1) offs_n = pid_n * BLK + tl.arange(0, BLK) mask_n = off...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/Kitsunetic/space-filling-pytorch/blob/0de955ad1036973ee7506c5a0124c208acec722d/space_filling_pytorch/functional/hilbert.py
f7e0aaee-d0e9-4cb0-8788-587e3a9bf44c
triton_flash_attention.py
IBM/vllm
vllm/attention/ops/triton_flash_attention.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def _attn_fwd_inner(acc, l_i, m_i, q, K_block_ptr, V_block_ptr, start_m, actual_seqlen_k, dropout_p, philox_seed, batch_philox_offset, encoded_softmax_block_ptr, block_min, block_max, offs_n_causal, masked_blocks, n_extra_tokens, bias_ptr, IS_CAUSAL: tl.constexpr, BLOCK_M: tl.constexpr, BLOC...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/attention/ops/triton_flash_attention.py
49a964a1-bf73-4726-98df-82a3e693bd2f
fp8_gemm.py
pytorch/FBGEMM
fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.autotune(configs=MATMUL_CONFIGS + [Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'BLOCK_K': 128, 'SPLIT_K': 1}, num_stages=3, num_warps= 8)], key=['m_key', 'n_key', 'k_key']) @triton.heuristics({'EVEN_K': lambda args: args['K'] % (args['BLOCK_K'] * args['SPLIT_K']) == 0}) @triton.jit def _kernel_matmul_fp...
{ "Data Type": [], "Functionality": [ "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
1c6094ba-7870-44ef-a8cd-0333dd051641
activations.py
sustcsonglin/flash-linear-attention
fla/modules/activations.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({}, num_warps=2), triton.Config({}, num_warps=4), triton.Config({}, num_warps=8), triton.Config({}, num_warps=16), triton.Config({}, num_warps=32)], key=['D']) @triton.jit def logsigmoid_fwd_kernel(x, y, temperature, T: tl.constexpr, D:...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/activations.py
7de4e638-bcf1-4f0d-ae73-3e9eb9ad0241
transposable_semi_structured.py
huyz2023/2by4-pretrain
sparse/transposable_semi_structured.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _to_transposable_sparse_semi_structured_kernel(dense_ptr, sparse_ptr, mask_raw_ptr, mask_ptr, dense_row_stride, dense_col_stride, sparse_row_stride, sparse_col_stride, mask_raw_row_stride, mask_raw_col_stride, mask_row_stride, mask_col_stride, m, k, n, abs, BLOCK_SIZE: tl.constexpr): ...
{ "Data Type": [], "Functionality": [ "Top-K Selection", "Elementwise Operations" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/transposable_semi_structured.py
7b3ef975-67fb-4aaf-98b2-e7dc5ae1976a
prefix_prefill.py
IBM/vllm
vllm/attention/ops/prefix_prefill.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def _fwd_kernel_flash_attn_v2(Q, K, V, K_cache, V_cache, B_Loc, sm_scale, B_Start_Loc, B_Seqlen, B_Ctxlen, block_size, x, Out, stride_b_loc_b, stride_b_loc_s, stride_qbs, stride_qh, stride_qd, stride_kbs, stride_kh, stride_kd, stride_vbs, stride_vh, stride_vd, stride_obs, stride_oh, stride_o...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/attention/ops/prefix_prefill.py
6d49d736-8ea9-4cd8-ba62-bcb2f44902ea
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_bwd_kernel_intra_K(v, z, do, dA, s_v_h, s_v_t, s_v_d, scale, T: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BC: tl.constexpr, BV: tl.constexpr, NC: tl.constexpr): i_v, 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 % ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ]...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
abbc7553-4ca9-4830-a5ff-405e42b5cd6b
rwkv_log.py
berlino/seq_icl
src/models/sequence/rnn/scan_triton/rwkv_log.py
9b9223d15348b5a415fb453ed988ed5f7ab9fbdc
0
@triton.jit def logsubexp(a, b, log_eps: tl.constexpr): max_ab = tl.maximum(tl.maximum(a, b), log_eps) return max_ab + tl.log(tl.exp(a - max_ab) - tl.exp(b - max_ab))
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "Apache" ]
https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/rwkv_log.py
a1e6cbbe-2b59-4e14-81c5-dd969b3c4059
triton_fused_attention.py
pytorch-labs/tritonbench
tritonbench/kernels/triton_fused_attention.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(list(filter(keep, configsTmaWSPersistent)), key=['N_CTX']) @triton.jit def _attn_fwd_tma_ws_persistent(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_v...
{ "Data Type": [], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Persistent Kernels" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/kernels/triton_fused_attention.py
4e993c1c-6857-48f0-95ea-0de66ed768a8
avgpool.py
neuro-ml/kerops
kerops/kernels/avgpool.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _AvgPoolCeilStats_cl3d_backward_impl(Inpgrad_ptr, Outgrad_ptr, Output_ptr, Meangrad_ptr, Sqmeangrad_ptr, h_outgrad, w_outgrad, d_outgrad, d_inpgrad, batch_stride_outgrad, H_stride_outgrad, W_stride_outgrad, batch_stride_inpgrad, H_stride_inpgrad, W_stride_inpgrad, numel_no_channels_inpgr...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/avgpool.py
d2863f4d-a943-457c-8fe8-8bab49d63b2d
chunk_h_parallel.py
sustcsonglin/flash-linear-attention
fla/ops/common/chunk_h_parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'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 in [32, 64, 128] for BV in [32, 64, 128] for num_warps in ...
{ "Data Type": [], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/common/chunk_h_parallel.py
e88a9daf-61e9-4aae-bbd8-4d5f74361199
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/simple_gla/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'NV': lambda args: triton.cdiv(args['V'], args['BV'])}) @triton.jit def parallel_simple_gla_bwd_kernel(q, k, v, g, do, dq, dk, dv, dg, s_k_h, s_k_t, s_v_h, s_v_t, scale, B: tl.constexpr, H: tl.constexpr, T: tl. constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BS: tl. conste...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Attention Mechanisms" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/simple_gla/parallel.py
ba44918d-689f-49fc-8bc9-8cd9eb5ecc57
gelu_and_mul.py
tascj/kaggle-lmsys-chatbot-arena
human_pref/inference/ops/gelu_and_mul.py
83cd93d50b9283c18711e8c63e4e1c6399c7b9ce
0
@triton.jit def _gelu_and_mul_kernel(input_ptr, stride_input_m, stride_input_n, stride_output_m, stride_output_n, size_m, size_n, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr): tid = tl.program_id(0) input_m_offsets = tid * BLOCK_M + tl.arange(0, BLOCK_M) output_m_offsets = tid * BLOCK_M + tl.arange...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/tascj/kaggle-lmsys-chatbot-arena/blob/83cd93d50b9283c18711e8c63e4e1c6399c7b9ce/human_pref/inference/ops/gelu_and_mul.py
db060ba9-fe89-418b-807d-5beda14cd648
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/delta_rule/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'OUTPUT_ATTENTIONS': lambda args: args['attn'] is not None} ) @triton.jit def parallel_delta_rule_fwd_kernel(q, k, k2, v, beta, o, o_new, attn, s_k_h, s_k_t, s_v_h, s_v_t, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BS: tl.constexpr, BK: tl.constexpr, BV: tl.cons...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/delta_rule/parallel.py
520e593c-f72d-4d79-8df6-fa4beed24ea7
fp8_gemm.py
pytorch/FBGEMM
fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.autotune(configs=[Config({'BLOCK_M': 128, 'BLOCK_N': 256, 'BLOCK_K': 128, 'SPLIT_K': 1}, num_stages=3, num_warps=8), Config({'BLOCK_M': 256, 'BLOCK_N': 128, 'BLOCK_K': 128, 'SPLIT_K': 1}, num_stages=3, num_warps= 8), Config({'BLOCK_M': 256, 'BLOCK_N': 64, 'BLOCK_K': 128, 'SPLIT_K': 1 }, num_stag...
{ "Data Type": [], "Functionality": [ "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Persistent Kernels" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
d240495b-66c0-479d-a4bb-97581826f003
mhmoe.py
dtadpole/triton-playground
mhmoe.py
2d317976722d63080133b1bf88b1f0cdec98f831
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_B': 32, 'BLOCK_SIZE_E': 32}, num_stages=4, num_warps=4), triton.Config({'BLOCK_SIZE_B': 64, 'BLOCK_SIZE_E': 32}, num_stages=4, num_warps=4), triton.Config({ 'BLOCK_SIZE_B': 32, 'BLOCK_SIZE_E': 64}, num_stages=3, num_warps=4), triton.Config({'BLOCK_SIZ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe.py
d3df060f-25ae-4f53-8fb1-4c7cff1669ee
quantize.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/triton/quantize.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _kernel_dequantize_mx4(A, mx4_lookup_table, out, M, GROUPS_PER_THREAD, GROUP_SIZE: tl.constexpr, GROUP_LOAD: tl.constexpr, USE_INT64: tl.constexpr ) ->None: """Dequantize a packed MX4 tensor and apply scaling. Args: A (Tensor): [M] MX4 tensor packed into int8. shared_exp...
{ "Data Type": [ "int8", "fp32" ], "Functionality": [ "Quantization", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Memory-Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/quantize.py
9f4731c2-0c44-4143-a92f-bcfed7921b0a
normalization.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/normalization.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def triton_normalization_backward_kernel_1(grad_input_ptr, grad_output_ptr, grad_weight_partial_ptr, grad_bias_partial_ptr, output_ptr, weight_ptr, bias_ptr, inv_var_ptr, n_cols, n_rows, has_bias: tl.constexpr, zero_centered: tl.constexpr, block_size: tl.constexpr, block_size_row: tl.constex...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/normalization.py
5a3b3d77-505a-428b-9f7e-43a71233c09b
fp8_matmul.py
drisspg/transformer_nuggets
transformer_nuggets/fp8/fp8_matmul.py
a4c66bbeebaa479ad8b6ed82d7efbafa41b17260
0
@triton.jit def matmul_kernel_tma_persistent(a_desc_ptr, a_scale_ptr, b_desc_ptr, b_scale_ptr, c_desc_ptr, M, N, K, stride_a_scale_m, stride_b_scale_n, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr, NUM_SMS: tl.constexpr, output_dtype: tl....
{ "Data Type": [], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Persistent Kernels" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/fp8/fp8_matmul.py
40bd775e-ef2e-4eda-8c59-25ebdea73d19
RzLinearBackward.py
apd10/RzLinear
python/rz_linear/impl/RzLinearBackward.py
eb56657b2de0a97f398f88af421b0fbcbc5469c9
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K': 256, 'BLOCK_SIZE_M': 32}, num_stages=3, num_warps=8), triton.Config({'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 128, 'BLOCK_SIZE_M': 32}, num_stages=3, num_warps=8), triton.Config({'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K': 256, 'BLOCK_SI...
{ "Data Type": [], "Functionality": [ "Matrix Multiplication", "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearBackward.py
0657cbe4-31fe-41a2-aee4-95f95ff84d3e
masks.py
drisspg/transformer_nuggets
transformer_nuggets/flash/masks.py
a4c66bbeebaa479ad8b6ed82d7efbafa41b17260
0
@triton.jit def causal_mask_triton(score, batch, head, seq_len_q, seq_len_kv): score = tl.where(seq_len_q >= seq_len_kv, score, float('-inf')) return score
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/flash/masks.py
40cd1d4b-831e-4e99-84f0-0996d5aa95be
bwd_split_kernel.py
ROCm/aotriton
test/bwd_split_kernel.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.jit def dot(BLOCK_M: tl.constexpr, QDIM: tl.constexpr, KDIM: tl.constexpr, q, k): if BLOCK_M == 1: return tl.sum(tl.view(q, [QDIM]) * tl.view(k, [KDIM])) else: return tl.dot(q, k)
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/test/bwd_split_kernel.py
17bb60bc-fa4c-439e-b572-df79bd2eeab3
triton_fused_attn2.py
LouChao98/vqtree
ops/triton_fused_attn2.py
27a53274df7a804bce27dffcce5f5be73f64b6f3
0
@triton.heuristics({'EVEN_M': lambda args: args['seqlen_q'] % args[ 'BLOCK_M'] == 0, 'EVEN_N': lambda args: args['seqlen_k'] % args[ 'BLOCK_N'] == 0}) @triton.jit def _fwd_kernel(Q, K, V, Out, softmax_scale, stride_qb, stride_qh, stride_qm, stride_kb, stride_kh, stride_kn, stride_vb, stride_vh, stride_v...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/LouChao98/vqtree/blob/27a53274df7a804bce27dffcce5f5be73f64b6f3/ops/triton_fused_attn2.py
2186ae8f-a1c1-4eda-9e86-5e9dad2b7585
tuned_bwd.py
ROCm/aotriton
tritonsrc/tuned_bwd.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.autotune(configs=TRITON_CONFIG_LIST_BWD, key=['BLOCK_DMODEL', 'max_seqlen_q', 'max_seqlen_k']) @triton.jit def tuned_bwd_kernel_dq(Q, K, V, B, sm_scale, Out, DO, DQ, DB, L, D, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn, stride_kk, stride_vz, stride_vh, stride_vk, str...
{ "Data Type": [ "fp32", "int8" ], "Functionality": [ "Quantization", "Backpropagation" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/tuned_bwd.py
0e6f0fcf-9cae-4955-907d-a1026597b579
RzLinearForward.py
apd10/RzLinear
python/rz_linear/impl/RzLinearForward.py
eb56657b2de0a97f398f88af421b0fbcbc5469c9
0
@triton.jit def rz_linear_forward_core(a_ptr, b_ptr, c_ptr, init_factor, M: int, N: int, K: int, H: int, stride_am, stride_ak, stride_cm, stride_cn, allow_tf32: tl.constexpr, R7: int, R6: int, R5: int, R4: int, R3: int, R2: int, R1: int, R0: int, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, B...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearForward.py
f66b57d6-8434-4700-927a-a112b18f64e5
cross_entropy.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/cross_entropy.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def triton_cross_entropy_forward_backward_kernel(logits_ptr, labels_ptr, grad_logits_ptr, losses_ptr, grad_losses, n_cols, logits_stride_0, grad_logits_stride_0, logits_scale_factor: tl.constexpr, block_size: tl .constexpr): block_idx = tl.program_id(0).to(tl.int64) col_offsets = tl.aran...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/cross_entropy.py
dc459f02-1c1e-4b41-baca-462de7e6a012
ops.py
srush/triton-autodiff
triton_autodiff/ops.py
f9d1a04d048e3252bfd222646db7175ad60a3c7c
0
@triton.jit def zeroslike(x): return tl.zeros(x.shape, tl.float32)
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/srush/triton-autodiff/blob/f9d1a04d048e3252bfd222646db7175ad60a3c7c/triton_autodiff/ops.py
2af621bf-a5fd-4ee0-a77d-7c7225403ab3
sparse_copy.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/sparse_copy.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def copy_sparse_to_dense_kernel(input_ptr, output_ptr, scores_ptr, sparse_rows_ptr, num_columns: tl.constexpr, num_experts_per_token: tl. constexpr, block_size: tl.constexpr): dense_row = tl.program_id(0) offsets = tl.arange(0, block_size) + block_size * tl.program_id(1) mask = None if n...
{ "Data Type": [ "fp32", "int8" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/sparse_copy.py
c6143804-3cfd-4d1f-ab60-f8d9dbef8b8b
kernels.py
pytorch-labs/tritonbench
tritonbench/operators/jagged_softmax/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_softmax_kernel_simple_fused_buffer_then_sum(input_p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/jagged_softmax/kernels.py
97976f05-d763-4664-a07a-d3f7a68ba825
rms_norm_kernels.py
BobMcDear/attorch
attorch/rms_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 rms_norm_backward_kernel(output_grad_pointer, input_pointer, inv_rms_pointer, we...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/rms_norm_kernels.py
617a6f86-5188-4419-b333-c0d0a02f6e0f
softmax_online_v2_spec_rev_evict.py
iclementine/optimize_softmax
softmax_online_v2_spec_rev_evict.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def softmax_kernel_online_v2(output_ptr, input_ptr, M, N, TILE_N: tl.constexpr ): pid_m = tl.program_id(0) m = tl.full((TILE_N,), value=-float('inf'), dtype=output_ptr.dtype. element_ty) z = tl.full((TILE_N,), value=0, dtype=output_ptr.dtype.element_ty) prev_multiple = prev_multi...
{ "Data Type": [], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_online_v2_spec_rev_evict.py
ac0acde3-97ef-443c-937e-f8500c232164
random_matrix.py
Forkxz/TritonDeepLearningKernel
kernel/dropconnect/random_matrix.py
add54b6318e8fa5fdbf8c7b47659de9fceaa5691
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 8, 'BLOCK_SIZE_N': 4, 'BLOCK_SIZE_K': 32})], key=['M', 'N', 'K']) @triton.jit def random_matrix_kernel(r_ptr, seed, M, K, N, stride_dm, stride_dk, stride_dn, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr): pid ...
{ "Data Type": [ "int8" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/Forkxz/TritonDeepLearningKernel/blob/add54b6318e8fa5fdbf8c7b47659de9fceaa5691/kernel/dropconnect/random_matrix.py
6670d8a8-c520-453d-87db-e31e9f5517c5
test_triton_basics.py
tucommenceapousser/xformers
tests/test_triton_basics.py
c97e3d917cfdad4a38acd4e9d776030d25ab9141
0
@triton.jit def k_mean(X, Mean, Var, stride, N, BLOCK_SIZE_N: tl.constexpr): """ 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 """ row = tl.program_id(0) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/tucommenceapousser/xformers/blob/c97e3d917cfdad4a38acd4e9d776030d25ab9141/tests/test_triton_basics.py
52ce8da6-a14c-4648-8839-2497e5c7cd47
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/rebased/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def parallel_rebased_fwd_kernel(q, k, v, o, z, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, scale, B, H, T, K: tl.constexpr, V: tl.constexpr, BTL: tl .constexpr, BTS: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr): i_kv, i_c, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) NV = t...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rebased/parallel.py
a2f2c846-80e3-4ee0-8813-8cc6f55128f3
sparse_optimizer.py
huyz2023/2by4-pretrain
sparse/sparse_optimizer.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.autotune(configs=get_configs(), key=['m']) @triton.jit def _inverse(F_ptr, out_ptr, F_row_stride, out_row_stride, F_col_stride, out_col_stride, F_page_stride, out_page_stride, m, BLOCK_SIZE: tl.constexpr ): row_idx = tl.program_id(0) * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE) mask = row_idx < m ...
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/sparse_optimizer.py
464215f1-3063-4a65-8777-6e5fd10319d0
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/fused_recurrent.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_INITIAL_STATE': lambda args: args['dh0'] is not None, '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)], key=['BK', 'BV']) @triton.jit def fused_recurrent_rw...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/fused_recurrent.py
9233b706-1ad9-479f-95dd-2f0d42a6e5fc
flash_4.py
LitingLin/LoRAT
trackit/runner/evaluation/distributed/tracker_evaluator/components/segmentation/segment_anything_fast/flash_4.py
d7515a51174b037f122ce4ac6c56d668b0ee152b
0
@triton.jit def _fwd_kernel_aligned(Q, K, V, B0, sm_scale, Out, stride_qh, stride_qm, stride_qk, stride_kh, stride_kn, stride_kk, stride_vh, stride_vk, stride_vn, stride_oh, stride_om, stride_on, stride_b0h, stride_b0m, Z, H, N_CTX, P_SEQ, OUT_DTYPE: tl.constexpr, BIAS_LAST_SIZE: tl.constexpr, B0_NUMEL:...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/LitingLin/LoRAT/blob/d7515a51174b037f122ce4ac6c56d668b0ee152b/trackit/runner/evaluation/distributed/tracker_evaluator/components/segmentation/segment_anything_fast/flash_4.py
f3027f3b-527d-4872-925c-33213b5e854d
outer_softmax_online.py
iclementine/optimize_softmax
outer_softmax_online.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def softmax_kernel_online(output_ptr, input_ptr, M, N, K, TILE_N: tl. constexpr, TILE_K: tl.constexpr): pid_k = tl.program_id(0) pid_m = tl.program_id(1) k_offsets = pid_k * TILE_K + tl.arange(0, TILE_K) m = tl.full([TILE_N, TILE_K], value=float('-inf'), dtype=tl.float32) z = tl.full...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/outer_softmax_online.py
df855118-c357-4a08-a639-b101eb791b9c
fused_recurrent.py
sustcsonglin/hope-fla
fla/ops/hope/fused_recurrent.py
0750c9a9a360fb72236dfaaaf21496959c5ef48d
0
@triton.jit def fused_recurrent_bwd_kernel(q, k, k_l2, dq, dk, dk_l2, dk_l2_partial_fwd, dk_l2_partial_bwd, dq_reflected, dk_reflected, T, D: tl.constexpr, BK: tl.constexpr): i_b, i_h = tl.program_id(0), tl.program_id(1) d_h = tl.zeros([BK, BK], dtype=tl.float32) offset = i_b * T * D + i_h * BK + tl...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/hope-fla/blob/0750c9a9a360fb72236dfaaaf21496959c5ef48d/fla/ops/hope/fused_recurrent.py
2f55269a-e5f4-4bb7-88a8-6d4fb70c6ff0
rope.py
dame-cell/Triformer
triformer/rope.py
0712537d576166b93fa09aa9509b2661b9ed8a68
0
@triton.heuristics({'BACKWARD_PASS': lambda args: bool(args['BACKWARD_PASS'])}) @triton.jit def _rope_embedding(Q, Q_row_stride, cos, cos_row_stride, sin, sin_row_stride, seqlen, head_dim: tl.constexpr, n_heads: tl.constexpr, BACKWARD_PASS: tl.constexpr, BLOCK_SIZE: tl.constexpr): """ Calculates the...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/rope.py
0556f753-1a94-4e65-a541-a0d3c5e13c41
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": [ "Elementwise Operations" ], "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
11947c31-82e7-420d-82ef-4b852131022a
rmsnorm.py
ardywibowo/triton-mode
kernels/rmsnorm.py
5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1
0
@triton.jit def triton_rmsnorm_forward(Y_ptr, Y_row_stride, X_ptr, X_row_stride, W_ptr, RSTD_ptr, RSTD_row_stride, n_cols, eps, offset, BLOCK_SIZE: tl.constexpr): row_idx = tl.program_id(0) col_offsets = tl.arange(0, BLOCK_SIZE) mask = col_offsets < n_cols Y_ptr += row_idx * Y_row_stride X_ptr +...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ardywibowo/triton-mode/blob/5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1/kernels/rmsnorm.py
c11fd5e3-13e4-4c89-b431-45f0b4f5fe6c
linear.py
neuro-ml/kerops
kerops/kernels/linear.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _ReLULinearAddBackward(input_ptr, grad_ptr, input_grad_ptr, weight_ptr, weight_grad_ptr, numel_no_channels, in_channels: tl.constexpr, out_channels: tl.constexpr, D_block: tl.constexpr, _ILP: tl.constexpr): pid = tl.program_id(0) input_ptr += pid * _ILP * in_channels * D_block grad_p...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Backpropagation", "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/linear.py
ffe33cc0-6fd8-45d2-bdf4-eedd126fdd10
flash_attention_fwd_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/flash_attention_fwd_benchmark.py
6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2
0
@triton.jit def _attn_fwd(Q, K, V, sm_scale, M, Out, stride_qz: tl.constexpr, stride_qh: tl.constexpr, stride_qm: tl.constexpr, stride_qk: tl.constexpr, stride_kz: tl.constexpr, stride_kh: tl.constexpr, stride_kn: tl. constexpr, stride_kk: tl.constexpr, stride_vz: tl.constexpr, stride_vh: tl.constexpr, ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/flash_attention_fwd_benchmark.py
6c2b085e-9a9b-4d4a-8365-f732191bf5c6
y_5.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_5.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def fifth_order_fwd(coord_ptr: tl.tensor, output_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl.constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr, output_stride: tl.constexpr): coord_stride = 3 block_id = tl.program_id(0) coord_striding = tl.arange(0, block_size)...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "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_5.py
a0b42e56-4bd9-44e8-83f0-ca330317f885
fp8_matmul.py
drisspg/transformer_nuggets
transformer_nuggets/fp8/fp8_matmul.py
a4c66bbeebaa479ad8b6ed82d7efbafa41b17260
0
@triton.jit def load_scales(a_scale_ptr, b_scale_ptr, ROW_WISE_SCALING: tl.constexpr): if ROW_WISE_SCALING: return a_scale_ptr, b_scale_ptr else: a_scale = tl.load(a_scale_ptr) b_scale = tl.load(b_scale_ptr) return a_scale, b_scale
{ "Data Type": [ "fp32" ], "Functionality": [], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Memory-Bound" ] }
[ "BSD" ]
https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/fp8/fp8_matmul.py