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
f4315a08-a5f0-461d-8704-8c3177daca71
attn_qk_int8_per_block_hd128_causal.py
rodjjo/editorium
editorium/app/server/pipelines/cogvideo/sageattention/attn_qk_int8_per_block_hd128_causal.py
7b92e2c92a144bf23bbe6fe88e3d513ffcf7d694
0
@triton.jit def _attn_fwd(Q, K, V, Q_scale, K_scale, 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, HEAD_DIM: tl.constexpr, BLOCK_M: tl. constexpr, BLOCK_N: ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/rodjjo/editorium/blob/7b92e2c92a144bf23bbe6fe88e3d513ffcf7d694/editorium/app/server/pipelines/cogvideo/sageattention/attn_qk_int8_per_block_hd128_causal.py
c29a2e86-f522-4cb9-9e23-8953c5a58d34
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, n_rows, n_cols, BLOCK_SIZE: tl.constexpr): col_idx = tl.program_id(0) row_idx = tl.arang...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/GELUglu.py
aed16229-3b7a-4b1c-8e82-17e1c95bb947
triton_jagged_tensor_ops.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/triton/jagged/triton_jagged_tensor_ops.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def triton_dense_to_jagged(jagged_value_ptr, jagged_offsets_ptr, jagged_value_row_stride: int, output_dense_ptr, dense_indices_ptr, dense_col_stride, dense_row_stride: int, dense_matrix_stride, JAGGED_DIM: tl.constexpr, thread_block_row_size: tl.constexpr, thread_block_col_size: tl.constexpr...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/jagged/triton_jagged_tensor_ops.py
935a82ae-0233-49d1-bc2a-756762601b08
triton_implicit_gemm.py
l1351868270/implicit_gemm.triton
triton_implicit_gemm.py
64eb8548ccf4576883c928f6315be8b24680a455
0
@triton.autotune(configs=get_autotune_config(), key=['N', 'C', 'H', 'W', 'K', 'P', 'Q', 'R', 'S', 'U', 'V', 'pad_h', 'pad_w', 'dila_h', 'dila_w']) @triton.jit def conv2d_kernel(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, BLOCK_SIZE_M: tl. const...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/l1351868270/implicit_gemm.triton/blob/64eb8548ccf4576883c928f6315be8b24680a455/triton_implicit_gemm.py
cd190af4-66fc-4636-9bc4-2a8357d80887
flash_attention.py
falkaer/multi-scale-music
seq/flash_attention.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.jit def causal_alibi_mask(slope, offs_m, offs_n, M, N, EVEN_M: tl.constexpr, EVEN_N: tl.constexpr): shift = N - M alibi = (offs_n[None, :] - offs_m[:, None] - shift) * slope mask = alibi <= 0 if not EVEN_M & EVEN_N: mask = mask & make_bounds(offs_m, offs_n, M, N, EVEN_M, EVEN_N) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "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/flash_attention.py
0a360c43-f9f2-46b3-bcbc-051ade3b0924
triton_fused_attention.py
pytorch-labs/tritonbench
tritonbench/kernels/triton_fused_attention.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.jit def _attn_fwd_compute(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, stride_om, stride_on, off_hz, pid, Z, H, N_CTX, BLOCK_M: ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/kernels/triton_fused_attention.py
9ea4a729-2b49-4f30-a3b7-315143733125
quant_triton.py
CompendiumLabs/ziggy
ziggy/backends/quant_triton.py
bd12fe50ca3475743f62ae26d4c184108e441e03
0
@triton.jit def dequantize_kernel(X, Y, N, K, K1, scale, zero_point, BITS: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, BLOCK_SIZE_K1: tl.constexpr): dtype = Y.dtype.element_ty scale_ty = tl.full((), scale, dtype=dtype) zero_point_ty = tl.full((), zero_point, dtype=dtype) ...
{ "Data Type": [ "uint8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Memory-Bound" ] }
[ "MIT" ]
https://github.com/CompendiumLabs/ziggy/blob/bd12fe50ca3475743f62ae26d4c184108e441e03/ziggy/backends/quant_triton.py
767c7fac-160a-4bf1-a459-648f00cc19be
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_fwd_kernel_h(k, v, z, h, h0, ht, 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, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr, NT: tl.constexpr, NORMK: tl.constexpr, USE_INITIAL_STATE: tl.constexpr, STORE...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access", "Transposed Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
b8c40fe7-a4c6-44cc-b7fe-36d33f96630e
ln_linear_triton_2.py
ethansmith2000/fused-layer-norm
ln_linear_triton_2.py
84fe243a829364acdcfd7cd70b699db04838af0f
0
@triton.jit def _layer_norm_fwd_fused(X_ptr, W_ptr, B_ptr, Mean_ptr, RSTD_ptr, stride, n_cols, eps, BLOCK_SIZE: tl.constexpr): row_idx = tl.program_id(0) col_offsets = tl.arange(0, BLOCK_SIZE) mask = col_offsets < n_cols X_ptr += row_idx * stride Mean_ptr += row_idx RSTD_ptr += row_idx X...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Batch-Oriented", "High Throughput" ] }
[ "MIT" ]
https://github.com/ethansmith2000/fused-layer-norm/blob/84fe243a829364acdcfd7cd70b699db04838af0f/ln_linear_triton_2.py
fc3fd787-4ea0-4a55-9c09-59fdb3df32dd
fp8_gemm.py
pytorch/FBGEMM
fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.autotune(configs=MATMUL_CONFIGS_NON_PERSISTENT, key=['M', 'N', 'K'], prune_configs_by={'early_config_prune': prune_configs, 'perf_model': None, 'top_k': None}, use_cuda_graph=True) @triton.heuristics({'EVEN_K': lambda args: args['K'] % (args['BLOCK_K'] * args['SPLIT_K']) == 0}) @triton.jit def _kern...
{ "Data Type": [], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Persistent Kernels" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
1831f041-03a2-4e24-a2de-415a1666eb42
attention.py
e-b-daniel/flash_attention_replication
attention.py
86ac6ecffcfb729201606840dc72da116751a43f
0
@triton.jit def _fwd_kernel(Q, K, V, sm_scale, L, M, Out, stride_head, stride_seq, hidden_dim, seq_len, Br: tl.constexpr, Bt: tl.constexpr, hidden: tl. constexpr): start_m = tl.program_id(0) off_hz = tl.program_id(1) offs_br = start_m * Br + tl.arange(0, Br) offs_bt = tl.arange(0, Bt) offs_d...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD" ]
https://github.com/e-b-daniel/flash_attention_replication/blob/86ac6ecffcfb729201606840dc72da116751a43f/attention.py
51de4fd6-86e7-4186-a066-d17def98e550
mhmoe.py
dtadpole/triton-playground
mhmoe.py
2d317976722d63080133b1bf88b1f0cdec98f831
0
@triton.jit def _mlp_wide_kernel_bwd_dw1w2(dw1, dw2, 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, strid...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe.py
92f2a427-dd63-44de-8442-1178d2139794
gemm.py
TiledTensor/TiledBench
benchs/python/gemm/triton/gemm.py
1191aecde1b29e0b7bb9ef1a06d0e156c1fce136
0
@triton.autotune(configs=[triton.Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'BLOCK_K': 64}, num_stages=3, num_warps=8), triton.Config({'BLOCK_M': 64, 'BLOCK_N': 256, 'BLOCK_K': 32}, num_stages=3, num_warps=8), triton. Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'BLOCK_K': 32}, num_stages=3, num_warps=8), trit...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Transposed Access", "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/TiledTensor/TiledBench/blob/1191aecde1b29e0b7bb9ef1a06d0e156c1fce136/benchs/python/gemm/triton/gemm.py
abd73d7c-d83a-4608-8687-11f67fd11608
gemm_streamk_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py
6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2
0
@triton.jit def swizzle_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): grid_m = tl.cdiv(M, BLOCK_SIZE_M) grid_n = tl.cdiv(N, BLOCK_SIZE_N) width = GROUP_SIZE_M * grid_n ...
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py
b7ea7c6d-cb9a-4a55-bf9c-8f193083482e
softmax_kernels.py
BobMcDear/attorch
attorch/softmax_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 softmax_backward_kernel(output_grad_pointer, output_pointer, input_grad_pointer,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/softmax_kernels.py
b2ad8a84-f1bc-4160-86c6-16c93aa73c9d
dynamic_quant.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/dynamic_quant.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _abs_max(val1, val2): val1_abs = tl.abs(val1) val2_abs = tl.abs(val2) if val1_abs >= val2_abs: return val1_abs else: return val2_abs
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/dynamic_quant.py
7cc562e7-5cf7-4828-8797-4dacdc2c7611
sgmv_expand.py
IBM/vllm
vllm/lora/ops/sgmv_expand.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def _sgmv_expand_kernel(input_ptr, lora_ptr, out_ptr, N, K, b_seq_start_loc, seq_lens, lora_indices, xm_stride, xk_stride, l0_stride, lora_k_stride, lora_n_stride, cm_stride, cn_stride, BLOCK_M: tl.constexpr, BLOCK_N: tl .constexpr, BLOCK_K: tl.constexpr, EVEN_K: tl.constexpr, ADD_INPUTS: tl ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/lora/ops/sgmv_expand.py
ed539db4-d433-434f-8d65-9170cc127c3b
triton_attention.py
pytorch-labs/tritonbench
tritonbench/operators/template_attention/triton_attention.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(configs=[triton.Config({'BLOCK_M': 128, 'BLOCK_N': 64, 'BLOCK_DMODEL': 64}, num_stages=3, num_warps=4)], key=['num_queries']) @triton.jit def triton_tem_fused_with_exp2(arg_Q, arg_K, arg_V, out_ptr0, num_queries: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, BLOCK_DMODEL: tl.c...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings", "Cooperative Groups" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/template_attention/triton_attention.py
065a20ba-b651-4f54-89ce-6c8b91a0e483
y_6.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_6.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def sixth_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": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_6.py
c57cca70-6e96-47ee-9f5c-ee9125d45b80
RzLinearBackward.py
apd10/RzLinear
python/rz_linear/impl/RzLinearBackward.py
eb56657b2de0a97f398f88af421b0fbcbc5469c9
0
@triton.jit def rz_linear_backward_input_grad_kernel_notune(a_ptr, b_ptr, c_ptr, init_factor, M, N, K, H, stride_am, stride_an, stride_cm, stride_ck, R7: int, R6: int, R5: int, R4: int, R3: int, R2: int, R1: int, R0: int, allow_tf32: tl.constexpr, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl. constexpr,...
{ "Data Type": [], "Functionality": [ "Backpropagation", "Matrix Multiplication" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearBackward.py
61065322-dd42-4a37-af64-ca295705d2b2
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_forward_kernel(input_pointer, weight_pointer, inv_rms_pointer, output_p...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Normalization", "Elementwise Operations" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/rms_norm_kernels.py
c9a38822-1126-4d55-bac7-f5990f7d18ec
mlp.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/mlp.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def triton_mlp_activation_backward_kernel(grad_output_ptr, grad_input_ptr, input_ptr, output_ptr, gated: tl.constexpr, activation_type: tl. constexpr, recompute: tl.constexpr, n_cols: tl.constexpr, block_size: tl.constexpr): row_idx = tl.program_id(0).to(tl.int64) columns = tl.program_id...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound", "Low Latency" ] }
[ "Apache" ]
https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/mlp.py
78c3a947-9a20-4a2d-b1c0-8cdcf8617d2f
paged_attn.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/paged_attn.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.autotune(configs=[triton.Config({}, num_stages=stages, num_warps= warps) for stages in [0, 1, 3, 4] for warps in [4, 8, 16]], key=[ 'QUERY_GROUP_SIZE', 'HEAD_SIZE', 'KV_BLOCK_SIZE']) @triton.jit def _paged_attn_w_mma_kernel(m_i_ptr, l_i_ptr, out_ptr, q_ptr, k_cache_ptr, v_cache_ptr, context_lens_ptr...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access", "Transposed Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Th...
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn.py
97731521-c61c-4321-aa31-93651e9adc55
_matmul.py
IBM/qattn
qattn/nn/functional/_matmul.py
07ceda0aceb9afd299d622325944c0c0471827fe
0
@triton.autotune(configs=int8_configs(), key=['M', 'N', 'K'], prune_configs_by={'early_config_prune': early_config_prune, 'perf_model': _estimate_matmul_time, 'top_k': 10}) @triton.heuristics({'EVEN_K': lambda args: args['K'] % args['BLOCK_K'] == 0}) @triton.jit def _kernel(A, B, C, bias, M, N, K, stride_am, st...
{ "Data Type": [ "int8" ], "Functionality": [ "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Strided Access", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughpu...
[ "MIT" ]
https://github.com/IBM/qattn/blob/07ceda0aceb9afd299d622325944c0c0471827fe/qattn/nn/functional/_matmul.py
b7fb0c98-69f2-48d3-a107-c7746602da7f
triton_fused_local_attn2.py
LouChao98/vqtree
ops/triton_fused_local_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, L, softmax_scale, stride_qb, stride_qh, stride_qm, stride_kb, stride_kh, stride_kn, stride_vb, stride_vh, strid...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/LouChao98/vqtree/blob/27a53274df7a804bce27dffcce5f5be73f64b6f3/ops/triton_fused_local_attn2.py
fa4480e1-677b-4342-962a-c8f709e3fe8b
triton_call_test.py
jax-ml/jax-triton
tests/triton_call_test.py
859cc392bec876d132bd0790ea6c00b6c246dd2b
0
@triton.jit def add_scalar_kernel(x_ptr, y, output_ptr): tl.store(output_ptr, tl.load(x_ptr) + y)
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency", "High Throughput" ] }
[ "Apache" ]
https://github.com/jax-ml/jax-triton/blob/859cc392bec876d132bd0790ea6c00b6c246dd2b/tests/triton_call_test.py
63cb7c43-5317-4ccc-88d2-92d74f1aa420
masked_load_store.py
ROCm/aotriton
tritonsrc/masked_load_store.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.jit def mstore2d(registers, REG_ROWS: tl.constexpr, REG_COLS: tl.constexpr, o_base, o_start_row, o_start_col, o_rows, o_cols, stride_row, stride_col): off_rows = tl.arange(0, REG_ROWS) + o_start_row off_cols = tl.arange(0, REG_COLS) + o_start_col o_ptrs = o_base + off_rows[:, None] * stride_row ...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops", "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/masked_load_store.py
5af2a241-3541-414f-90b4-b233dbb92a70
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, '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_rwkv6_bwd_kernel_inter(q, k, v, h, gi, ge, u, d...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops", "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py
5850800a-a6b5-4982-b610-acbd6bb5f405
paged_attn.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/paged_attn.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _inner_paged_attn_unroll_8_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, 8): offs_kv_0 = tl.load(block_ba...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax", "Matrix Multiplication" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ...
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn.py
b88cea39-85a6-4298-a841-7a49f83348ed
dequant.py
AutoGPTQ/AutoGPTQ
auto_gptq/nn_modules/triton_utils/dequant.py
6689349625de973b9ee3016c28c11f32acf7f02c
0
@triton.autotune(DEFAULT_DEQUANT_CONFIGS, key=['numels']) @triton.jit def dequant_kernel_248(g_idx_ptr, scales_ptr, qweight_ptr, qzeros_ptr, out_ptr, numels, maxq: tl.constexpr, bits: tl.constexpr, outfeatures: tl.constexpr, num_groups: tl.constexpr, X_BLOCK: tl.constexpr): xoffset = tl.program_id(0) * X_BL...
{ "Data Type": [ "int8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/AutoGPTQ/AutoGPTQ/blob/6689349625de973b9ee3016c28c11f32acf7f02c/auto_gptq/nn_modules/triton_utils/dequant.py
49d86003-ce5d-4605-a9f2-3f4ce9c8722f
fused_attention.py
bortkomencw/jax-triton
examples/fused_attention.py
abfc627619f36f289d72d61bb16e1c9a222d0609
0
@triton.jit def fused_attention_kernel(q_ptr, k_ptr, v_ptr, tmp_ptr, l_ptr, m_ptr, out_ptr, 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_kk: tl.constexpr, stride_kn: tl. constexpr, stride_vz: ...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "Apache" ]
https://github.com/bortkomencw/jax-triton/blob/abfc627619f36f289d72d61bb16e1c9a222d0609/examples/fused_attention.py
f2dadc40-d715-428a-a34d-6968f5971b95
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({}, num_warps=num_warps) for num_warps in [1, 2, 4]], key=['BT', 'BK', 'BV']) @triton.jit def chunk_delta_rule_bwd_kernel_dqkw(q, k, v, h, do, dh, dq, dk, dv, dw, offsets, indices, scale, T: tl....
{ "Data Type": [], "Functionality": [ "Backpropagation" ], "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/delta_rule/chunk.py
1541bbe9-40db-47b2-be52-64a94c59d7fe
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/fused_recurrent.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] 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_rwk...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks", "Backpropagation" ], "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/rwkv6/fused_recurrent.py
081c52c9-4bb1-427c-bd83-d90875518644
rwkv_log.py
berlino/seq_icl
src/models/sequence/rnn/scan_triton/rwkv_log.py
9b9223d15348b5a415fb453ed988ed5f7ab9fbdc
0
@triton.jit def wkv_triton_log_space_forward_kernel(w_ptr, w_s_c, u_ptr, u_s_c, k_ptr, k_s_b, k_s_t, k_s_c, v_ptr, v_s_b, v_s_t, v_s_c, state_ptr, state_s_b, state_s_abe, state_s_c, wkv_ptr, wkv_s_b, wkv_s_t, wkv_s_c, state_out_ptr, state_out_s_b, state_out_s_abe, state_out_s_t, state_out_s_c, chans, ts...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/rwkv_log.py
ad805737-e12a-4994-9da0-2020700b1dad
fp8_gemm.py
pytorch/FBGEMM
fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.autotune(configs=[Config({'BLOCK_SIZE': 512}), Config({'BLOCK_SIZE': 1024}), Config({'BLOCK_SIZE': 2048}), Config({'BLOCK_SIZE': 4096}), Config({'BLOCK_SIZE': 8192})], key=['N']) @triton.jit def _kernel_scale_fp8_row(A, x_scale, w_scale, scaled_out, M, N, stride_am, stride_an, stride_om, stride_on, ...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
fed5f596-06e2-4fbb-aadc-c5659115de85
_quantize.py
IBM/qattn
qattn/nn/functional/_quantize.py
07ceda0aceb9afd299d622325944c0c0471827fe
0
@triton.jit def quantize(x, scale, qmin, qmax) ->tl.tensor: """Quantize the tensor given quantization scale and data type. Args: x (tl.tensor): floating-point tensor scale (tl.tensor): quantization scale factor. qmin (Number): quantization minimum range. qmax (Number): quantizat...
{ "Data Type": [ "int8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/IBM/qattn/blob/07ceda0aceb9afd299d622325944c0c0471827fe/qattn/nn/functional/_quantize.py
1e3f0da1-6b39-42d3-9727-50923dfa01bf
masked_load_store.py
ROCm/aotriton
tritonsrc/masked_load_store.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.jit def mload1d(REGS: tl.constexpr, i_base, i_start, i_nums): offs = tl.arange(0, REGS) + i_start i_ptrs = i_base + offs overflow = i_start + REGS - i_nums i_ptrs_mask = tl.full([REGS], 1, dtype=tl.int1) i_ptrs_mask = i_ptrs_mask & (offs < i_nums) return tl.load(i_ptrs, mask=i_ptrs_mask,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Memory Bound" ] }
[ "MIT" ]
https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/masked_load_store.py
c4a78501-d4c6-4271-9b23-2445016fa667
mlstm_scan.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_scan.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def silu(x): return x * tl.sigmoid(x)
{ "Data Type": [], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py
7098cab5-9d5a-47f3-ba34-1521893d3e8b
outer_softmax_online.py
iclementine/optimize_softmax
outer_softmax_online.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def prev_multiple_of(a, b): return tl.cdiv(a, b) * b - b
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/outer_softmax_online.py
980683e0-409c-46c6-a72e-852bc66ab9ba
kl.py
ardywibowo/triton-mode
kernels/kl.py
5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1
0
@triton.jit def triton_kl_backward(target_ptr, target_stride, grad_output_ptr, grad_output_stride, num_classes, BLOCK_SIZE: tl.constexpr, log_target: tl.constexpr=False): row_id = tl.program_id(0).to(tl.int64) target_ptr += row_id * target_stride grad_output_ptr += row_id * grad_output_stride ba...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ardywibowo/triton-mode/blob/5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1/kernels/kl.py
16cfa389-a9f5-4b12-9d71-271ca2751f42
prefix_prefill.py
IBM/vllm
vllm/attention/ops/prefix_prefill.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def _fwd_kernel_alibi(Q, K, V, K_cache, V_cache, B_Loc, sm_scale, k_scale, v_scale, B_Start_Loc, B_Seqlen, B_Ctxlen, Alibi_slopes, 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_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/attention/ops/prefix_prefill.py
87c6037c-67a3-485d-86e0-1ffabb737c08
test_autodiff.py
srush/triton-autodiff
tests/test_autodiff.py
f9d1a04d048e3252bfd222646db7175ad60a3c7c
0
@triton.jit def dcomp2dx(x, b_return): _return2 = tl.expand_dims(x, 1) bx = zeroslike(x) b_return2 = zeroslike(_return2) _b_return2 = triton_unbroadcast(b_return * x, _return2.shape) return bx
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/srush/triton-autodiff/blob/f9d1a04d048e3252bfd222646db7175ad60a3c7c/tests/test_autodiff.py
1ddbd0b4-73df-450b-8257-024ca9bc7937
lion.py
Kitsunetic/kitsu
kitsu/nn/optim/lion.py
826967a493c89753ac2cf1e28b52b79998fc9076
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE': 128}, num_warps=4), triton.Config({'BLOCK_SIZE': 1024}, num_warps=8)], key=['n_elements'], restore_value=['p_ptr', 'exp_avg_ptr']) @triton.jit def update_fn_kernel(p_ptr, grad_ptr, exp_avg_ptr, lr, wd, beta1, beta2, n_elements, BLOCK_SIZE: tl.constexpr)...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/optim/lion.py
06298522-b30b-4da3-8f8f-fcaa25129441
softmax_online_v2_evict.py
iclementine/optimize_softmax
softmax_online_v2_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) for start_n in range(0, N,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound", "Low Latency" ] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_online_v2_evict.py
c7a39ace-d71e-493b-bba3-fd7c6be6a34f
matrix_multiplication.py
gmgu/study-triton
4_2d_grid_and_matmul/matrix_multiplication.py
3a9a24fd3f1de3e7465535ffe72f6deac8a419bd
0
@triton.jit def triton_mm(x_ptr, y_ptr, out_ptr, n: tl.constexpr, m: tl.constexpr, p: tl.constexpr, BLOCK_SIZE: tl.constexpr): pid0 = tl.program_id(axis=0) pid1 = tl.program_id(axis=1) x_row = pid0 * BLOCK_SIZE * m + tl.arange(0, m) x_col = tl.arange(0, BLOCK_SIZE) * m x_offset = x_row[None, :] ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/gmgu/study-triton/blob/3a9a24fd3f1de3e7465535ffe72f6deac8a419bd/4_2d_grid_and_matmul/matrix_multiplication.py
5a578960-7583-4a26-9bb1-7f85522153a1
quantize.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/triton/quantize.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _floor_log2(x): """Helper function to efficiently compute floor(log2(x)) Args: x (Tensor): FP32 Input tensor to operate on. Returns: Tensor: Floor of log2(x). """ FP32_EXP_MASK: tl.constexpr = 2139095040 FP32_EXP_OFFSET: tl.constexpr = 23 FP32_EXP_BIAS: tl.c...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/quantize.py
88abece4-2613-439d-ab06-1e7c8c46fe8d
y_10.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_10.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def tenth_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", "Transposed Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_10.py
4a890ec8-5225-43c0-953c-6992a9aa4780
fused_bitlinear.py
sustcsonglin/flash-linear-attention
fla/modules/fused_bitlinear.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'RECOMPUTE_OUTPUT': lambda args: args['Y'] 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), triton.Config({}, num_warps=16), triton.Config({}, num_warps=32)], key=['N', ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation" ], "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/modules/fused_bitlinear.py
292f0e36-f8a0-4131-a7e6-00d1bf2210e9
lightseq_async_attn_varlen.py
EvolvingLMMs-Lab/LongVA
easy_context/dist_flash_attn/lightseq_async_attn_varlen.py
76b7c33946936361eeb5a18b2c9fcc5fe63e9434
0
@triton.jit def _rescale_kernel(peer_m, m, peer_l, l, peer_o, o, L, stride_oz, stride_oh, stride_om, stride_on, Z, H, N_CTX, seqlen_q_rounded, seqlen_peer_q_rounded, BLOCK_M: tl.constexpr, BLOCK_DMODEL: tl. constexpr, BLOCK_N: tl.constexpr, LAST_STEP: tl.constexpr): start_m = tl.program_id(0) off_hz...
{ "Data Type": [ "fp32", "bf16" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "Apache" ]
https://github.com/EvolvingLMMs-Lab/LongVA/blob/76b7c33946936361eeb5a18b2c9fcc5fe63e9434/easy_context/dist_flash_attn/lightseq_async_attn_varlen.py
36831d21-1e3f-457a-b793-a0041c4d3e90
parallel_scan.py
chengkai-liu/RecBLR
parallel_scan.py
66e520c26e28c05a5425ba2e81c9169b7e0176e2
0
@triton.jit def backward_scan(gates, tokens, outputs, SEQUENCE_LENGTH: tl.constexpr): sequence_id = tl.num_programs(axis=1) * tl.program_id(axis=0 ) + tl.program_id(axis=1) forward_strides = tl.arange(0, SEQUENCE_LENGTH ) + sequence_id * SEQUENCE_LENGTH reverse_strides = tl.num_programs(axis...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/chengkai-liu/RecBLR/blob/66e520c26e28c05a5425ba2e81c9169b7e0176e2/parallel_scan.py
d0a50eec-53be-4662-90a6-08833c06ea42
modulation.py
ai-compiler-study/triton-kernels
triton_kernels/ops/modulation.py
2308e5e9d965059fe2d19b4d535debac4970b69e
0
@triton.jit def triton_modulation_gate_proj(img_ptr, mod_ptr, proj_ptr, output_ptr, batch_size, head_size, modulation_size, 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 modulati...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ai-compiler-study/triton-kernels/blob/2308e5e9d965059fe2d19b4d535debac4970b69e/triton_kernels/ops/modulation.py
377ec787-3a8e-4549-bb1d-3e1b59b3efe5
test_func.py
makslevental/triton-pp
tests/test_func.py
e2b3e2a35d96007fa1ae129432cf8e99f44588a1
0
@triton.jit def kernel_0123(arg0: (+T.float32), arg1: (+T.float32), arg2: (+T.float32), arg3: T.int32): v0 = tl.get_program_id(axis='x') c32 = arith.constant(64, T.int32) v1 = arith.muli(v0, c32) v2 = arange(0, 64) v3 = splat(v1, (64,)) v4 = arith.addi(v3, v2) v5 = splat(arg3, (64,)) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/makslevental/triton-pp/blob/e2b3e2a35d96007fa1ae129432cf8e99f44588a1/tests/test_func.py
41df42df-c59d-449e-99bd-b4e436d8152f
fused_bitlinear.py
sustcsonglin/flash-linear-attention
fla/modules/fused_bitlinear.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", "bf16", "int8" ], "Functionality": [ "Normalization", "Quantization" ], "Memory Access Pattern": [ "Strided Access", "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "Batch-O...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/fused_bitlinear.py
47e6ffc6-ded8-4623-a79b-56645cfcad62
GEMM.py
Forkxz/TritonDeepLearningKernel
kernel/GEMM.py
add54b6318e8fa5fdbf8c7b47659de9fceaa5691
0
@triton.autotune(configs=get_cuda_autotune_config(), key=['M', 'N', 'K']) @triton.jit def matmul_kernel(a_ptr, b_ptr, c_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.constex...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/Forkxz/TritonDeepLearningKernel/blob/add54b6318e8fa5fdbf8c7b47659de9fceaa5691/kernel/GEMM.py
94697f0e-3719-4056-9cc6-daae59cf6664
geglu.py
Kitsunetic/kitsu
kitsu/nn/geglu.py
826967a493c89753ac2cf1e28b52b79998fc9076
0
@triton.jit def gelu_backward(x): x2 = x * x tanh_ = tanh(_kAlpha * x * (1 + 0.044715 * x2)) dx = 0.5 * (x * (1 - tanh_ * tanh_) * (0.1070322244089 * x2 + 0.797884560802865) + tanh_ + 1) return dx
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/geglu.py
86772575-6e51-43f3-939c-f76536b27ef0
linear_kernels.py
BobMcDear/attorch
attorch/linear_kernels.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.autotune(configs=[linear_forward_config(32, 32, 32, n_warps=2, n_stages=2), linear_forward_config(64, 32, 32, n_warps=2, n_stages=5), linear_forward_config(64, 32, 128, n_warps=4, n_stages=4), linear_forward_config(64, 32, 256, n_warps=4, n_stages=4), linear_forward_config(128, 32, 32, n_warps=4...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Matrix Multiplication", "Activation Functions" ], "Memory Access Pattern": [ "Tiled", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "C...
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/linear_kernels.py
4450f891-1917-44af-86d7-af541511fc5f
real_rnn_tie_input_gate.py
berlino/seq_icl
src/models/sequence/rnn/scan_triton/real_rnn_tie_input_gate.py
9b9223d15348b5a415fb453ed988ed5f7ab9fbdc
0
@triton.jit def bwd_sequential_scan_fused(grad_output, v, f, h, B, L, C, BLOCK_M: tl. constexpr): offset_b = tl.program_id(0) if offset_b >= B: return offset_n = tl.program_id(1) ptr = tl.arange(0, BLOCK_M) + offset_b * L * C + (L - 1 ) * C + offset_n * BLOCK_M grad_h = tl.zeros(...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/real_rnn_tie_input_gate.py
e799356f-0cb1-45e9-99e3-609fd4815e15
layernorm.py
dame-cell/Triformer
triformer/layernorm.py
0712537d576166b93fa09aa9509b2661b9ed8a68
0
@triton.jit def layernorm_forward(Y, Y_row_stride, X, X_row_stride, W, b, r, mu, n_cols, eps, BLOCK_SIZE: tl.constexpr): row_idx = tl.program_id(0) col_offsets = tl.arange(0, BLOCK_SIZE) mask = col_offsets < n_cols Y += row_idx * Y_row_stride X += row_idx * X_row_stride r += row_idx mu +...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access", "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/layernorm.py
8c552f13-b676-4f8c-a790-9b00891ef3c0
logits_processor.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/logits_processor.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _triton_logits_processor_kernel(scores, penalty, input_ids_ptr, input_ids_length, num_tokens: tl.constexpr, vocab_size: tl.constexpr, max_ids_length: tl.constexpr, power_2_of_vocab_size: tl.constexpr, power_2_of_max_ids_length: tl.constexpr, penalty_ty: tl.constexpr): token_id = tl.progr...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations", "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/logits_processor.py
fda58767-fffe-4d57-a19a-4e44a1f929aa
triton_call_test.py
jax-ml/jax-triton
tests/triton_call_test.py
859cc392bec876d132bd0790ea6c00b6c246dd2b
0
@triton.jit def silly_add_kernel(x_ptr, y_ptr, output_ptr): pid = tl.program_id(axis=0) tl.store(output_ptr + pid, tl.load(x_ptr + pid) + tl.load(y_ptr + pid))
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/jax-ml/jax-triton/blob/859cc392bec876d132bd0790ea6c00b6c246dd2b/tests/triton_call_test.py
2e6f1a97-55af-4d82-a3eb-14a20678e5e9
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/gated_delta_rule/fused_recurrent.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.jit def fused_recurrent_gated_delta_rule_fwd_kernel(q, k, v, g, beta, o, h0, ht, offsets, scale, B: tl.con...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gated_delta_rule/fused_recurrent.py
a5ecc712-03f7-4e99-82f2-544ad1ac17f3
mlstm_scan.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_scan.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def stabilization_scan_op(x1, y1, x2, y2): z1 = x2 + x1 z2 = tl.maximum(x2 + y1, y2) return z1, z2
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py
d786f710-c461-4bf9-9c41-578935182b95
rotary.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/rotary.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def triton_rotary_kernel(input_ptr, frequencies_ptr, stride_0, stride_1, stride_2, rotary_dim: tl.constexpr, num_heads: tl.constexpr, rotary_block_size: tl.constexpr, head_block_size: tl.constexpr, backward: tl.constexpr): pid_0 = tl.program_id(axis=0) pid_1 = tl.program_id(axis=1) p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Transposed Access", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/rotary.py
ae472976-786a-4e37-9671-dccc1c8d91d6
triton_ops.py
huyz2023/2by4-pretrain
sparse/triton_ops.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _sparse24_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": [], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Memory-Bound" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/triton_ops.py
76f2a140-03c5-435a-ad18-589b322670ed
03-matrix-multiplication.py
triton-lang/triton
python/tutorials/03-matrix-multiplication.py
a2b398e0bb1b120f31cf386d6ae3261c3ab84207
0
@triton.autotune(configs=get_autotune_config(), key=['M', 'N', 'K']) @triton.jit def matmul_kernel(a_ptr, b_ptr, c_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, A...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/triton-lang/triton/blob/a2b398e0bb1b120f31cf386d6ae3261c3ab84207/python/tutorials/03-matrix-multiplication.py
d0523132-1573-4bfc-ad1a-db75a75ce64e
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_dC(q, f, m, m_total, norm, dh, dC, final_dC, final_m, initial_dC, initial_m, 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, H: tl.constexpr, T: tl.constexpr, K: tl. constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl. conste...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "Apache", "BSD" ]
https://github.com/NX-AI/xlstm-jax/blob/6615e620ba4ecdbe4fd9cc4e9a5a313b133e84a7/xlstm_jax/models/xlstm_pytorch/blocks/mlstm/backend/triton_chunk.py
42cd92f0-6236-4849-b769-b3694bde27ff
sequential_rnn_scan.py
TushaarGVS/linear-rnn
linear_rnn/triton/sequential_rnn_scan.py
48320589b73154484be7d09a144923a2b9e56b85
0
@triton.jit def _sequential_rnn_scan_bwd_kernel(): pass
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Recurrent Neural Networks" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/TushaarGVS/linear-rnn/blob/48320589b73154484be7d09a144923a2b9e56b85/linear_rnn/triton/sequential_rnn_scan.py
71e1d145-99ab-4637-a976-6d25d864e20e
silu_and_mul.py
tascj/kaggle-lmsys-chatbot-arena
human_pref/inference/ops/silu_and_mul.py
83cd93d50b9283c18711e8c63e4e1c6399c7b9ce
0
@triton.jit def _silu_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): stride_input_m = stride_input_m.to(tl.int64) stride_output_m = stride_output_m.to(tl.int64) tid = tl.program_id(0) inpu...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/tascj/kaggle-lmsys-chatbot-arena/blob/83cd93d50b9283c18711e8c63e4e1c6399c7b9ce/human_pref/inference/ops/silu_and_mul.py
6fc9c97a-cb15-4764-a89b-ef90b31aac37
geglu.py
Kitsunetic/kitsu
kitsu/nn/geglu.py
826967a493c89753ac2cf1e28b52b79998fc9076
0
@triton.jit def geglu_backward_kernel(x_ptr, dx_ptr, dy_ptr, N, C, C2, BLK_C: tl. constexpr, BLK_N: tl.constexpr): pid_n = tl.program_id(0) pid_c = tl.program_id(1) offs_n = pid_n * BLK_N + tl.arange(0, BLK_N) offs_c = pid_c * BLK_C + tl.arange(0, BLK_C) mask_n = offs_n < N mask_c = offs_c <...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/geglu.py
faf12dcc-3a71-462c-9bd7-a076ddd12c3f
naive_associative_rnn_scan.py
TushaarGVS/linear-rnn
linear_rnn/triton/naive_associative_rnn_scan.py
48320589b73154484be7d09a144923a2b9e56b85
0
@triton.jit def _naive_associative_rnn_scan_fwd_kernel(x_ptr, a_ptr, out_ptr, stride_x_batch, stride_x_len, stride_x_dim, stride_a_batch, stride_a_len, stride_a_dim, stride_out_batch, stride_out_len, stride_out_dim, seq_len: tl.constexpr, BLOCK_SIZE: tl.constexpr): pid_batch = tl.program_id(0) pid_d...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/TushaarGVS/linear-rnn/blob/48320589b73154484be7d09a144923a2b9e56b85/linear_rnn/triton/naive_associative_rnn_scan.py
8b8d9b04-0656-4233-8540-349f8e875a04
fused_recurrent.py
sustcsonglin/hope-fla
fla/ops/hope/fused_recurrent.py
0750c9a9a360fb72236dfaaaf21496959c5ef48d
0
@triton.jit def fused_recurrent_fwd_kernel(q, k, k_l2, q_reflected, k_reflected, dk_l2_partial, T, D: tl.constexpr, BK: tl.constexpr): i_b, i_h = tl.program_id(0), tl.program_id(1) p_q = q + i_b * T * D + i_h * BK + tl.arange(0, BK) p_k = k + i_b * T * D + i_h * BK + tl.arange(0, BK) p_k_l2 = k_l2 +...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/hope-fla/blob/0750c9a9a360fb72236dfaaaf21496959c5ef48d/fla/ops/hope/fused_recurrent.py
5f0785c8-cf18-4fd2-8f09-4990e5a3ec0a
fused_chunk.py
sustcsonglin/flash-linear-attention
fla/ops/based/fused_chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def fused_chunk_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, BT: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr): i_v, i_k, i_bh = tl.program_id(0), tl.program_id(1), tl...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/based/fused_chunk.py
54d08794-506f-46cb-8b84-ab8be03f6801
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _jagged_flash_attention_bwd_preprocess_basic_kernel(o_ptr, o_offset_ptr, do_ptr, delta_ptr, stride_om, stride_od, max_seq_len, D: tl.constexpr, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_D: tl.constexpr): pid_m = tl.program_id(axis=0) pid_batch = tl.program_id(axis=1) begin_o = tl.load(o...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
51ef560d-cee3-4e4b-9480-414a21661527
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/retention/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, 128] for BV in [32, 64, 128] for num_warps in [2, 4] for num_stages in [2, 3, 4]], key=['BT']) @triton.jit d...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput"...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/retention/chunk.py
4b7f7511-1f81-4dfd-b663-c2657b3195c5
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/retention/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'NV': lambda args: triton.cdiv(args['V'], args['BV'])}) @triton.jit def parallel_retention_bwd_kernel(q, k, v, do, dq, dk, dv, scale, B: tl. constexpr, H: tl.constexpr, T: tl.constexpr, K: tl.constexpr, V: tl. constexpr, BT: tl.constexpr, BS: tl.constexpr, BK: tl.constexpr, BV: tl .const...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Backpropagation", "Attention Mechanisms", "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": ...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/retention/parallel.py
686cb4de-466f-4a1f-845c-31d93017e89f
test.py
LLMServe/DistServe
evaluation/0-test-single-forward-performance/test.py
3a5c5397a260c2a53c815688d0df1796dd54128e
0
@triton.jit def f(a: tl.constexpr, b): pass
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/LLMServe/DistServe/blob/3a5c5397a260c2a53c815688d0df1796dd54128e/evaluation/0-test-single-forward-performance/test.py
2dcb744e-9b5f-4362-b8b5-054fa60ab3b3
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, 'RECOMPUTE_OUTPUT': lambda args: args['Y'] is not None}) @triton.jit def layer_norm_bwd_kernel(X, W, B, Z, Y, DY, DX, DW, DB, DZ, Mean, Rstd, stride_x_row, stride_z_row, stride_y_row, stride_dy_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throug...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/layernorm_gated.py
214f7ac4-a9b5-4d29-84a0-b7ba3504f01e
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({}, num_warps=num_warps, num_stages =num_stages) for num_warps in [2, 4] for num_stages in [2, 3, 4]], key= ['BT']) @triton.jit def chunk_gsa_bwd_k_kernel_dqkvg(q, k, v, h, g, A, do, dh, dq, dk,...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Backpropagation", "Attention Mechanisms", "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": ...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gsa/chunk.py
2e0354ac-cb88-4e37-87aa-b3e8199840dd
rwkv_log.py
berlino/seq_icl
src/models/sequence/rnn/scan_triton/rwkv_log.py
9b9223d15348b5a415fb453ed988ed5f7ab9fbdc
0
@triton.jit def wkv_triton_log_space_backward_kernel(w_ptr, w_s_c, u_ptr, u_s_c, k_ptr, k_s_b, k_s_t, k_s_c, v_ptr, v_s_b, v_s_t, v_s_c, state_ptr, state_s_b, state_s_abe, state_s_t, state_s_c, gwkv_ptr, gwkv_s_b, gwkv_s_t, gwkv_s_c, gstate_out_ptr, gstate_out_s_b, gstate_out_s_abe, gstate_out_s_c, gw_p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/rwkv_log.py
04b616e3-c3c8-4ae9-b466-28632451aa62
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/fused_recurrent.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({}, num_warps=num_warps) for num_warps in [1, 2, 4, 8, 16]], key=['BK', 'B...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Batch-Oriented" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/fused_recurrent.py
b2ccfd99-57ca-4f63-8421-06fc03c2fd71
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=num_warps) for num_warps in [2, 4, 8]], key=['BT', 'BK', 'BV']) @triton.jit def chunk_simple_gla_bwd_kernel_dv(q, k, g, do, dv, dh, offsets, indices, scale, T: tl.constexpr, H: tl....
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/simple_gla/chunk.py
c37220b7-83c8-4237-ab3c-c6b1f83a1aa3
flash_attention.py
falkaer/multi-scale-music
seq/flash_attention.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.jit def symmetric_alibi_mask(slope, offs_m, offs_n, M, N, EVEN_M: tl.constexpr, EVEN_N: tl.constexpr): alibi = -tl.abs(M - N + offs_n[None, :] - offs_m[:, None]) * slope if not EVEN_M & EVEN_N: mask = make_bounds(offs_m, offs_n, M, N, EVEN_M, EVEN_N) mask, alibi = tl.broadcast(mask, ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Elementwise Operations" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/seq/flash_attention.py
e2a70484-75b6-4ce3-8fc4-87362e385bde
attn_torch_function.py
ROCm/aotriton
tritonsrc/attn_torch_function.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.autotune(configs=TRITON_CONFIG_LIST_BWD_FUSED, key=['max_seqlen_q', 'max_seqlen_k', 'head_dim']) @triton.jit def tuned_attn_bwd(Q, K, V, B, sm_scale, Out, DO, DK, DV, 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...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation", "Softmax" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/attn_torch_function.py
1df982b2-ab6b-4be2-b12a-68ff05bd304d
seqlen_utils.py
Kitsunetic/kitsu
kitsu/nn/seqlen_utils.py
826967a493c89753ac2cf1e28b52b79998fc9076
0
@triton.jit def code_downscale_kernel(code_ptr, out_ptr, n_steps, N, BLK: tl.constexpr): pid = tl.program_id(0) offs_n = BLK * pid + tl.arange(0, BLK) mask_n = offs_n < N code = tl.load(code_ptr + offs_n, mask=mask_n) top16bit = code & 32767 << 48 low16bit = code & (1 << 48) - 1 low16bit >>=...
{ "Data Type": [ "int8", "uint8" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/seqlen_utils.py
04b2666a-1d7d-4696-a991-b70862c000e7
mlstm_scan.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_scan.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def stabilize_fi(F, I, M, F_STABILIZED, I_STABILIZED, NH: tl.constexpr, S: tl.constexpr): bh_id = tl.program_id(0) batch_id = bh_id // NH head_id = bh_id % NH s_range = tl.arange(0, S) batch_offset_fi = batch_id * NH * S + head_id * S f = tl.load(F + batch_offset_fi + s_range, s_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py
f5393048-97b0-492a-b70c-6819fc017e7e
awq_triton.py
Charlie-XIAO/sparse-vllm
vllm/model_executor/layers/quantization/awq_triton.py
d228909a30b0c245c35417fb7d2acdf9a3690042
0
@triton.jit def awq_dequantize_kernel(qweight_ptr, scales_ptr, zeros_ptr, group_size, result_ptr, num_cols, num_rows, BLOCK_SIZE_X: tl.constexpr, BLOCK_SIZE_Y: tl.constexpr): pid_x = tl.program_id(axis=0) pid_y = tl.program_id(axis=1) offsets_y = pid_y * BLOCK_SIZE_Y + tl.arange(0, BLOCK_SIZE_Y) ...
{ "Data Type": [ "uint8", "fp32" ], "Functionality": [ "Quantization", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Memory-Bound" ] }
[ "Apache" ]
https://github.com/Charlie-XIAO/sparse-vllm/blob/d228909a30b0c245c35417fb7d2acdf9a3690042/vllm/model_executor/layers/quantization/awq_triton.py
6a16d484-c7ae-4445-9911-2a441ad2edc4
matrix_multiplication.py
gmgu/study-triton
5_out_of_index/matrix_multiplication.py
3a9a24fd3f1de3e7465535ffe72f6deac8a419bd
0
@triton.jit def triton_mm(x_ptr, y_ptr, out_ptr, n: tl.constexpr, m: tl.constexpr, p: tl.constexpr, BLOCK_SIZE: tl.constexpr): pid0 = tl.program_id(axis=0) pid1 = tl.program_id(axis=1) x_row_start = tl.arange(0, BLOCK_SIZE)[:, None] * m x_col_start = tl.arange(0, BLOCK_SIZE)[None, :] x_col_unit ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops", "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/gmgu/study-triton/blob/3a9a24fd3f1de3e7465535ffe72f6deac8a419bd/5_out_of_index/matrix_multiplication.py
f80e0e6a-ad55-4272-aace-e1d940a24b8d
reduction.py
daemyung/practice-triton
reduction.py
27f727726f1507c8380a1c11751d851c7c4a07ce
0
@triton.jit def sum_kernel(y_ptr, x_ptr, size, block_size: tl.constexpr): offsets = tl.arange(0, block_size) mask = offsets < size x = tl.load(x_ptr + offsets, mask) y = tl.reduce(x, 0, combine_add) tl.store(y_ptr, y)
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/daemyung/practice-triton/blob/27f727726f1507c8380a1c11751d851c7c4a07ce/reduction.py
c1001477-cd08-4169-b77e-125bba440902
triton_example.py
lshmouse/ai-playground
experimental/triton_example/triton_example.py
3d91bd77464e2a7fb0ce49180fc6d20e98869a73
0
@triton.jit def softmax(Y, stride_ym, stride_yn, X, stride_xm, stride_xn, M, N): m = tl.program_id(0) BLOCK_SIZE: tl.constexpr = 1024 n = tl.arange(0, BLOCK_SIZE) X = X + m * stride_xm + n * stride_xn x = tl.load(X, mask=n < N, other=-float('inf')) z = x - tl.max(x, axis=0) num = tl.exp(z) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/lshmouse/ai-playground/blob/3d91bd77464e2a7fb0ce49180fc6d20e98869a73/experimental/triton_example/triton_example.py
a78ad7b2-9ebf-4407-be34-12ed6daa1918
triton_call_test.py
jax-ml/jax-triton
tests/triton_call_test.py
859cc392bec876d132bd0790ea6c00b6c246dd2b
0
@triton.jit def copy_twice_kernel(a_ptr, x_ptr, y_ptr): a = tl.load(a_ptr) tl.store(x_ptr, a) tl.store(y_ptr, a)
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput", "Low Latency" ] }
[ "Apache" ]
https://github.com/jax-ml/jax-triton/blob/859cc392bec876d132bd0790ea6c00b6c246dd2b/tests/triton_call_test.py
22a19981-d2fc-4603-a185-6608ad153106
sgmv_expand_slice.py
IBM/vllm
vllm/lora/ops/sgmv_expand_slice.py
99523dd62be2ecf6c6db15e8133aaaf7855e7e86
0
@triton.jit def _sgmv_expand_slice_kernel(input_ptr, lora_ptr, out_ptr, N, K, b_seq_start_loc, seq_lens, lora_indices, xm_stride, xk_stride, l0_stride, lora_k_stride, lora_n_stride, cm_stride, cn_stride, slice_offset, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, BLOCK_K: tl .constexpr, EVEN_K: tl.const...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/lora/ops/sgmv_expand_slice.py
404e3e4e-48df-4d01-9ca3-88d31910bc38
masked_load_store.py
ROCm/aotriton
tritonsrc/masked_load_store.py
016f733e8ff746450e066f78bed68709ccd93e60
0
@triton.jit def mload2d(REG_ROWS: tl.constexpr, REG_COLS: tl.constexpr, i_base, i_start_row, i_start_col, i_rows, i_cols, stride_row, stride_col): off_rows = tl.arange(0, REG_ROWS) + i_start_row off_cols = tl.arange(0, REG_COLS) + i_start_col i_ptrs = i_base + off_rows[:, None] * stride_row + off_cols[N...
{ "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/masked_load_store.py
00c82ef8-66e1-47a7-8dd2-64f2b33c6b0b
matmul.py
MichaelWei7/torch
_inductor/triton_ops/matmul.py
4bfe6988308edc9544ddae94bfdcf83a4326b04a
0
@mm_heuristics() @mm_autotune(get_io_bound_configs=True) @triton.jit def _kernel(A, B, C, M, N, K, stride_am, stride_ak, stride_bk, stride_bn, stride_cm, stride_cn, allow_tf32: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, BLOCK_K: tl.constexpr, GROUP_M: tl.constexpr, SPLIT_K: tl.constexpr, EV...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD" ]
https://github.com/MichaelWei7/torch/blob/4bfe6988308edc9544ddae94bfdcf83a4326b04a/_inductor/triton_ops/matmul.py
cc5bd1e2-ee94-444e-9383-a3e3b726ce7c
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/hgrn/fused_recurrent.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({'BD': BD}, num_warps=num_warps) for BD in [32, 64, 128] for num_warps in ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "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/hgrn/fused_recurrent.py
abce0537-6e40-4d23-9771-998b073c6648
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _jagged_flash_attention_bwd_basic_kernel(q_ptr, k_ptr, v_ptr, o_ptr, offset_ptr, dq_ptr, dk_ptr, dv_ptr, do_ptr, delta_ptr, lse_ptr, stride_qm, stride_qd, stride_kn, stride_kd, stride_vn, stride_vd, stride_om, stride_od, stride_dqm, stride_dqd, stride_dkn, stride_dkd, stride_dvn, stride_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "Memory-Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
617a9bbf-b4c6-4dab-8223-f52320eabcd6
kernels.py
ShenzheZhu/sparse_autoencoder
sparse_autoencoder/kernels.py
afef049c905fda5b0f69729127ce0d3a42399152
0
@triton.jit def triton_mse_loss_fp16_kernel(output_ptr, target_ptr, out_ptr, stride_a_output, stride_a_target, a, b, BLOCK_SIZE_B: tl.constexpr): pid = tl.program_id(0) offsets_b = tl.arange(0, BLOCK_SIZE_B) output = tl.load(output_ptr + pid * stride_a_output + offsets_b, mask= offsets_b < b) ...
{ "Data Type": [ "fp16" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/ShenzheZhu/sparse_autoencoder/blob/afef049c905fda5b0f69729127ce0d3a42399152/sparse_autoencoder/kernels.py
00406477-a3a9-43aa-bcb6-92042cbffae0
04-low-memory-dropout.py
triton-lang/triton
python/tutorials/04-low-memory-dropout.py
a2b398e0bb1b120f31cf386d6ae3261c3ab84207
0
@triton.jit def _dropout(x_ptr, x_keep_ptr, output_ptr, n_elements, p, 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) x_keep = tl.load(...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/triton-lang/triton/blob/a2b398e0bb1b120f31cf386d6ae3261c3ab84207/python/tutorials/04-low-memory-dropout.py
020e145a-16d9-4584-82d7-d36d740a0ca5
stats.py
neuro-ml/kerops
kerops/kernels/stats.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _Stats_cl3d_impl(X_ptr, Mean_ptr, Sqmean_ptr, numel_no_channels, num_channels: tl.constexpr, block_other: tl.constexpr): pid = tl.program_id(0) X_ptr += pid * block_other * num_channels channels_offset = tl.arange(0, num_channels) other_offset = tl.arange(0, block_other) offset =...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/stats.py
60939418-875a-427c-b473-1f90ef624523
gemm_preop_exp_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/gemm_preop_exp_benchmark.py
6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 32, 'GROUP_SIZE_M': 4, 'grf_mode': 'large'}, num_stages=2, num_warps=32), triton.Config({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 32, 'GROUP_SIZE_M': 4, 'grf_mode': 'large'}, num_stages=3...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_preop_exp_benchmark.py
b2ab2e7c-d4ec-466b-bffb-cb8427e67f7f
l2norm.py
sustcsonglin/flash-linear-attention
fla/modules/l2norm.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for num_warps in [1, 2, 4, 8, 16, 32]], key=['N']) @triton.jit def l2norm_fwd_kernel(X, Y, stride_x_row, N, eps, BLOCK_N: tl.constexpr): row = tl.program_id(0) X += row * stride_x_row Y += row * stride_x_row cols = tl.arange(0, BLOCK_N...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/l2norm.py