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
c09cde34-9ffc-4939-be5b-e95b46999a0f
softmax_loop_along_reduce_axis_v2.py
iclementine/optimize_softmax
softmax_loop_along_reduce_axis_v2.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def softmax_kernel_loop_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) for start_n in range(0, N, TILE_N): n_offsets = start_n + tl.arange(0, TILE_N) offset = ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_loop_along_reduce_axis_v2.py
d41cc477-8ab0-4b21-a14c-3997eac771ce
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/fused_recurrent.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BT': BT, 'BK': BK}, num_warps= num_warps) for BT in [16, 32, 64] for BK in [32, 64] for num_warps in [ 1, 2, 4, 8]], key=['K']) @triton.jit def fused_recurrent_rwkv6_bwd_kernel_dw(q, k, dq, dk...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "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/rwkv6/fused_recurrent.py
ad644dd8-8dd8-4e51-b816-115a5a717ad7
hilbert.py
Kitsunetic/space-filling-pytorch
space_filling_pytorch/functional/hilbert.py
0de955ad1036973ee7506c5a0124c208acec722d
0
@triton.jit def _calculate_hilbert_distance(fx, fy, fz, space_size): x = ((fx + 1) / 2 * space_size).to(tl.int64) y = ((fy + 1) / 2 * space_size).to(tl.int64) z = ((fz + 1) / 2 * space_size).to(tl.int64) x = tl.minimum(tl.maximum(x, 0), space_size - 1) y = tl.minimum(tl.maximum(y, 0), space_size - 1...
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/Kitsunetic/space-filling-pytorch/blob/0de955ad1036973ee7506c5a0124c208acec722d/space_filling_pytorch/functional/hilbert.py
f6eb3989-cac5-479b-973d-97694fdb700e
mlstm_scan.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_scan.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def roll(y, dim=0): _, rh2, _ = tl.associative_scan((1 + 0 * y, 0.0 * y, y), dim, roll_op) return rh2
{ "Data Type": [], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py
28746acd-0067-40c2-9349-3abb547bd86d
chunk_h_split.py
sustcsonglin/flash-linear-attention
fla/ops/common/chunk_h_split.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_FINAL_STATE_GRADIENT': lambda args: args['dht'] is not None, 'STORE_INITIAL_STATE_GRADIENT': lambda args: args['dh0'] 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...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "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/common/chunk_h_split.py
66cc7094-2f0e-4a81-9d3e-fc4e2f0954ad
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_fwd_kernel_K(q, k, z, h, o, A, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, s_h_h, s_h_t, s_h_d, scale, T: tl.constexpr, K: tl. constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl. constexpr): i_v, i_t, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2)...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "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/abc/chunk.py
036c35d5-8ac1-4fea-a594-dfc3a88a9bfa
rmsnorm.py
agostini01/rms-norm-exercise
optimized/rmsnorm.py
0884cc52a8cde60ff8af0fa58d5b5330ae5db87a
0
@triton.jit def rms_norm(output_ptr, input_ptr, weights_ptr, stride, N, eps, DTYPE: tl. constexpr, BLOCK_SIZE: tl.constexpr): """ RMS Norm Triton Kernel Params: - input_ptr (tensor): Pointer to Input - output_ptr (tensor): Pointer to Output - weights_ptr (tensor): Pointer to Sca...
{ "Data Type": [ "fp32", "fp16", "bf16" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/agostini01/rms-norm-exercise/blob/0884cc52a8cde60ff8af0fa58d5b5330ae5db87a/optimized/rmsnorm.py
55da2e67-0be0-4dfc-aa0d-22b2e71956a3
softmax.py
sustcsonglin/flash-linear-attention
fla/ops/utils/softmax.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 softmax_fwd_kernel(x, p, D: tl.constexpr, B: tl.constexpr): ...
{ "Data Type": [ "fp32", "fp16", "bf16" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/softmax.py
ff97fdfb-b204-4483-bf5b-9713cad36067
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/based/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def parallel_based_bwd_kernel(q, k, v, do, dz, dq, dk, dv, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, scale, B: tl.constexpr, H: tl.constexpr, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BTL: tl.constexpr, BTS: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr): i_kv, i_c, i_bh = tl.pro...
{ "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/based/parallel.py
ea89f51b-43ee-4c4b-b14e-5c296ca54f47
cross_entropy_loss.py
tdrussell/qlora-pipe
kernels/cross_entropy_loss.py
6fb7c8eeae52a0e36c41f00628985f29d8330684
0
@triton.heuristics({'DO_LOGIT_SCALING': lambda args: args['DO_LOGIT_SCALING']}) @triton.jit def _chunked_cross_entropy_forward(logits_ptr, logits_row_stride, loss_ptr, logsumexp_ptr, labels_ptr, VOCAB_SIZE: tl.constexpr, N_CHUNKS: tl. constexpr, BLOCK_SIZE: tl.constexpr, DO_LOGIT_SCALING: tl.constexpr, LOGI...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/tdrussell/qlora-pipe/blob/6fb7c8eeae52a0e36c41f00628985f29d8330684/kernels/cross_entropy_loss.py
d6089944-ecae-4155-ae54-51eac263e597
inout_tensor_parallel.py
gmgu/study-triton
2_inout_tensor/inout_tensor_parallel.py
3a9a24fd3f1de3e7465535ffe72f6deac8a419bd
0
@triton.jit def copy_kernel(in_ptr, out_ptr, n, 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 x = tl.load(in_ptr + offsets, mask=mask) y = tl.store(out_ptr + offsets, x, mask=mask)
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/gmgu/study-triton/blob/3a9a24fd3f1de3e7465535ffe72f6deac8a419bd/2_inout_tensor/inout_tensor_parallel.py
6f93083e-9dd4-4587-99ae-73b0d5ae4397
triton_fused_attention.py
pytorch-labs/tritonbench
tritonbench/kernels/triton_fused_attention.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.jit def _attn_fwd_compute_ws(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_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/kernels/triton_fused_attention.py
899ada78-0cbe-42a7-835e-eb835b7dce73
kernel_benchmark.py
ruikangliu/FlatQuant
benchmarks/kernel_benchmark.py
9d3032065f1688cb3f71ebc8166df6d91440e871
0
@triton.jit def quant_kernel(src_ptr, stride_srcb, stride_srcm, stride_srcn, dst_ptr, stride_dstb, stride_dstm, stride_dstn, output_scale, B, M: tl.constexpr, N: tl.constexpr, np2_M: tl.constexpr, np2_N: tl.constexpr): """ quant fp16 tensor to int4 """ batch_id = tl.program_id(axis=0) + tl.progr...
{ "Data Type": [ "fp16", "uint8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/ruikangliu/FlatQuant/blob/9d3032065f1688cb3f71ebc8166df6d91440e871/benchmarks/kernel_benchmark.py
e91bc5a6-77ff-44ee-8f09-c99d4cd87aa7
quant_triton.py
CompendiumLabs/ziggy
ziggy/backends/quant_triton.py
bd12fe50ca3475743f62ae26d4c184108e441e03
0
@triton.jit def quantize_kernel(X, Y, N, K, K1, scale, zero_point, BITS: tl.constexpr, QFACT: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl. constexpr, BLOCK_SIZE_K1: tl.constexpr): dtype = X.dtype.element_ty scale_ty = tl.full((), scale, dtype=dtype) zero_point_ty = tl.full((), zero_po...
{ "Data Type": [ "fp32", "fp16", "bf16", "uint8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/CompendiumLabs/ziggy/blob/bd12fe50ca3475743f62ae26d4c184108e441e03/ziggy/backends/quant_triton.py
55dad000-aa04-4d5a-bea5-663140e7161a
k_dropout.py
cpuhrsch/torchfused
torchfused/triton/k_dropout.py
6c40ed160dcecbe7825f268f7c86bccd359e0ebf
0
@triton.autotune(configs=_k_configs, key=['N']) @triton.jit def k_dropout_fw(Y, X, BIAS, SEEDS, stride, N, p, **META): """ Apply dropout on an input tensor Y : Output (M, N) X : Input (M, N) S : Seeds (M,) p : dropout probability """ BLOCK_SIZE = META['BLOCK_SIZE'] row = tl.program_i...
{ "Data Type": [], "Functionality": [ "Elementwise Operations", "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "BSD" ]
https://github.com/cpuhrsch/torchfused/blob/6c40ed160dcecbe7825f268f7c86bccd359e0ebf/torchfused/triton/k_dropout.py
d89888a4-f831-415d-9ee8-3c77f4fc0d29
awq_triton.py
Charlie-XIAO/sparse-vllm
vllm/model_executor/layers/quantization/awq_triton.py
d228909a30b0c245c35417fb7d2acdf9a3690042
0
@triton.jit def awq_gemm_kernel(a_ptr, b_ptr, c_ptr, zeros_ptr, scales_ptr, M, N, K, group_size, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, SPLIT_K: tl.constexpr): pid = tl.program_id(axis=0) pid_z = tl.program_id(1) num_pid_n = tl.cdiv(N, BLOCK_SIZE_N) p...
{ "Data Type": [ "uint8", "fp32" ], "Functionality": [ "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/Charlie-XIAO/sparse-vllm/blob/d228909a30b0c245c35417fb7d2acdf9a3690042/vllm/model_executor/layers/quantization/awq_triton.py
5b54c71f-c6fd-49ad-b31b-72956c7bdb18
fused_chunk.py
sustcsonglin/flash-linear-attention
fla/ops/linear_attn/fused_chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def fused_chunk_linear_attn_fwd_kernel(q, k, v, o, h0, ht, 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, BT: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr, USE_INITIAL_STATE: tl.constexpr, STORE_FINAL_STATE: tl.constexpr, CHECK: tl.constexpr)...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/linear_attn/fused_chunk.py
75455e8e-2630-4564-b24a-6cc4c167f9ee
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_bwd_kernel_intra_KV(v, z, A, do, dv, s_v_h, s_v_t, s_v_d, 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_c // NC, i_c % NC p_v = tl...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Attention Mechanisms", "Backpropagation", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compu...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
2cc1ebc8-1e04-49be-a864-a110ad100feb
chunk_fuse.py
elephantmipt/rebased_minimal
flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
e7b945509972fab9f9c1c7be431abf7d6bf62c95
0
@triton.jit def chunk_abc_bwd_kernel_dp(v, rv, cv, pv, do, dp, s_qk_h, s_qk_t, s_qk_d, s_sk_h, s_sk_t, s_sk_m, T, BT: tl.constexpr, BV: tl.constexpr, BM: tl. constexpr, DV: tl.constexpr, DM: tl.constexpr, NT: tl.constexpr): i_m, i_v, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) n_bh = tl....
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Backpropagation", "Elementwise Operations", "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compu...
[ "Apache" ]
https://github.com/elephantmipt/rebased_minimal/blob/e7b945509972fab9f9c1c7be431abf7d6bf62c95/flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
46b97460-47fd-4e2b-8f02-0a3f885ed908
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _multi_head_jagged_flash_attention_bwd_kernel(q_ptr, k_ptr, v_ptr, o_ptr, offset_ptr, dq_ptr, dk_ptr, dv_ptr, do_ptr, delta_ptr, lse_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, stri...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Backpropagation", "Attention Mechanisms", "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": ...
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
62678117-b269-40bc-af2e-e8df801e151a
addition.py
neuro-ml/kerops
kerops/kernels/addition.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _AddStats_cl3d_backward_impl(Addgrad_ptr, Meangrad_ptr, Sqmeangrad_ptr, Sum_ptr, Outputgrad_ptr, numel, numel_no_channels, BLOCK_SIZE: tl. constexpr, num_channels: tl.constexpr, block_other: tl.constexpr): pid = tl.program_id(0) Addgrad_ptr += pid * BLOCK_SIZE Sum_ptr += pid * BLOCK_...
{ "Data Type": [ "fp16", "fp32" ], "Functionality": [ "Backpropagation", "Normalization", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/addition.py
50f8d2cb-95bb-458d-a7f1-0ea3a9eb20e2
fused_cross_entropy.py
sustcsonglin/flash-linear-attention
fla/modules/fused_cross_entropy.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'HAS_SMOOTHING': lambda args: args['label_smoothing'] > 0.0}) @triton.jit def cross_entropy_fwd_kernel(loss_ptr, lse_ptr, z_loss_ptr, logits_ptr, labels_ptr, label_smoothing, logit_scale, lse_square_scale, ignore_index, total_classes, class_start_idx, n_cols, n_rows, logits_row_strid...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Elementwise Operations" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/fused_cross_entropy.py
908d9a97-c88c-4037-834b-8db2531abaa4
y_1.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_1.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def first_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": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_1.py
8f18db57-d2fd-4917-988c-68e1b2c06a4f
shape.py
2niuhe/triton_utils
src/triton_utils/shape.py
6184906ac3b86dac3ccbfac128ec393ccecde5df
0
@triton.jit def store_2d(vals, ptr, sz0: tl.constexpr, sz1: tl.constexpr, n0, n1, max0, max1, stride0=None, stride1=1): """Store 2d block into (n0,n1)th chunk of matrix (defined by ptr), where each chunk has size (sz0, sz1)""" stride0 = stride0 or sz1 offs0 = get_1d_offest(sz0, n0) offs1 = get_1d_of...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/2niuhe/triton_utils/blob/6184906ac3b86dac3ccbfac128ec393ccecde5df/src/triton_utils/shape.py
df8f566b-5179-4d60-9c4b-96a961c77a70
softmax_split.py
iclementine/optimize_softmax
softmax_split.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def logsumexp_kernel(out_ptr, in_ptr, M, N, TILE_N: tl.constexpr): pid_n = tl.program_id(0) num_programs_n = tl.num_programs(0) pid_m = tl.program_id(1) n_offsets = pid_n * TILE_N + tl.arange(0, TILE_N) mask = n_offsets < N offset = pid_m * N + n_offsets inp = tl.load(in_ptr + of...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_split.py
92000632-b05c-45c6-918d-cc07885d8e64
10-experimental-tma-store-matrix-multiplication.py
hgl71964/SIP
benchmarks/10-experimental-tma-store-matrix-multiplication.py
767ed720d4bd5cee21670b125b62c434258c532b
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 128, 'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K': 64, 'GROUP_SIZE_M': 8}, num_stages =7, num_warps=4)], 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_SI...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings", "Persistent Kernels" ], "Performance Objective": [ "High Throughput", ...
[ "MIT" ]
https://github.com/hgl71964/SIP/blob/767ed720d4bd5cee21670b125b62c434258c532b/benchmarks/10-experimental-tma-store-matrix-multiplication.py
b957f60e-0bd5-47bd-acd6-2d465af4466c
chunk_h_split.py
sustcsonglin/flash-linear-attention
fla/ops/common/chunk_h_split.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] for BV in [32, 64] for num_warps in [2, 4, 8] ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "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/common/chunk_h_split.py
19ce5a53-d804-465c-95c2-1902ab6d7de8
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({}, num_warps=2), triton.Config({}, num_warps=4), triton.Config({}, num_warps=8)], key=['BC']) @triton.jit def chunk_rwkv6_fwd_A_kernel_intra_sub_intra_merge(A, A...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Memory-Bound", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py
cdc37f44-be66-44db-8bec-5e91db230ff7
_quantize.py
IBM/qattn
qattn/nn/functional/_quantize.py
07ceda0aceb9afd299d622325944c0c0471827fe
0
@triton.jit def dequantize(x: tl.tensor, scale: tl.tensor) ->tl.tensor: """Dequantize quantized tensor to floating point. Args: x (tl.tensor): quantized tensor. scale (tl.tensor): quantization scaling factor Returns: tl.tensor: Dequantized floating-point tensor. """ return ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/IBM/qattn/blob/07ceda0aceb9afd299d622325944c0c0471827fe/qattn/nn/functional/_quantize.py
fba78c1a-b444-4758-891c-009b933f193d
conv.py
chengzeyi/stable-fast
src/sfast/triton/ops/conv.py
3a6f35c7045f8f6812515957ca62ef37260ff080
0
@conv_heuristics() @triton.jit def _kernel_delta_x_hwc(x, w, bias, y, stride_xn, stride_xc, stride_xh, stride_xw, stride_wn, stride_wc, stride_wh, stride_ww, stride_yn, stride_yc, stride_yh, stride_yw, delta_xh_ptr, delta_xw_ptr, delta_xc_ptr, BATCH, IN_C, IN_H, IN_W, KERNEL_N, KERNEL_H, KERNEL_W, OUT_H...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/conv.py
c0a72086-6095-4821-ae15-cdbb362b3308
cluster_test.py
jax-ml/jax-triton
tests/cluster_test.py
859cc392bec876d132bd0790ea6c00b6c246dd2b
0
@triton.jit def dummy_kernel(x_ptr, o_ptr): offs = tl.program_id(axis=0) * 4 + tl.arange(0, 4) tl.store(o_ptr + offs, tl.load(x_ptr + offs))
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Low Latency" ] }
[ "Apache" ]
https://github.com/jax-ml/jax-triton/blob/859cc392bec876d132bd0790ea6c00b6c246dd2b/tests/cluster_test.py
99f349d5-d5b7-4d07-b2cd-6f21651e8219
flash_attention.py
falkaer/multi-scale-music
seq/flash_attention.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.jit def _fwd_kernel(Q, K, V, S, Out, sm_scale, TMP, L, M, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn, stride_kk, stride_vz, stride_vh, stride_vn, stride_vk, stride_oz, stride_oh, stride_om, stride_ok, stride_tz, stride_th, stride_tm, stride_lz, stride_lh, stride_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Softmax" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/seq/flash_attention.py
e528bce6-ce8b-4667-9ce7-53bb2e0fbc58
chunk_fuse.py
elephantmipt/rebased_minimal
flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
e7b945509972fab9f9c1c7be431abf7d6bf62c95
0
@triton.jit def chunk_abc_bwd_kernel_dk(q, k, rk, ck, ds, dk, dsk, s_qk_h, s_qk_t, s_qk_d, s_sk_h, s_sk_t, s_sk_m, T, BT: tl.constexpr, BK: tl.constexpr, BM: tl.constexpr, DK: tl.constexpr, DM: tl.constexpr, NT: tl.constexpr): i_k, i_m, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) n_bh = ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/elephantmipt/rebased_minimal/blob/e7b945509972fab9f9c1c7be431abf7d6bf62c95/flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
47a0737b-519d-4b88-a3af-0251a50b9828
fused_recurrent.py
sustcsonglin/flash-linear-attention
fla/ops/linear_attn/fused_recurrent.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def fused_recurrent_linear_attn_bwd_kernel(q, k, v, do, dq, dk, dv, h0, s_k_h, s_v_h, scale, B, H, T, K: tl.constexpr, V: tl.constexpr, BK: tl. constexpr, BV: tl.constexpr, USE_INITIAL_STATE: tl.constexpr): i_v, i_k, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) p_q = q + i_bh ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Recurrent Neural Networks", "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "M...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/linear_attn/fused_recurrent.py
47931159-10d0-421b-8cec-3607da49ce15
scratch.py
falkaer/multi-scale-music
seq/scratch.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.jit def apply_dropout(x, offsets, p, seed, mask_val=0.0): scale = 1 / (1 - p) rand = tl.rand(seed, offsets) return tl.where(rand > p, x * scale, mask_val)
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/seq/scratch.py
3dcdbcd6-e7fc-47f6-a45e-152876ac2a6c
gemm_postop_gelu_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/gemm_postop_gelu_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", "Activation Functions" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_postop_gelu_benchmark.py
c2013b8d-c916-45ca-9e2e-44a7016851d9
swiglu.py
ardywibowo/triton-mode
kernels/swiglu.py
5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1
0
@triton.jit def triton_swiglu_forward(input_a_ptr, input_b_ptr, output_ptr, row_stride, num_columns: tl.constexpr, BLOCK_SIZE: tl.constexpr): prog_id = tl.program_id(0).to(tl.int64) input_a_ptr += prog_id * row_stride input_b_ptr += prog_id * row_stride output_ptr += prog_id * row_stride column_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/ardywibowo/triton-mode/blob/5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1/kernels/swiglu.py
852c0812-545a-4d54-a311-09ef7b9a1c60
gemm_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/gemm_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=s, num_warps=32) for s in [1, 2, 3]] + [triton. Config({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K': 32, 'GROUP_SIZE_M': 4, 'grf_mode': ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_benchmark.py
8fca3bd0-a9e4-43f9-9d3d-89cfd7925602
bnrelu.py
neuro-ml/kerops
kerops/kernels/bnrelu.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _ApplyBNReLU_cl3d_impl(X_ptr, Out_ptr, Weight_ptr, Bias_ptr, numel_no_channels, BLOCK_SIZE: tl.constexpr, num_channels: tl.constexpr, block_other: tl.constexpr): pid = tl.program_id(0) X_ptr += pid * BLOCK_SIZE Out_ptr += pid * BLOCK_SIZE channels_offset = tl.arange(0, num_channe...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/bnrelu.py
817c1276-c556-4c1d-b4c5-f46a380bd438
test_autodiff.py
srush/triton-autodiff
tests/test_autodiff.py
f9d1a04d048e3252bfd222646db7175ad60a3c7c
0
@triton.jit def tr2(X, dX, dY): r = tl.arange(0, 16) r2 = tl.arange(0, 16)[:, None] x = tl.load(X + r) dy = tl.load(dY + 16 * r2 + r) tl.static_print('shape', dy.shape) dx = dcomp2dx(x, dy) tl.static_print('shape', dx.shape) tl.store(dX + r, dx)
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/srush/triton-autodiff/blob/f9d1a04d048e3252bfd222646db7175ad60a3c7c/tests/test_autodiff.py
0390ce58-3047-487a-b922-61daab851d88
kernels.py
pytorch-labs/tritonbench
tritonbench/operators/launch_latency/kernels.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.jit def nop_kernel(): pass
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/launch_latency/kernels.py
a2951d7f-12bc-4c56-a281-b5e60b0cf38c
3_mat_mul.py
DataLama/triton-tutorials
tutorials/basic/3_mat_mul.py
95fb36429bdae3333cfcde76b18a00781ba5953e
0
@triton.jit def matmul_kernel(x_ptr, y_ptr, z_ptr, m_size, k_size, n_size, m_block_size: tl.constexpr, k_block_size: tl.constexpr, n_block_size: tl.constexpr): pid = tl.program_id(0) num_n_blocks = tl.cdiv(n_size, n_block_size) m_block = pid // num_n_blocks n_block = pid % num_n_blocks m_offsets...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/DataLama/triton-tutorials/blob/95fb36429bdae3333cfcde76b18a00781ba5953e/tutorials/basic/3_mat_mul.py
d5aed4cd-281b-47ba-b953-7ad565ff7b41
test_inductor.py
triton-lang/kernels
test/test_inductor.py
eeeebdd8be7d13629de22d600621e6234057eed3
0
@triton.jit def triton_(in_ptr0, out_ptr0, XBLOCK: tl.constexpr): xoffset = tl.program_id(0) * XBLOCK xindex = xoffset + tl.arange(0, XBLOCK)[:] x1 = xindex // 8 % 8 x0 = xindex % 8 x2 = xindex // 64 x5 = xindex tmp0 = -1 + x1 tmp1 = -1 + x0 tmp2 = 2 + x1 tmp3 = 2 + x0 tmp4 =...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/triton-lang/kernels/blob/eeeebdd8be7d13629de22d600621e6234057eed3/test/test_inductor.py
e039d6a9-bf1b-4d2b-a12a-b4c00fb3c499
chunk_fuse.py
elephantmipt/rebased_minimal
flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
e7b945509972fab9f9c1c7be431abf7d6bf62c95
0
@triton.jit def chunk_abc_bwd_kernel_dv(do, v, rv, cv, p, dv, dsv, s_qk_h, s_qk_t, s_qk_d, s_sk_h, s_sk_t, s_sk_m, T, BT: tl.constexpr, BV: tl.constexpr, BM: tl.constexpr, DV: tl.constexpr, DM: tl.constexpr, NT: tl.constexpr): i_v, i_m, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) n_bh = ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/elephantmipt/rebased_minimal/blob/e7b945509972fab9f9c1c7be431abf7d6bf62c95/flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py
b6e5ba5c-cdbe-470c-b934-3a35c1c5bedd
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({'BS': BS}, num_warps=num_warps) for BS in [16, 32, 64] for num_warps in [2, 4, 8]], key=['S', 'BT']) @triton.jit def chunk_local_reversed_cumsum_vector_kernel(s, o, offsets, indices, T: tl .con...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/cumsum.py
7f6f8b3f-9d2a-4ae0-a2ad-35655192d89f
_flash_attention.py
IBM/qattn
qattn/nn/functional/_flash_attention.py
07ceda0aceb9afd299d622325944c0c0471827fe
0
@triton.autotune(configs=_get_configs(), key=['N_CTX', 'H', 'Z']) @triton.heuristics({'EVEN_CTX': lambda args: args['N_CTX'] % args['BLOCK_M' ] == 0}) @triton.jit def _fwd_kernel(Q, K, V, sm_scale, qkv_scale_ptr, out_scale_ptr, Out, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn...
{ "Data Type": [ "bf16", "int8" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication", "Quantization" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "...
[ "MIT" ]
https://github.com/IBM/qattn/blob/07ceda0aceb9afd299d622325944c0c0471827fe/qattn/nn/functional/_flash_attention.py
e981bb06-78d6-48a1-8fb8-10d5a6f3bfc8
mhmoe.py
dtadpole/triton-playground
mhmoe.py
2d317976722d63080133b1bf88b1f0cdec98f831
0
@triton.jit def d_sigmoid(o): return o * (1 - o)
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Backpropagation" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe.py
f79fde84-d03b-40dd-bc48-598749dc2167
layer_norm_dquant.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/layer_norm_dquant.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _layer_norm_dquant_kernel(X, Y, W, B, out, scale, stride, N, eps, BLOCK_SIZE: tl.constexpr): row = tl.program_id(0) Y += row * stride X += row * stride out += row * stride _mean = tl.zeros([BLOCK_SIZE], dtype=tl.float32) for off in range(0, N, BLOCK_SIZE): cols = off ...
{ "Data Type": [ "int8", "fp32" ], "Functionality": [ "Normalization", "Quantization" ], "Memory Access Pattern": [ "Coalesced", "Register Intensive" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput...
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/layer_norm_dquant.py
4e233564-be5f-4852-b99c-34dbe18c056e
sparse_copy.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/sparse_copy.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def copy_dense_to_sparse_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" ], "Functionality": [ "Top-K Selection" ], "Memory Access Pattern": [ "Coalesced", "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
82c88b83-f264-4ebd-b42a-842e936a1e5b
activation.py
chengzeyi/stable-fast
src/sfast/triton/ops/activation.py
3a6f35c7045f8f6812515957ca62ef37260ff080
0
@triton.jit def silu(x): return x * tl.sigmoid(x.to(tl.float32)).to(x.dtype)
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions", "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/activation.py
0ea9b7a0-8530-4964-b178-926fbf55411b
triton_kernels.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/triton_kernels.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def _triton_fourth_order_bwd(x_ptr: tl.tensor, y_ptr: tl.tensor, z_ptr: tl. tensor, g_x_ptr: tl.tensor, g_y_ptr: tl.tensor, g_z_ptr: tl.tensor, g_1_0_ptr: tl.tensor, g_1_1_ptr: tl.tensor, g_1_2_ptr: tl.tensor, g_2_0_ptr: tl.tensor, g_2_1_ptr: tl.tensor, g_2_2_ptr: tl.tensor, g_2_3_ptr: tl.te...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced", "Register Intensive" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/triton_kernels.py
77276a0a-ca29-4f47-ba40-e00bfa0d002c
kernels.py
pytorch-labs/tritonbench
tritonbench/operators/sum/kernels.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(configs=[triton.Config({'BLOCK_SIZE_N': b_n, 'BLOCK_SIZE_K': b_k}, num_warps=w) for b_n, b_k, w in itertools.product ([(4 ** n) for n in range(7)], [(4 ** n) for n in range(4)], [2, 4, 8]) ], key=['N']) @triton.jit def triton_sum_kernel_2D_result_dim_1_buffer_then_sum(input_ptr, output_ptr,...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Blocked Access", "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughp...
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/sum/kernels.py
819bf337-44ca-4907-932b-9e1c4bbf4365
pointwise.py
ServiceNow/Fast-LLM
fast_llm/functional/triton/pointwise.py
8b46289079da67cba99628448a6b6083dac083cf
0
@triton.jit def triton_fill_kernel(input_ptr, value: tl.constexpr, numel: tl.constexpr, dtype: tl.constexpr, block_size: tl.constexpr): block_start = tl.program_id(axis=0).to(tl.int64) * block_size offsets = block_start + tl.arange(0, block_size) mask = offsets < numel tl.store(input_ptr + offsets, ...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput", "Memory-Bound" ] }
[ "Apache" ]
https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/pointwise.py
903ee2c1-1f8e-43cb-94cc-41866b2e116f
math.py
BobMcDear/attorch
attorch/math.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.jit def calc_p_loss(input, target, size, p_loss: tl.constexpr, reduction: tl. constexpr): """ Measures the L1 or squared L2 norm of the difference between the input and target (i.e., mean absolute error or mean squared error). Args: input: Input. The input must be of sha...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/math.py
cc350db1-2b6c-4dc4-9911-76e59d19de8e
quant_per_block.py
rodjjo/editorium
editorium/app/server/pipelines/cogvideo/sageattention/quant_per_block.py
7b92e2c92a144bf23bbe6fe88e3d513ffcf7d694
0
@triton.jit def q_kernel_per_block_int8(X, X_int8, BLK: tl.constexpr, Scale, L, C: tl. constexpr, scale_stride): off_b = tl.program_id(1) off_blk = tl.program_id(0) x_offset = off_b * L * C offs_m = off_blk * BLK + tl.arange(0, BLK) offs_k = tl.arange(0, C) x_ptrs = X + x_offset + offs_m[:, ...
{ "Data Type": [ "int8", "fp32" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/rodjjo/editorium/blob/7b92e2c92a144bf23bbe6fe88e3d513ffcf7d694/editorium/app/server/pipelines/cogvideo/sageattention/quant_per_block.py
f225f117-ee5a-49a5-a8cd-9527e6e0e161
triton_mars_adamw.py
lessw2020/MARS-AdamW-PyTorch
triton_mars_adamw.py
c312b763d079f38291492bc911e8ea8aa1967433
0
@triton.jit def mars_adamw_kernel(param_ptr, grad_ptr, exp_avg_ptr, exp_avg_sq_ptr, prev_grad_ptr, lr, beta1, beta2, eps, weight_decay, gamma, max_grad_norm, step, bias_correction1, bias_correction2, n_elements, BLOCK_SIZE: tl.constexpr): pid = tl.program_id(0) block_start = pid * BLOCK_SIZE off...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/lessw2020/MARS-AdamW-PyTorch/blob/c312b763d079f38291492bc911e8ea8aa1967433/triton_mars_adamw.py
4282b81a-47ee-476a-b8f3-60d4b209555f
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_bwd_kernel_K(q, k, v, z, h, A, do, dh, dq, dk, dv, dA, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, s_h_h, s_h_t, s_h_d, scale, T: tl. constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl. constexpr, BV: tl.constexpr): i_k, i_t, i_bh = tl.program_id(0), tl.program...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access", "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings", "Cooperative Groups" ], "Performance Objective": [ "Compute Bound", ...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
adfad45d-a068-444b-b194-56d3022e2f4a
scratch.py
falkaer/multi-scale-music
seq/scratch.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.jit def _dropout(X, O, stride_x1, stride_x2, stride_o1, stride_o2, dropout_prob, dropout_seed, M, N, BLOCK: tl.constexpr): offs_m = tl.program_id(0) * BLOCK + tl.arange(0, BLOCK) offs_n = tl.program_id(1) * BLOCK + tl.arange(0, BLOCK) X = X + offs_m[:, None] * stride_x1 + offs_n[None, :] * strid...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/seq/scratch.py
dbf37971-a262-44ef-989d-77aeac137b61
utils.py
huyz2023/2by4-pretrain
sparse/utils.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _sparse24(x0, x1, x2, x3): a1, a2, a3, a4, a5, a6 = tl.abs(x0) > tl.abs(x1), tl.abs(x0) > tl.abs(x2 ), tl.abs(x0) > tl.abs(x3), tl.abs(x1) > tl.abs(x2), tl.abs(x1 ) > tl.abs(x3), tl.abs(x2) > tl.abs(x3) m0, m1, m2, m3 = (a2 & a3 | a1 & a2 | a1 & a3, ~a1 & a5 | a4 & a5 | ~a1 & ...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/utils.py
52dd01fd-ccd7-4456-9d0e-9fcf7c68fc38
GELUglu.py
huyz2023/2by4-pretrain
sparse/GELUglu.py
9e330125dea71e5a3dee235f4efb8869f9e4cdd0
0
@triton.jit def _gelu_glu_fwd_kernel_(output_ptr, input_ptr, output_row_stride, input_row_stride, output_col_stride, input_col_stride, n_rows, n_cols, BLOCK_SIZE: tl.constexpr): col_idx = tl.program_id(0) row_idx = tl.arange(0, BLOCK_SIZE) x = tl.load(input_ptr + row_idx * input_row_stride + col_idx...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Strided Access", "Coalesced" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "BSD" ]
https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/GELUglu.py
38d42e7c-347d-4ccf-b10b-1860c22d5877
chunk_h_parallel.py
sustcsonglin/flash-linear-attention
fla/ops/common/chunk_h_parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not None, 'STORE_FINAL_STATE': lambda args: args['ht'] is not None, 'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({'BK': BK, 'BV': BV}, num_warps= num_warps, num_stages=num_stages) for BK ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Tiled", "Blocked Access" ], "Parallelization Strategy": [ "Cooperative Groups", "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ...
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/common/chunk_h_parallel.py
fa2c1086-b9be-4a8b-ae3e-2b5cda3eb8d6
fused_chunk.py
sustcsonglin/flash-linear-attention
fla/ops/gla/fused_chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def prepare_qg_kg(q, k, g, qg, kg, s_k_h, scale, K: tl.constexpr, BT: tl. constexpr, BK: tl.constexpr): i_k, i_c, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2) p_q = q + i_bh * s_k_h + i_c * BT * K + i_k * BK + tl.arange(0, BK) p_g = g + i_bh * s_k_h + i_c * BT * K + i_k * BK +...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/fused_chunk.py
c79e3bed-77f3-4997-8cb9-825857d15dba
blocksparse_attention_kernel.py
Charlie-XIAO/sparse-vllm
vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py
d228909a30b0c245c35417fb7d2acdf9a3690042
0
@triton.heuristics({'M_LT_N': lambda kwargs: kwargs['BLOCK_M'] < kwargs[ 'BLOCK_N']}) @triton.jit def _fwd_kernel_batch_inference(Q, K, V, Out, sm_scale, q_batch_starts, q_batch_ends, k_batch_starts, k_batch_ends, q_batch_ids, q_start_sids, stride_qb, stride_qt, stride_qh, stride_qd, stride_kb, stride_kt, ...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Blocked Access", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Hi...
[ "Apache" ]
https://github.com/Charlie-XIAO/sparse-vllm/blob/d228909a30b0c245c35417fb7d2acdf9a3690042/vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py
c300b4e5-1dbd-46a8-8b9f-f7553220381b
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_bwd_kernel(x, dx, dy, temperature, T: tl.constexp...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Activation Functions" ], "Memory Access Pattern": [ "Coalesced", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/activations.py
b43d8c40-6f78-4266-94b9-fa7ef9d6e79b
fused_attention.py
jax-ml/jax-triton
examples/fused_attention.py
859cc392bec876d132bd0790ea6c00b6c246dd2b
0
@triton.jit def fused_attention_kernel(Q, K, V, 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, L, M, Out, BLOCK_M: tl.constexpr, BLOCK_DMODEL: tl.constexpr, BLOCK...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Th...
[ "Apache" ]
https://github.com/jax-ml/jax-triton/blob/859cc392bec876d132bd0790ea6c00b6c246dd2b/examples/fused_attention.py
4cfcaf22-7a0b-419b-aee9-80c0e072e341
p_loss_kernels.py
BobMcDear/attorch
attorch/p_loss_kernels.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.autotune(configs=element_wise_kernel_configs(), key=['size']) @triton.jit def p_loss_forward_kernel(input_pointer, target_pointer, output_pointer, size, p_loss: tl.constexpr, reduction: tl.constexpr, BLOCK_SIZE: tl. constexpr): """ Measures the L1 or squared L2 norm of the difference between the...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Coalesced", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput", "Memory-Bound" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/p_loss_kernels.py
06715f51-47ba-4d5e-b5b1-762ebe00b772
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/abc/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def chunk_abc_bwd_kernel_rcum_inter(s, z, ss, doo, s_s_h, s_s_t, s_s_d, T: tl.constexpr, S: tl.constexpr, BT: tl.constexpr, BS: tl.constexpr, NT: tl.constexpr): i_m, i_bh = tl.program_id(0), tl.program_id(1) b_sp = tl.zeros([BS], dtype=tl.float32) b_zp = tl.full([BS], float('inf'), dtype...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/abc/chunk.py
a7157c38-ed86-4b92-a574-24221d10c58b
RzLinearBackward.py
apd10/RzLinear
python/rz_linear/impl/RzLinearBackward.py
eb56657b2de0a97f398f88af421b0fbcbc5469c9
0
@triton.jit def rz_linear_backward_input_grad_core(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, BLOCK_SI...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Backpropagation" ], "Memory Access Pattern": [ "Tiled", "Coalesced", "Blocked Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearBackward.py
05d08524-53cf-4f3e-9cb8-78a7df7efc34
y_6.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_6.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def sixth_order_bwd(coord_ptr: tl.tensor, coord_grad_ptr: tl.tensor, sph_grad_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl. constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr, output_stride: tl.constexpr): block_id = tl.program_id(0) coord_stride = 3 coord_s...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access", "Blocked Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_6.py
a0f70947-0554-494b-86bd-c3544da457a5
chunk.py
sustcsonglin/flash-linear-attention
fla/ops/rwkv6/chunk.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None}) @triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({}, num_warps=2), triton.Config({}, num_warps=4), triton.Config({}, num_warps=8)], key=['BK', 'NC', 'BT']) @triton.jit def chunk_rwkv6_bwd_kernel_intra(q, k, gi, ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py
7dce9668-e8af-4269-bead-36df38944bcf
test_trampolines.py
makslevental/triton-pp
tests/test_trampolines.py
e2b3e2a35d96007fa1ae129432cf8e99f44588a1
0
@triton.jit def kernel_0123(): c64 = arith.constant(64) v0 = tl.get_program_id(axis='x') air.channel('bob')
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "Apache" ]
https://github.com/makslevental/triton-pp/blob/e2b3e2a35d96007fa1ae129432cf8e99f44588a1/tests/test_trampolines.py
4c1cbb13-c951-420c-9482-b1b3dfa04e72
flash_attn_v2.py
AlibabaPAI/FLASHNN
flashnn/triton_kernels/flash_attn_v2.py
528a9301587f5fb135b25d973a87ba0a40a703a7
0
@triton.jit def _triton_attn_fwd(Q, K, V, sm_scale, Out, stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_km, stride_kk, stride_vz, stride_vh, stride_vm, stride_vk, stride_oz, stride_oh, stride_om, stride_ok, Z, H, N_CTX, POWER_OF_2_N_CTX: tl.constexpr, BLOCK_M: tl.constexpr, BLO...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Attention Mechanisms", "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled", "Coalesced", "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Th...
[ "Apache" ]
https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/flash_attn_v2.py
5d6abe36-b7ab-46ee-8bc8-8b128a0ced17
mhmoe_bwd.py
dtadpole/triton-playground
mhmoe_bwd.py
2d317976722d63080133b1bf88b1f0cdec98f831
0
@triton.jit def d_leacky_relu_inv_backward(x): return tl.where(x >= 0, 1.0, 0.01)
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation", "Activation Functions" ], "Memory Access Pattern": [ "Coalesced", "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe_bwd.py
ded8c553-2ca2-4e7d-9912-b022a9f954cd
seqlen_utils.py
Kitsunetic/kitsu
kitsu/nn/seqlen_utils.py
826967a493c89753ac2cf1e28b52b79998fc9076
0
@triton.jit def code_to_seqlen_kernel(code_ptr, seqlen_ptr, B, N, BLK: tl.constexpr): pid = tl.program_id(0) out = tl.zeros((1,), dtype=tl.int32) for nidx in range(tl.cdiv(N, BLK)): offs_n = nidx * BLK + tl.arange(0, BLK) mask_n = offs_n < N code = tl.load(code_ptr + offs_n, mask=mas...
{ "Data Type": [], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/seqlen_utils.py
6138d269-eae2-4f97-9029-ca31d8e08751
triton_gather_gemv.py
pytorch-labs/tritonbench
tritonbench/operators/gather_gemv/triton_gather_gemv.py
3a5dccb159834968567a2e45e561dc1aeaa8f8a8
0
@triton.autotune(configs=[triton.Config({'XBLOCK': 1, 'RBLOCK': 2048}, num_stages=1, num_warps=8), triton.Config({'XBLOCK': 64, 'RBLOCK': 8}, num_stages=1, num_warps=8), triton.Config({'XBLOCK': 64, 'RBLOCK': 4}, num_stages=1, num_warps=8), triton.Config({'XBLOCK': 8, 'RBLOCK': 512}, num_stages=1, num_w...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD" ]
https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/gather_gemv/triton_gather_gemv.py
98971ea6-db2e-4e5f-a174-4421a69d2430
parallel.py
sustcsonglin/flash-linear-attention
fla/ops/retention/parallel.py
5968de9a22c096326b19859cfe05dac36155c31d
0
@triton.jit def parallel_retention_bwd_kernel_dkv(i_bh, i_t, i_k, i_v, i_h, q, k, v, do, 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.constexpr): b_b = tl.math.log2(1 - tl.math.exp2(-5 -...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/retention/parallel.py
1b335466-e870-434b-8c7d-160154dc930f
k_layer_norm.py
cpuhrsch/torchfused
torchfused/triton/k_layer_norm.py
6c40ed160dcecbe7825f268f7c86bccd359e0ebf
0
@triton.jit def _layer_norm_bwd_dx_fused(DX, DY, DW, DB, Y, W, B, V, Lock, stride, N, **META): GROUP_SIZE_M = META['GROUP_SIZE_M'] BLOCK_SIZE_N = META['BLOCK_SIZE_N'] row = tl.program_id(0) cols = tl.arange(0, BLOCK_SIZE_N) y_ptrs = Y + row * stride + cols dy_ptrs = DY + row * stride + cols ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/cpuhrsch/torchfused/blob/6c40ed160dcecbe7825f268f7c86bccd359e0ebf/torchfused/triton/k_layer_norm.py
e5d45e57-5c7b-4d2f-bf3e-65b3b35a34ee
softmax_loop_along_reduce_axis_v1.py
iclementine/optimize_softmax
softmax_loop_along_reduce_axis_v1.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def softmax_kernel_loop_v1(output_ptr, input_ptr, M, N, TILE_N: tl.constexpr): pid_m = tl.program_id(0) m = tl.full((), value=-float('inf'), dtype=output_ptr.dtype.element_ty) for start_n in range(0, N, TILE_N): n_offsets = start_n + tl.arange(0, TILE_N) offset = pid_m * N + n_of...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD" ]
https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_loop_along_reduce_axis_v1.py
5de2aa3e-085e-4400-b082-14c3014eba37
softplus.py
shawntan/stickbreaking-attention
stickbreaking_attention/sb_varlen/softplus.py
8dd32ad5e58f0ee0232fd4782dc53d354ff8d283
0
@triton.jit def softplus(x, is_compiling: tl.constexpr=False): if is_compiling: tl.static_print('Using triton softplus.') out = tl.where(x < 15.0, tl.math.log2(1 + tl.math.exp2(x)), x) return out else: out = tl.inline_asm_elementwise(asm=asm_str, constraints= constrai...
{ "Data Type": [ "fp32" ], "Functionality": [ "Activation Functions" ], "Memory Access Pattern": [ "Non-Tiled" ], "Parallelization Strategy": [], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/shawntan/stickbreaking-attention/blob/8dd32ad5e58f0ee0232fd4782dc53d354ff8d283/stickbreaking_attention/sb_varlen/softplus.py
a68d784e-b08f-44c8-afff-6f1cd84ee225
gemm_streamk_benchmark.py
intel/intel-xpu-backend-for-triton
benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py
6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2
0
@triton.jit def mac_loop(a_ptr, b_ptr, c_ptr, M: tl.constexpr, N: tl.constexpr, K: tl. constexpr, stride_am: tl.constexpr, stride_ak: tl.constexpr, stride_bk: tl.constexpr, stride_bn: tl.constexpr, stride_cm: tl.constexpr, stride_cn: tl.constexpr, iters_per_tile, start_iter, end_iter, BLOCK_SIZE_M: tl.c...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Blocked Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py
a730fe03-8fd6-4e0a-9e86-85418a5bb767
memory.py
USC-NSL/DisagMoE
disagmoe/ops/memory.py
6e86ce027a9622109ce81e691af1a48c1d5dbaf2
0
@triton.jit def _permute_tokens_kernel(out_ptr, in_ptr, mapping, hidden_size, BLOCK_SIZE: tl.constexpr): token_id = tl.program_id(axis=0) block_id = tl.program_id(axis=1) target_pos = tl.load(mapping + token_id) src_start = token_id * hidden_size + block_id * BLOCK_SIZE src_offsets = src_start +...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Transposed Access" ], "Parallelization Strategy": [], "Performance Objective": [ "High Throughput" ] }
[ "Apache" ]
https://github.com/USC-NSL/DisagMoE/blob/6e86ce027a9622109ce81e691af1a48c1d5dbaf2/disagmoe/ops/memory.py
dec34255-4bf5-4a35-bd29-31122d76da6e
quantization.py
neuro-ml/kerops
kerops/kernels/quantization.py
735336775e825d5cb06b8850d25423661b12d1ac
0
@triton.jit def _DequantUint8Window_impl(input_ptr, output_ptr, numel, window, BLOCK_SIZE: tl.constexpr): tid = tl.program_id(0) input_ptr += tid * BLOCK_SIZE output_ptr += tid * BLOCK_SIZE offset = tl.arange(0, BLOCK_SIZE) mask = offset < numel - tid * BLOCK_SIZE input = tl.load(input_ptr +...
{ "Data Type": [ "uint8" ], "Functionality": [ "Quantization" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/quantization.py
6a43bf82-bfad-4982-8ad6-8c9316f953e6
math.py
BobMcDear/attorch
attorch/math.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.jit def cross_entropy_loss(input, pred): """ Measures the per-row cross entropy loss given input and predicted logits corresponding to target class. Args: input: Input. The input must be of shape [BLOCK_SIZE1, BLOCK_SIZE2]. pred: Predicted logits corresponding to tar...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax" ], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/math.py
115476f9-cb8c-4ec2-895c-340862360239
fp8_gemm.py
pytorch/FBGEMM
fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.autotune(configs=MATMUL_CONFIGS, key=['m_key', 'n_key', 'k_key'], prune_configs_by={'early_config_prune': prune_configs_block, 'perf_model': estimate_matmul_time, 'top_k': 10}) @triton.heuristics({'EVEN_K': lambda args: args['K'] % (args['BLOCK_K'] * args['SPLIT_K']) == 0}) @triton.jit def _kernel_m...
{ "Data Type": [], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py
5514dae5-9a0b-4b86-9296-8b765d29d9a5
math.py
BobMcDear/attorch
attorch/math.py
da06cb6236bb47195e33fe3986ed21c675ed94cc
0
@triton.jit def update_welford(input, prev_count, prev_mean, prev_var, curr_count, mask: tl.constexpr): """ Updates count, mean, and variance (M2) statistics for Welford's algorithm. Args: input: Input used to update statistics. The input must be of the same shape as the mask. ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/math.py
094af577-4f53-4a31-868b-1e8681830008
outer_softmax.py
iclementine/optimize_softmax
outer_softmax.py
6ddeee3481dd5e63f4a30b946c417e97bc4494bf
0
@triton.jit def softmax_kernel(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) n_offsets = tl.arange(0, TILE_N) offset = pid_m * N * K + n_offsets[:, None] * K + k_off...
{ "Data Type": [ "fp32" ], "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/outer_softmax.py
0a7754cd-aa42-48c9-a0f9-486516dcd1a4
group_norm.py
chengzeyi/stable-fast
src/sfast/triton/ops/group_norm.py
3a6f35c7045f8f6812515957ca62ef37260ff080
0
@eval( """triton.heuristics({ 'ROW_SIZE': lambda kwargs: triton.next_power_of_2(kwargs['C'] // kwargs['groups']), 'BLOCK_SIZE': lambda kwargs: max( 1, min(triton.next_power_of_2(kwargs['cluster_size']), 4096 // (triton.next_power_of_2(kwargs['C'] // kwargs['groups'])) ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Normalization" ], "Memory Access Pattern": [ "Tiled" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/group_norm.py
fd13e143-89d0-45f8-b215-8f6705c789eb
blocksparse_matmul.py
kimiasa/Experiments
src/models/attention/blocksparse_matmul.py
c4e73bfefd8290695ec52b6386b6b81838ca94a1
0
@triton.jit def _kernel(A, B, C, stride_za, stride_ha, stride_ma, stride_ka, stride_zb, stride_hb, stride_kb, stride_nb, stride_zc, stride_hc, stride_mc, stride_nc, DS0, DS1, SDD_K, SDD_off_width, lut, locks, nlocks, **meta): TM = meta['TM'] TN = meta['TN'] TK = meta['TK'] TZ = meta['TZ'] BL...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication" ], "Memory Access Pattern": [ "Coalesced", "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/kimiasa/Experiments/blob/c4e73bfefd8290695ec52b6386b6b81838ca94a1/src/models/attention/blocksparse_matmul.py
9822ff51-7759-462c-94c3-f99295b342b9
seqlen_utils.py
Kitsunetic/kitsu
kitsu/nn/seqlen_utils.py
826967a493c89753ac2cf1e28b52b79998fc9076
0
@triton.jit def padding_index_kernel(seqlen_ptr, new_seqlen_ptr, new_max_seqlen, idx_ptr, window_size, BLK_N: tl.constexpr): pid_b = tl.program_id(0) i1 = tl.load(seqlen_ptr + pid_b).to(tl.int32) j1 = tl.load(seqlen_ptr + pid_b + 1).to(tl.int32) i2 = tl.load(new_seqlen_ptr + pid_b).to(tl.int32) ...
{ "Data Type": [], "Functionality": [], "Memory Access Pattern": [], "Parallelization Strategy": [], "Performance Objective": [] }
[ "MIT" ]
https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/seqlen_utils.py
176b1708-5add-44dc-a5d9-163681f5d85f
triton_sll.py
pytorch/FBGEMM
fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
fe980ab54a6e28818d81c8694b6564e7f804418b
0
@triton.jit def _multi_head_jagged_flash_attention_bwd_preprocess_kernel(o_ptr, o_offset_ptr, do_ptr, delta_ptr, stride_oh, stride_om, stride_od, stride_delta_h, num_heads: tl.constexpr, max_seq_len: tl.constexpr, D: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_D: tl.constexpr): pid_m = tl.program_id(axis...
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "BSD", "MIT" ]
https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py
8f0a1ee8-5be7-4e8c-824f-b08939f27687
y_8.py
IntelLabs/EquiTriton
src/equitriton/sph_harm/direct/y_8.py
1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c
0
@triton.jit def eighth_order_bwd(coord_ptr: tl.tensor, coord_grad_ptr: tl.tensor, sph_grad_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl. constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr, output_stride: tl.constexpr): block_id = tl.program_id(0) coord_stride = 3 coord_...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_8.py
e6ddf2c9-7f59-4c42-b78f-bc7715065c3e
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': BT}, num_warps=num_warps) for BT in [16, 32, 64] for num_warps in [2, 4, 8]], key=['S']) @triton.jit def chunk_global_reversed_cumsum_vector_kernel(s, z, offsets, T: tl. constexpr, H: tl....
{ "Data Type": [ "fp32" ], "Functionality": [ "Attention Mechanisms" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/cumsum.py
f0ab72b8-9381-4758-a492-d2577626d98d
flash_triton.py
MayDomine/Burst-Attention
burst_attn/flash_triton.py
b088c554072935074ea9c643de5ee363be5ab1f6
0
@triton.jit def _bwd_preprocess_do_o_dot(Out, DO, Delta, stride_ob, stride_oh, stride_om, stride_dob, stride_doh, stride_dom, nheads, seqlen_q, seqlen_q_rounded, headdim, BLOCK_M: tl.constexpr, BLOCK_HEADDIM: tl. constexpr): start_m = tl.program_id(0) off_hb = tl.program_id(1) off_b = off_hb // ...
{ "Data Type": [ "fp32" ], "Functionality": [ "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound" ] }
[ "Apache" ]
https://github.com/MayDomine/Burst-Attention/blob/b088c554072935074ea9c643de5ee363be5ab1f6/burst_attn/flash_triton.py
278158ef-9d13-42d9-9403-ad874e38674a
shape.py
2niuhe/triton_utils
src/triton_utils/shape.py
6184906ac3b86dac3ccbfac128ec393ccecde5df
0
@triton.jit def store_full_2d(vals, ptr, sz0: tl.constexpr, sz1: tl.constexpr, stride0= None, stride1=1): """Store 2d block into matrix (defined by ptr)""" stride0 = stride0 or sz1 offs = get_2d_offset(tl.arange(0, sz0), tl.arange(0, sz1), stride0, stride1 ) mask = get_2d_mask(tl.arange(0, s...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Low Latency" ] }
[ "Apache" ]
https://github.com/2niuhe/triton_utils/blob/6184906ac3b86dac3ccbfac128ec393ccecde5df/src/triton_utils/shape.py
b0e2d0fb-4469-4b96-82eb-ab68f3187e7b
triton_kernel.py
yann-Choho/projet_PPML
notebooks/triton_kernel.py
9274e0561443b01f029ee6e0737f922f71d2da39
0
@triton.autotune(configs=get_autotune_config(), key=['M', 'N', 'K']) @triton.jit def ff_llama(a_ptr, w1_ptr, w3_ptr, out_ptr, M, N, K, stride_am, stride_ak, stride_w1k, stride_w1n, stride_w3k, stride_w3n, stride_outm, stride_outn, USE_FP8: tl.constexpr, EPS: tl.constexpr, BLOCK_SIZE_M: tl .constexpr, BLOCK_...
{ "Data Type": [ "fp32", "fp16" ], "Functionality": [ "Activation Functions", "Matrix Multiplication", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bou...
[ "MIT" ]
https://github.com/yann-Choho/projet_PPML/blob/9274e0561443b01f029ee6e0737f922f71d2da39/notebooks/triton_kernel.py
ea665a0c-9ad0-4547-bcd9-8f5d72e5f94b
mlstm_matmul.py
LukasBluebaum/xLSTM-Triton-CUDA-Implementation
mlstm_matmul.py
6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b
0
@triton.jit def mlstm_matmul_kernel(Q, K, V, F, I, M, B, H, 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_q = batch_id * NH * S * D + head_id * S * D batch_off...
{ "Data Type": [ "fp32" ], "Functionality": [ "Matrix Multiplication", "Recurrent Neural Networks" ], "Memory Access Pattern": [ "Strided Access", "Transposed Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", ...
[ "MIT" ]
https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_matmul.py
27fc8e86-3d25-4ff7-b9cb-308bd627ca58
sequential_rnn_scan.py
TushaarGVS/linear-rnn
linear_rnn/triton/sequential_rnn_scan.py
48320589b73154484be7d09a144923a2b9e56b85
0
@triton.jit def _sequential_rnn_scan_fwd_kernel(x_ptr, a_ptr, h0_ptr, out_ptr, stride_x_batch, stride_x_len, stride_x_dim, stride_a_batch, stride_a_len, stride_a_dim, stride_h0_batch, stride_h0_dim, stride_out_batch, stride_out_dim, seq_len: tl.constexpr, BLOCK_SIZE: tl .constexpr): pid_batch = tl.p...
{ "Data Type": [ "fp32" ], "Functionality": [ "Recurrent Neural Networks", "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "Apache" ]
https://github.com/TushaarGVS/linear-rnn/blob/48320589b73154484be7d09a144923a2b9e56b85/linear_rnn/triton/sequential_rnn_scan.py
70061971-e534-482c-8c08-07c373e9ef4d
mse.py
l1351868270/implicit_gemm.triton
triton_kernel/mse.py
64eb8548ccf4576883c928f6315be8b24680a455
0
@triton.jit def _ld_mse_fwd_kernel(loss_ptr, input_ptr, target_ptr, loss_row_stride, input_row_stride, target_row_stride, n_rows, n_cols, BLOCK_SIZE: tl. constexpr): pid = tl.program_id(0) col_offsets = tl.arange(0, BLOCK_SIZE) mask = col_offsets < n_cols input_ptrs = input_ptr + pid * input_row...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Grid-Stride Loops" ], "Performance Objective": [ "Compute Bound", "High Throughput" ] }
[ "MIT" ]
https://github.com/l1351868270/implicit_gemm.triton/blob/64eb8548ccf4576883c928f6315be8b24680a455/triton_kernel/mse.py
e6c654b9-0a74-43ae-8353-03aef9101762
snake.py
falkaer/multi-scale-music
snake.py
a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d
0
@triton.autotune(configs=[triton.Config({}, num_warps=4), triton.Config({}, num_warps=8), triton.Config({}, num_warps=16)], key=['C']) @triton.jit def _snake_fwd_triton(X, OUT, ALPHA, CR, X_stride1, X_stride2, X_stride3, OUT_stride1, OUT_stride2, OUT_stride3, A_stride, C_stride, C, N, CORR: tl.constexpr, BL...
{ "Data Type": [ "fp32" ], "Functionality": [ "Elementwise Operations", "Activation Functions" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput", "Compute Bound" ] }
[ "MIT" ]
https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/snake.py
b05a8075-2ff7-49c6-891a-44aefc01ecb3
softmax.py
sustcsonglin/flash-linear-attention
fla/ops/utils/softmax.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 softmax_bwd_kernel(p, dp, ds, D: tl.constexpr, B: tl.constex...
{ "Data Type": [ "fp32" ], "Functionality": [ "Softmax", "Backpropagation" ], "Memory Access Pattern": [ "Strided Access" ], "Parallelization Strategy": [ "Thread-Block Mappings" ], "Performance Objective": [ "High Throughput" ] }
[ "MIT" ]
https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/softmax.py