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 |
|---|---|---|---|---|---|---|---|---|---|
a0a75d1e-5e2f-47cc-b051-e6ae5e19ac3a | normalization.py | rosinality/halite | src/halite/nn/normalization.py | 0653355c3dac8cfa80d66ec5a82c202c49c64205 | 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'])
@triton.jit
def _rms_norm_bwd_kernel_sm(X, stride_x, W, DY, stride_dy, DX, s... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/rosinality/halite/blob/0653355c3dac8cfa80d66ec5a82c202c49c64205/src/halite/nn/normalization.py |
69397af9-0c6f-44c6-9f5b-a774c749f5b4 | linear.py | ai-compiler-study/triton-kernels | triton_kernels/ops/linear.py | 2308e5e9d965059fe2d19b4d535debac4970b69e | 0 | @triton.jit
def triton_linear(a_ptr, b_ptr, c_ptr, out_ptr, M, N, K, stride_am,
stride_ak, stride_bk, stride_bn, GROUP_M: tl.constexpr, EVEN_K: tl.
constexpr, ALLOW_TF32: tl.constexpr, ACC_TYPE: tl.constexpr,
B_PROLOGUE_CAST_TYPE: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N: tl.
constexpr, BLOCK_K: tl.... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ai-compiler-study/triton-kernels/blob/2308e5e9d965059fe2d19b4d535debac4970b69e/triton_kernels/ops/linear.py |
ec7504ed-22fc-448a-af45-338b981af454 | slstm_bw.py | NX-AI/flashrnn | flashrnn/flashrnn/triton_fused/slstm_bw.py | 3fca666a81c8740af4878d7bc5e2a51900e4fe14 | 0 | @triton.jit
def _backward_sequence_kernel(delta_states_all_outside,
delta_states_last_outside, R, states_all, gates_all,
delta_states_initial, delta_Wx, delta_R, delta_b, T: tl.constexpr, NS:
tl.constexpr, B: tl.constexpr, NH: tl.constexpr, DH: tl.constexpr, NGI:
tl.constexpr, NGR: tl.constexpr, siz_B: ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT",
"BSD"
] | https://github.com/NX-AI/flashrnn/blob/3fca666a81c8740af4878d7bc5e2a51900e4fe14/flashrnn/flashrnn/triton_fused/slstm_bw.py |
ca9df654-133c-4ad7-bf52-bab6ba0855c7 | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def _bwd_preprocess_do_o_dot(o_ptr, do_ptr, delta_ptr, T, stride_ob,
stride_ot, stride_od, stride_do_b, stride_do_t, stride_do_d, BLOCK_T:
tl.constexpr, BLOCK_D: tl.constexpr):
start_t = tl.program_id(0)
offs_t = start_t * BLOCK_T + tl.arange(0, BLOCK_T)
pid_b = tl.program_id(1)
offs... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Memory-Bound",
"High Throughput"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
89cd787f-1e2c-4865-a904-bc0d36218c36 | flash_attention_nopad.py | tascj/kaggle-lmsys-chatbot-arena | human_pref/inference/ops/flash_attention_nopad.py | 83cd93d50b9283c18711e8c63e4e1c6399c7b9ce | 0 | @triton.jit
def _fwd_kernel(Q, K, V, sm_scale, B_Start_Loc, B_Seqlen, Out, stride_qbs,
stride_qh, stride_qd, stride_kbs, stride_kh, stride_kd, stride_vbs,
stride_vh, stride_vd, stride_obs, stride_oh, stride_od, kv_group_num,
logit_softcapping: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_DMODEL:
tl.conste... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Attention Mechanisms",
"Softmax",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High ... | [
"Apache"
] | https://github.com/tascj/kaggle-lmsys-chatbot-arena/blob/83cd93d50b9283c18711e8c63e4e1c6399c7b9ce/human_pref/inference/ops/flash_attention_nopad.py |
3b340b98-2a14-4946-85d4-8529289fd141 | mhmoe_bwd.py | dtadpole/triton-playground | mhmoe_bwd.py | 2d317976722d63080133b1bf88b1f0cdec98f831 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_B': 32, 'BLOCK_SIZE_E':
32}, num_stages=3, num_warps=4), triton.Config({'BLOCK_SIZE_B': 64,
'BLOCK_SIZE_E': 32}, num_stages=2, num_warps=4), triton.Config({
'BLOCK_SIZE_B': 32, 'BLOCK_SIZE_E': 64}, num_stages=2, num_warps=4),
triton.Config({'BLOCK_SIZ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe_bwd.py |
1d20f406-94e0-403c-a1e0-92ea5edee22d | rwkv_vanilla.py | berlino/seq_icl | src/models/sequence/rnn/scan_triton/rwkv_vanilla.py | 9b9223d15348b5a415fb453ed988ed5f7ab9fbdc | 0 | @triton.jit
def wkv_triton_vanilla_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_ab, state_s_c, wkv_ptr, wkv_s_b, wkv_s_t, wkv_s_c,
state_out_ptr, state_out_s_b, state_out_s_ab, state_out_s_t,
state_out_s_c, chans, tsz, B... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/rwkv_vanilla.py |
ebfa7825-dfff-4555-b37d-85b4f1aa9d91 | seqlen_utils.py | Kitsunetic/kitsu | kitsu/nn/seqlen_utils.py | 826967a493c89753ac2cf1e28b52b79998fc9076 | 0 | @triton.jit
def clamp(x, amin, amax):
x = tl.where(x < amin, amin, x)
x = tl.where(x >= amax, amax, x)
return x
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Low Latency"
]
} | [
"MIT"
] | https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/seqlen_utils.py |
5655fee2-cd43-4aa1-9458-4f9a099947b6 | y_2.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/direct/y_2.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def second_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_siz... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_2.py |
83df5d43-d1a9-47bb-98c2-6ef4b7de675b | blocksparse_sum.py | kimiasa/Experiments | src/models/attention/blocksparse_sum.py | c4e73bfefd8290695ec52b6386b6b81838ca94a1 | 0 | @triton.heuristics({'num_warps': lambda *args, **meta: num_warps(args[3] *
meta['BLOCK'])})
@triton.heuristics({'TN': lambda *args, **meta: next_power_of_2(args[3]) *
meta['BLOCK']})
@triton.jit
def _backward(DX, DOUT, LUT, sizemax, stride_zdx, stride_zdout,
stride_hdout, **meta):
pidhm = tl.program_id(... | {
"Data Type": [],
"Functionality": [
"Backpropagation",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/kimiasa/Experiments/blob/c4e73bfefd8290695ec52b6386b6b81838ca94a1/src/models/attention/blocksparse_sum.py |
f22d7c5d-4b22-44c8-bd17-71abf32be596 | softmax_split.py | iclementine/optimize_softmax | softmax_split.py | 6ddeee3481dd5e63f4a30b946c417e97bc4494bf | 0 | @triton.jit
def combine_logsumexp_kernel(out_ptr, inp_ptr, M, N, TILE_N: tl.constexpr):
pid_m = tl.program_id(0)
n_offsets = tl.arange(0, TILE_N)
mask = n_offsets < N
logzs = tl.load(inp_ptr + pid_m * N + n_offsets, other=-float('inf'),
mask=mask).to(out_ptr.dtype.element_ty)
m = tl.max(logz... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"BSD"
] | https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_split.py |
3f75f29d-097d-46b4-a75c-c46d48ca63f5 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/linear_attn/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def chunk_linear_attn_fwd_kernel_o(q, k, v, h, o, s_k_h, s_k_t, s_k_d,
s_v_h, s_v_t, s_v_d, s_h_h, s_h_t, scale, T: tl.constexpr, K: tl.
constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr, BV: tl.
constexpr):
i_v, i_t, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2)
... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/linear_attn/chunk.py |
feb07ab0-66fa-4032-b855-37ff437994a7 | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def jagged_dense_elementwise_mul_jagged_out_kernel(a_ptr, b_ptr, c_ptr,
a_seq_lengths_ptr, a_offsets_ptr, stride_a, stride_bm, stride_bn,
max_seq_len, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr):
pid_batch = tl.program_id(0)
pid_row_block = tl.program_id(1)
batch_offset = tl.load(a_off... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Blocked 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 |
3b3299a2-36e9-47f7-8c4e-3fab53ca5277 | rotary.py | sustcsonglin/flash-linear-attention | fla/modules/rotary.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [2, 4, 8, 16, 32]], key=['BLOCK_K', 'BLOCK_M', 'INTERLEAVED'])
@triton.jit
def rotary_embedding_kernel(X, COS, SIN, OUT, CU_SEQLENS, SEQLEN_OFFSETS,
seqlen, rotary_dim, seqlen_ro, stride_out_batch, stride_out_seqlen,
stride_ou... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"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/modules/rotary.py |
53d194b5-4f30-42c5-bcdc-aa0d961e4d3f | k_dropout.py | cpuhrsch/torchfused | torchfused/triton/k_dropout.py | 6c40ed160dcecbe7825f268f7c86bccd359e0ebf | 0 | @triton.autotune(configs=_k_configs, key=['N'])
@triton.jit
def k_dropout_bw(GRAD_IN, GRAD_OUT, INPUTS, BIAS, SEEDS, stride_grad,
stride_inputs, N, p, **META):
"""
Apply dropout on an input tensor
GRAD_OUT (M, N)
GRAD_IN (M, N)
BIAS (N,)
SEEDS (M,)
p : dropout probabi... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"BSD"
] | https://github.com/cpuhrsch/torchfused/blob/6c40ed160dcecbe7825f268f7c86bccd359e0ebf/torchfused/triton/k_dropout.py |
212d49aa-c7b6-41bc-b921-3cda1e94187e | kernels.py | pytorch-labs/tritonbench | tritonbench/operators/launch_latency/kernels.py | 3a5dccb159834968567a2e45e561dc1aeaa8f8a8 | 0 | @triton.jit
def nop_with_args_kernel(t1, t2, t3, t4, t5, i1, i2, i3, i4, i5, i6, i7, i8,
i9, c1: tl.constexpr, c2: tl.constexpr, c3: tl.constexpr, c4: tl.
constexpr, c5: tl.constexpr):
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 |
1dacd6b7-d7ac-4c8b-9b58-afc4b5e496bd | 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'])
@triton.heuristics({'EVEN_K': lambda args: args['K'] % (args['BLOCK_K'] *
args['SPLIT_K']) == 0})
@triton.jit
def _kernel_matmul_fp8_row_imprecise_acc(A, B, C, M, N, K, m_key, n_key,
k_key, A_scale, B_scale, Bias, stride_am, stride_ak, st... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Matrix Multiplication",
"Quantization"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py |
f3407da0-33a9-4a5e-bade-84ebd8b023fd | fwd_kernel.py | ROCm/aotriton | test/fwd_kernel.py | 016f733e8ff746450e066f78bed68709ccd93e60 | 0 | @triton.jit
def attn_fwd(Q, K, V, sm_scale, M, Out, stride_qz, stride_qh, stride_qm,
stride_qk, stride_kz, stride_kh, stride_kn, stride_kk, stride_vz,
stride_vh, stride_vk, stride_vn, stride_oz, stride_oh, stride_om,
stride_on, seqlen_q, seqlen_k, dropout_p, philox_seed,
philox_offset_base, encoded_soft... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/test/fwd_kernel.py |
23435036-debc-4e75-8236-37b373cdcf8f | _semi_structured_conversions.py | huyz2023/2by4-pretrain | sparse/_semi_structured_conversions.py | 9e330125dea71e5a3dee235f4efb8869f9e4cdd0 | 0 | @triton.autotune(configs=get_configs(), key=['m', 'k'])
@triton.jit
def _sparse_semi_structured_from_dense_triton_16(dense_ptr, sparse_ptr,
meta_reordered_ptr, mask_ptr, dense_row_stride, sparse_row_stride,
mask_row_stride, dense_col_stride, sparse_col_stride, mask_col_stride,
m, k, seed, BLOCK_SIZE: tl.con... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"BSD"
] | https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/_semi_structured_conversions.py |
5539577c-6764-48b6-859f-2234d6a9e634 | normalization.py | ServiceNow/Fast-LLM | fast_llm/functional/triton/normalization.py | 8b46289079da67cba99628448a6b6083dac083cf | 0 | @triton.jit
def triton_normalization_forward_kernel(input_ptr, output_ptr, weight_ptr,
bias_ptr, inv_var_ptr, n_cols, eps, has_bias: tl.constexpr,
zero_centered: tl.constexpr, block_size: tl.constexpr):
row = tl.program_id(0).to(tl.int64)
cols = tl.arange(0, block_size)
mask = cols < n_cols
offs... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/normalization.py |
69b84f1a-f834-4d8d-8fa9-a4d114df2847 | mlstm_matmul.py | LukasBluebaum/xLSTM-Triton-CUDA-Implementation | mlstm_matmul.py | 6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b | 0 | @triton.jit
def sign(x):
return (x > 0).to(tl.float32) - (x < 0).to(tl.float32)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions"
],
"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_matmul.py |
fa8e1c2a-4c55-4f07-97c6-e7f805a3a487 | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def _jagged_dense_flash_attention_bwd_dv_db_dq_kernel(q_ptr, k_ptr, v_ptr,
ab_ptr, jagged_offsets_ptr, out_ptr, do_ptr, lse_ptr, delta_ptr, dq_ptr,
dk_ptr, dv_ptr, dbias_ptr, max_seq_len, stride_ql, stride_qd, stride_kb,
stride_kd, stride_kt, stride_vl, stride_vd, stride_ab_b, stride_ab_l,
s... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
ade66aeb-e4c3-493d-8ecf-bf05180889aa | dropout.py | daemyung/practice-triton | dropout.py | 27f727726f1507c8380a1c11751d851c7c4a07ce | 0 | @staticmethod
@triton.jit
def forward(output_ptr, input_ptr, size, p, seed, block_size: tl.constexpr):
pid = tl.program_id(0)
offset = pid * block_size
input_block_ptr = tl.make_block_ptr(input_ptr, shape=(size,), strides=(
1,), offsets=(offset,), block_shape=(block_size,), order=(0,))
output_bl... | {
"Data Type": [],
"Functionality": [
"Elementwise Operations",
"Activation Functions"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/daemyung/practice-triton/blob/27f727726f1507c8380a1c11751d851c7c4a07ce/dropout.py |
b04ed8dc-c834-4c02-bbc5-5fe077ac9864 | 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 [2, 3]] + [triton.Config
({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K': 32,
'GROUP_SIZE_M': 4, 'grf_mode': 'la... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_benchmark.py |
76abb677-7e00-4012-bc67-1b2087e786e1 | ops.py | srush/triton-autodiff | triton_autodiff/ops.py | f9d1a04d048e3252bfd222646db7175ad60a3c7c | 0 | @triton.jit
def triton_unbroadcast(array, other):
l: tl.constexpr = tl.constexpr(shape_l(array.shape))
ol: tl.constexpr = tl.constexpr(shape_l(other.value))
for i in tl.static_range(0, l):
if i >= ol:
array = tl.sum(array, l - (1 + i))
array = tl.expand_dims(array, l - (1 + i... | {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/srush/triton-autodiff/blob/f9d1a04d048e3252bfd222646db7175ad60a3c7c/triton_autodiff/ops.py |
8294d9f6-80bb-4440-80cc-6db0df32303a | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gla/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({'BK': BK}, num_warps=num_warps,
num_stages=num_stages) for BK in [32, 64] for num_warps in [1, 2, 4, 8] for
num_stages in [2, 3, 4]], key=['BC'])
@triton.jit
def chunk_gla_fwd_A_kernel_intra_su... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/chunk.py |
fe206ade-10f1-48be-9faf-065054bbea19 | softmax_split.py | iclementine/optimize_softmax | softmax_split.py | 6ddeee3481dd5e63f4a30b946c417e97bc4494bf | 0 | @triton.jit
def softmax_kernel(out_ptr, in_ptr, logz_ptr, M, N, TILE_N: tl.constexpr):
pid_n = tl.program_id(0)
pid_m = tl.program_id(1)
n_offsets = pid_n * TILE_N + tl.arange(0, TILE_N)
offset = pid_m * N + n_offsets
mask = n_offsets < N
inp = tl.load(in_ptr + offset, mask=mask, other=-float('i... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Tiled",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"BSD"
] | https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_split.py |
a47ca1c7-56ce-48bc-b2f1-eb0c70e769d9 | kernels.py | pytorch-labs/tritonbench | tritonbench/operators/jagged_mean/kernels.py | 3a5dccb159834968567a2e45e561dc1aeaa8f8a8 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_RAGGED': b_r,
'BLOCK_SIZE_M': b_m}, num_warps=w, num_stages=s) for b_r, b_m, w, s in
itertools.product(BLOCK_SIZES_RAGGED, BLOCK_SIZES_M, NUM_WARPS,
NUM_STAGES)], key=['M'])
@triton.jit
def triton_jagged_mean_kernel_simple_fused_buffer_then_sum(input_ptr_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/jagged_mean/kernels.py |
a1761742-5783-4551-93c3-9a127846b9fc | 01-vector-add.py | kiwik/os-version-checker | ai/Triton/scripts/01-vector-add.py | 65ebf607e0b4bb26c64a025d13e087200517b78c | 0 | @triton.autotune(configs=[triton.Config({'TILE_SIZE': 16, 'BLOCK_SIZE':
4096}, num_threads=1), triton.Config({'TILE_SIZE': 16, 'BLOCK_SIZE':
4096}, num_threads=0), triton.Config({'TILE_SIZE': 16, 'BLOCK_SIZE':
8192}, num_threads=0), triton.Config({'TILE_SIZE': 16, 'BLOCK_SIZE':
16384}, num_threads=0... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/kiwik/os-version-checker/blob/65ebf607e0b4bb26c64a025d13e087200517b78c/ai/Triton/scripts/01-vector-add.py |
bbab54f5-e0f5-45d1-a33b-6925fcd3c225 | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/common/fused_recurrent.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not
None, 'STORE_INITIAL_STATE_GRADIENT': lambda args: args['dh0'] is not
None, 'USE_FINAL_STATE_GRADIENT': lambda args: args['dht'] is not None,
'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Con... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Recurrent Neural Networks",
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]... | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/common/fused_recurrent.py |
a8445512-cbd6-47e9-9aaf-77d03f212f4e | complex_rnn.py | berlino/seq_icl | src/models/sequence/rnn/scan_triton/complex_rnn.py | 9b9223d15348b5a415fb453ed988ed5f7ab9fbdc | 0 | @triton.jit
def fwd_sequential_scan_complex(v_real, v_imag, decay_real, decay_imag,
hidden_real, hidden_imag, 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 + offset_n * BLOCK_M
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"Memory-Bound"
]
} | [
"Apache"
] | https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/complex_rnn.py |
7518b7e9-9f9a-4687-8c6c-2c18f6325875 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/delta_rule/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not
None, 'STORE_FINAL_STATE': lambda args: args['ht'] is not None,
'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [1, 2, 4, 8, 16]], key=['BT', 'B... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication",
"Attention Mechanisms"
],
"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/delta_rule/chunk.py |
09a0bee9-c6e5-453a-99e4-ba49fd05641a | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gated_delta_rule/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_FINAL_STATE_GRADIENT': lambda args: args['dht'] is not
None, 'USE_INITIAL_STATE': lambda args: args['dh0'] is not None,
'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [1, 2, 4]], key=['BT', ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"Memory-Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gated_delta_rule/chunk.py |
2b6f63b8-ff56-4ab9-8423-39194f903638 | dynamic_quant.py | AlibabaPAI/FLASHNN | flashnn/triton_kernels/dynamic_quant.py | 528a9301587f5fb135b25d973a87ba0a40a703a7 | 0 | @triton.autotune(configs=_get_autotune_configs(), key=['M', 'N'])
@triton.jit
def _triton_dynamic_quantize_kernel(output_ptr, input_ptr, scale_ptr,
stride_outputm, stride_outputn, stride_inputm, stride_inputn,
n_elements, M: tl.constexpr, N: tl.constexpr):
pid = tl.program_id(axis=0)
offsets = tl.arange... | {
"Data Type": [
"fp32",
"int8"
],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"Memory-Bound"
]
} | [
"Apache"
] | https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/dynamic_quant.py |
cfb5d0c5-f872-468f-8407-d69c5eed5e51 | 05-layer-norm.py | triton-lang/triton | python/tutorials/05-layer-norm.py | a2b398e0bb1b120f31cf386d6ae3261c3ab84207 | 0 | @triton.jit
def _layer_norm_fwd_fused(X, Y, W, B, Mean, Rstd, stride, N, eps,
BLOCK_SIZE: tl.constexpr):
row = tl.program_id(0)
Y += row * stride
X += row * stride
mean = 0
_mean = tl.zeros([BLOCK_SIZE], dtype=tl.float32)
for off in range(0, N, BLOCK_SIZE):
cols = off + tl.arange(0, ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"Memory-Bound"
]
} | [
"MIT"
] | https://github.com/triton-lang/triton/blob/a2b398e0bb1b120f31cf386d6ae3261c3ab84207/python/tutorials/05-layer-norm.py |
790d51bc-f5f5-494f-b80a-9596d37fd44f | lao.py | MayDomine/Burst-Attention | burst_attn/lao.py | b088c554072935074ea9c643de5ee363be5ab1f6 | 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, 'EVEN_HEADDIM': lambda args: args['headdim'] == args[
'BLOCK_HEADDIM']})
@triton.jit
def _fwd_kernel(Q, K, V, Bias, Out, M_in, Lse_in, O_in, Lse, M_out, TMP,
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Softmax",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/MayDomine/Burst-Attention/blob/b088c554072935074ea9c643de5ee363be5ab1f6/burst_attn/lao.py |
5a8dca50-9d6e-4735-be6c-03ed94a672f6 | positional_embedding.py | sjjeong94/ai_compiler_study | aicom/positional_embedding.py | e87284aab74acab704e2d192190be446e328e1c6 | 0 | @triton.jit
def rope_fw(t_ptr, f_ptr, o_ptr, t_s_stride, f_s_stride, o_s_stride, d, d2,
BLOCK_SIZE: tl.constexpr):
s_idx = tl.program_id(0)
bh_idx = tl.program_id(1)
t_start_ptr = t_ptr + s_idx * t_s_stride
f_start_ptr = f_ptr + s_idx * f_s_stride
o_start_ptr = o_ptr + s_idx * o_s_stride
d2_... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Transposed Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sjjeong94/ai_compiler_study/blob/e87284aab74acab704e2d192190be446e328e1c6/aicom/positional_embedding.py |
fca61cfe-da61-4c1c-bf97-ac5bad29149b | test_addptr.py | microsoft/triton-shared | python/examples/test_addptr.py | d5b7bee73b5b12f09906e88f300c0d83b0022753 | 0 | @triton.jit
def addptr(in0, out0):
for i in range(0, 10, 2):
in1 = in0 + 1 + i
in2 = in1 + 1
out1 = out0 + 1 + i
out2 = out1 + 1
a1 = tl.load(in1)
a2 = tl.load(in2)
tl.store(out1, a1)
tl.store(out2, a2)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Low Latency"
]
} | [
"MIT"
] | https://github.com/microsoft/triton-shared/blob/d5b7bee73b5b12f09906e88f300c0d83b0022753/python/examples/test_addptr.py |
5b77e44e-f459-4f02-bbc2-d49523a36ffa | gemm_a16w4.py | AlibabaPAI/FLASHNN | flashnn/triton_kernels/gemm_a16w4.py | 528a9301587f5fb135b25d973a87ba0a40a703a7 | 0 | @triton.jit
def _triton_gemm_a16w4_sub_channel_kernel(A, B, C, scale_b, bias,
zero_points, M, N, K, rescale_m, rescale_n, rescale_k, stride_am,
stride_ak, stride_bn, stride_bk, stride_cm, stride_cn, stride_zpk,
stride_zpn, stride_scalek, stride_scalen, add_bias: tl.constexpr,
add_zero_points: tl.constex... | {
"Data Type": [
"fp32",
"int8"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/gemm_a16w4.py |
e9b25d3b-8143-4146-a7a0-9427ecb0c33d | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def jagged_jagged_bmm_kernel(a_ptr, a_offset_ptr, b_ptr, c_ptr, M, N,
stride_am, stride_ak, stride_bk, stride_bn, stride_cl, stride_cm,
stride_cn, max_seq_len, allow_tf32: tl.constexpr, BLOCK_SIZE_M: tl.
constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr):
"""
Kernel for c... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Blocked Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
a5c53b73-1cef-4764-bfc4-9437dd79e4c5 | bwd_split_kernel.py | ROCm/aotriton | test/bwd_split_kernel.py | 016f733e8ff746450e066f78bed68709ccd93e60 | 0 | @triton.jit
def bwd_kernel_dk_dv(Q, K, V, sm_scale, Out, DO, DK, DV, L, D, stride_qz,
stride_qh, stride_qm, stride_qk, stride_kz, stride_kh, stride_kn,
stride_kk, stride_vz, stride_vh, stride_vk, stride_vn, seqlen_q,
seqlen_k, dropout_p, philox_seed, philox_offset_base, BLOCK_M: tl.
constexpr, BLOCK_DMO... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/test/bwd_split_kernel.py |
5e173f19-b632-4e9b-8079-ecbf1eeba1e1 | k_softmax.py | kimiasa/Experiments | src/ops/triton/k_softmax.py | c4e73bfefd8290695ec52b6386b6b81838ca94a1 | 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=['K'])
@triton.heuristics({'DEPTH': lambda nargs: get_depth(nargs['K'])})
@triton.h... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax",
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/kimiasa/Experiments/blob/c4e73bfefd8290695ec52b6386b6b81838ca94a1/src/ops/triton/k_softmax.py |
ab5cdfd9-a6c2-4c41-ada3-c603bb44fb3a | paged_attn.py | AlibabaPAI/FLASHNN | flashnn/triton_kernels/paged_attn.py | 528a9301587f5fb135b25d973a87ba0a40a703a7 | 0 | @triton.autotune(configs=[triton.Config({}, num_warps=warps) for warps in [
4, 8, 16]], key=['HEAD_SIZE', 'PADDED_NUM_SPLITS', 'PARTITION_SIZE'])
@triton.jit
def _paged_attn_wo_mma_v2_reduce_kernel(out, exp_sums, max_logits, tmp_out,
context_lens, stride_exp_m, stride_exp_n, stride_out_m, stride_out_n,
stri... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn.py |
0c45df3d-8dd1-4102-b17a-cee67e7c7218 | sparse_linear.py | ServiceNow/Fast-LLM | fast_llm/functional/triton/sparse_linear.py | 8b46289079da67cba99628448a6b6083dac083cf | 0 | @triton.autotune(configs=autotune_configs, key=['row_dim', 'col_dim',
'inner_dim'])
@triton.jit
def dense_matmul_kernel(lhs_ptr, rhs_ptr, out_ptr, row_dim: tl.constexpr,
col_dim: tl.constexpr, inner_dim: tl.constexpr, lhs_stride_row: tl.
constexpr, lhs_stride_inner: tl.constexpr, rhs_stride_inner: tl.
c... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/sparse_linear.py |
a20761f1-48a0-41de-8397-039ab5f0ba71 | bgmv_expand_slice.py | IBM/vllm | vllm/lora/ops/bgmv_expand_slice.py | 99523dd62be2ecf6c6db15e8133aaaf7855e7e86 | 0 | @triton.jit
def _bgmv_expand_slice_kernel(input_ptr, lora_ptr, out_ptr, N, K,
lora_indices, xm_stride, xk_stride, l0_stride, lora_k_stride,
lora_n_stride, cm_stride, cn_stride, slice_offset, BLOCK_N: tl.
constexpr, BLOCK_K: tl.constexpr, SPLIT_N: tl.constexpr, EVEN_K: tl.
constexpr, ADD_INPUTS: tl.const... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access",
"Blocked Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/lora/ops/bgmv_expand_slice.py |
1d21c4d6-1ec8-482a-8d2e-484bbc9cdf08 | y_9.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/direct/y_9.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def ninth_order_bwd(coord_ptr: tl.tensor, coord_grad_ptr: tl.tensor,
sph_grad_ptr: tl.tensor, block_size: tl.constexpr, coord_numel: tl.
constexpr, output_numel: tl.constexpr, col_offset: tl.constexpr,
output_stride: tl.constexpr):
block_id = tl.program_id(0)
coord_stride = 3
coord_s... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_9.py |
16125124-4587-4526-acdf-7107ff2c9612 | FleetAttention_triton.py | Computational-Machine-Intelligence/LeetDecoding | leetDecoding/methods/FleetAttention_triton.py | 1b545c2f5bacc155255250d1f70ac9484744559a | 0 | @triton.jit
def FleetAttention_with_decay_kernel(B_ptr, C_ptr, V_ptr, gamma_ptr,
ans_ptr, heads: tl.constexpr, seqlen: tl.constexpr, dim: tl.constexpr,
rank: tl.constexpr, stride_vbh: tl.constexpr, stride_bbh: tl.constexpr,
dim_BLOCK: tl.constexpr):
rank_idx = tl.program_id(axis=0)
bz = tl.program_i... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled",
"Transposed Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/Computational-Machine-Intelligence/LeetDecoding/blob/1b545c2f5bacc155255250d1f70ac9484744559a/leetDecoding/methods/FleetAttention_triton.py |
9b808ef9-4ee5-48d1-af63-3b5d5a3d4067 | attn_qk_int8_per_block_h64.py | rodjjo/editorium | editorium/app/server/pipelines/cogvideo/sageattention/attn_qk_int8_per_block_h64.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"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"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_h64.py |
2a6747c9-0f4a-4d02-8dbd-aa17a83f609c | layernorm.py | dame-cell/Triformer | triformer/layernorm.py | 0712537d576166b93fa09aa9509b2661b9ed8a68 | 0 | @triton.jit
def layernorm_backward(dY, dY_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
dY += row_idx * dY_row_stride
X += row_idx * X_row_stride
r += row_idx
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/layernorm.py |
c2355f8d-2629-4b64-9d2f-7bb6c69f238d | shape.py | 2niuhe/triton_utils | src/triton_utils/shape.py | 6184906ac3b86dac3ccbfac128ec393ccecde5df | 0 | @triton.jit
def store_full_1d(vals, ptr, sz: tl.constexpr, stride=1):
"""Store 1d block into vector (defined by ptr)"""
offs = get_1d_offest(sz)
mask = get_1d_mask(offs, sz)
tl.store(ptr + offs, vals, mask)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/2niuhe/triton_utils/blob/6184906ac3b86dac3ccbfac128ec393ccecde5df/src/triton_utils/shape.py |
ef1a3b80-243d-4b09-9484-b0a123fda695 | kernels.py | pytorch-labs/tritonbench | tritonbench/operators/sum/kernels.py | 3a5dccb159834968567a2e45e561dc1aeaa8f8a8 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_NON_REDUCE_DIM': b_nr,
'BLOCK_SIZE_REDUCE_DIM': b_r}, num_warps=w) for b_nr, b_r, w in
itertools.product([2, 4, 8, 16], [2, 4, 8, 16], [2, 4, 8])], key=['M', 'N']
)
@triton.jit
def triton_sum_kernel_1D_result_sum_then_buffer(input_ptr, output_ptr, M, N,
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations",
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access",
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"BSD"
] | https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/sum/kernels.py |
377b8e8a-7e71-4aa1-89e1-79323130a64c | test_autodiff.py | srush/triton-autodiff | tests/test_autodiff.py | f9d1a04d048e3252bfd222646db7175ad60a3c7c | 0 | @triton.jit
def ub2(X, Y):
r = tl.arange(0, 16)
r2 = tl.arange(0, 32)
x = tl.load(X + 16 * r2[:, None] + r)
y = triton_unbroadcast(x, tl.arange(0, 32)[:, None].shape)
tl.store(Y + r2[:, None], y)
| {
"Data Type": [],
"Functionality": [],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/srush/triton-autodiff/blob/f9d1a04d048e3252bfd222646db7175ad60a3c7c/tests/test_autodiff.py |
bc5f4d34-0861-44b0-9b72-4824516d105b | causal_product.py | calclavia/Triton-Transformer | ttx/attention/causal_product.py | d1d1e5b5651cf7959866b0198d90a665e1f45354 | 0 | @triton.jit
def causal_product_kernel(q_ptr, k_ptr, v_ptr, output_ptr, batch, length,
dim, vdim, **meta):
BLOCK_SIZE = meta['BLOCK_SIZE']
pid = tl.program_id(axis=0)
state = tl.zeros((BLOCK_SIZE, BLOCK_SIZE), dtype=tl.float32)
cur_qk_pos = pid * length * dim
cur_v_pos = pid * length * vdim
d... | {
"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/calclavia/Triton-Transformer/blob/d1d1e5b5651cf7959866b0198d90a665e1f45354/ttx/attention/causal_product.py |
2cccc53e-fdd8-4955-b9a0-e935a64f8577 | bucketed_argmax.py | graphcore-research/pytorch-approx-topk | approx_topk/experimental/bucketed_argmax.py | 339eea971f17bf810e2eec746a06b9c93dc4cce0 | 0 | @triton.jit
def _topk_triton_kernel__parallel_bkn(xs_ptr, values_out_ptr,
indices_out_ptr, xs_stride: int, n_stride: int, b: int, k: int, n: int,
BLOCK_BK: tl.constexpr, BLOCK_N: tl.constexpr, PAD_VALUE: tl.constexpr,
INTERLEAVED: tl.constexpr):
idx = tl.program_id(axis=0) * BLOCK_BK + tl.arange(0, BLOC... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Top-K Selection"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput",
"Batch-Oriented"
]
} | [
"MIT"
] | https://github.com/graphcore-research/pytorch-approx-topk/blob/339eea971f17bf810e2eec746a06b9c93dc4cce0/approx_topk/experimental/bucketed_argmax.py |
7924e701-dd48-4f1d-bf9f-b59ffeb4ff7a | ln_linear_triton.py | ethansmith2000/fused-layer-norm | ln_linear_triton.py | 84fe243a829364acdcfd7cd70b699db04838af0f | 0 | @triton.jit
def _layer_norm_bwd_dx_fused(DX, DY, DSc, DSh, Y, Sc, Sh, Mean, Rstd, Lock,
stride, N, GROUP_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr):
row = tl.program_id(0)
cols = tl.arange(0, BLOCK_SIZE_N)
mask = cols < N
Y += row * stride
DY += row * stride
DX += row * stride
loc... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Cooperative Groups"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ethansmith2000/fused-layer-norm/blob/84fe243a829364acdcfd7cd70b699db04838af0f/ln_linear_triton.py |
62aa8411-9a66-4488-be2f-bd3fdaec1510 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gla/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({},
num_warps=2), triton.Config({}, num_warps=4), triton.Config({},
num_warps=8)], key=['BV', 'BT'])
@triton.jit
def chunk_gla_bwd_kernel_dA(v, do, dA, offsets, i... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Blocked Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/chunk.py |
7f214f7f-42e1-4445-be83-9e13d10d6055 | fused_kl_div.py | sustcsonglin/flash-linear-attention | fla/modules/fused_kl_div.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def kl_div_kernel(logits, target_logits, loss, s_logits, s_loss, reduction:
tl.constexpr, N: tl.constexpr, V: tl.constexpr, BV: tl.constexpr):
i_n = tl.program_id(0).to(tl.int64)
logits += i_n * s_logits
target_logits += i_n * s_logits
sm, tm = float('-inf'), float('-inf')
sd, td = 0... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/fused_kl_div.py |
b8cbf987-fa5e-4eb6-a8ce-1e45c7cfcc13 | layer_norm.py | jiweibo/MMA | bench/layer_norm.py | f8df6f8e3e9095110b651c31b081e39b2713a7c9 | 0 | @triton.jit
def _layer_norm_fwd_fused(Out, A, Weight, Bias, Mean, Rstd, stride, N, eps,
BLOCK_SIZE: tl.constexpr):
row = tl.program_id(0)
Out += row * stride
A += row * stride
mean = 0
_mean = tl.zeros([BLOCK_SIZE], dtype=tl.float32)
for off in range(0, N, BLOCK_SIZE):
cols = off + t... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/jiweibo/MMA/blob/f8df6f8e3e9095110b651c31b081e39b2713a7c9/bench/layer_norm.py |
ecdab7b6-1233-4dcc-807a-beba3c0d7bbb | parallel.py | sustcsonglin/flash-linear-attention | fla/ops/simple_gla/parallel.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def parallel_simple_gla_bwd_kernel_dq(i_bh, i_t, i_k, i_v, i_kv, q, k, v, g,
do, dq, dg, s_k_h, s_k_t, s_v_h, s_v_t, scale, B: tl.constexpr, H: tl.
constexpr, T: tl.constexpr, K: tl.constexpr, V: tl.constexpr, BT: tl.
constexpr, BS: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr):
p_do = t... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"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/simple_gla/parallel.py |
d1e0e5b8-b819-414f-9789-a449f97c5c56 | kernels.py | ShenzheZhu/sparse_autoencoder | sparse_autoencoder/kernels.py | afef049c905fda5b0f69729127ce0d3a42399152 | 0 | @triton.jit
def triton_add_mul_kernel(x_ptr, a_ptr, b_ptr, c, stride_x0, stride_x1,
stride_a0, stride_a1, stride_b0, stride_b1, BLOCK_SIZE_M: tl.constexpr,
BLOCK_SIZE_N: tl.constexpr, M: tl.constexpr, N: tl.constexpr):
pid_m = tl.program_id(0)
pid_n = tl.program_id(1)
offsets_m = tl.arange(0, BLOCK_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ShenzheZhu/sparse_autoencoder/blob/afef049c905fda5b0f69729127ce0d3a42399152/sparse_autoencoder/kernels.py |
f8a04198-8560-4bd6-84b9-8bb4719d3310 | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def dense_jagged_cat_jagged_out_kernel(a_ptr, b_ptr, c_ptr, b_offsets_ptr,
c_offsets_ptr, max_seq_len, BLOCK_SIZE: tl.constexpr):
pid_batch = tl.program_id(0)
b_start = tl.load(b_offsets_ptr + pid_batch)
b_end = tl.load(b_offsets_ptr + pid_batch + 1)
c_start = b_start + pid_batch
N =... | {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": []
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
9c3d59d9-a8a8-42ff-a0c4-03f9a9c1683a | test_autodiff.py | srush/triton-autodiff | tests/test_autodiff.py | f9d1a04d048e3252bfd222646db7175ad60a3c7c | 0 | @triton.jit
def tr1(X, Y):
r = tl.arange(0, 16)
x = tl.load(X + r)
y = comp2tt(x)
tl.store(Y + 16 * r[:, None] + r, y)
| {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/srush/triton-autodiff/blob/f9d1a04d048e3252bfd222646db7175ad60a3c7c/tests/test_autodiff.py |
bf9fed28-eaf5-46e1-8969-eec1c9a5c2f7 | 06-fused-attention.py | 2lambda123/triton | python/tutorials/06-fused-attention.py | 09e27725b89043a07f49c440db6a9aedcfba8432 | 0 | @triton.jit
def max_fn(x, y):
return tl.math.max(x, y)
| {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/2lambda123/triton/blob/09e27725b89043a07f49c440db6a9aedcfba8432/python/tutorials/06-fused-attention.py |
313cbd67-cc75-4672-a355-e8c80754facc | ops.py | shawntan/scattermoe | scattermoe/kernels/ops.py | 63b76a2f5f28c052fb4cd7c34479a54158354052 | 0 | @triton.autotune(configs=_config_grouping(), key=['K'])
@triton.heuristics({'NO_K_MASK': lambda args: args['K'] % args['BLOCK_K'] == 0}
)
@triton.jit
def _group(src_ptr, stride_sn, stride_sk, has_coeff: tl.constexpr,
coeff_ptr, FAN_OUT: tl.constexpr, tgt_ptr, stride_tn, stride_ti,
grouped_idx_ptr, N, K: tl.... | {
"Data Type": [],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/shawntan/scattermoe/blob/63b76a2f5f28c052fb4cd7c34479a54158354052/scattermoe/kernels/ops.py |
e9ec4ca4-67b0-4b4c-ae46-1b511c456193 | _semi_structured_conversions.py | huyz2023/2by4-pretrain | sparse/_semi_structured_conversions.py | 9e330125dea71e5a3dee235f4efb8869f9e4cdd0 | 0 | @triton.autotune(configs=get_configs(), key=['m', 'k'])
@triton.jit
def _sparse_semi_structured_from_dense_triton_8(dense_ptr, sparse_ptr,
meta_reordered_ptr, mask_ptr, dense_row_stride, sparse_row_stride,
mask_row_stride, dense_col_stride, sparse_col_stride, mask_col_stride,
m, k, seed, BLOCK_SIZE: tl.cons... | {
"Data Type": [
"int8"
],
"Functionality": [
"Quantization",
"Top-K Selection"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"BSD"
] | https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/_semi_structured_conversions.py |
0f3aabee-e682-46a8-89dc-314404372b6b | scaled_quant.py | drisspg/transformer_nuggets | transformer_nuggets/fp8/scaled_quant.py | a4c66bbeebaa479ad8b6ed82d7efbafa41b17260 | 0 | @triton.jit
def scaled_cast(inpt_ptr: torch.Tensor, output_ptr: torch.Tensor, scale_ptr:
torch.Tensor, abs_max_ptr: torch.Tensor, numel: int, XBLOCK: tl.
constexpr, float8_dtype: tl.constexpr, max_val: tl.constexpr):
"""Quantize tensor to fp8 using a delayed scaled and calculate abs_max"""
offset = tl.p... | {
"Data Type": [],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"BSD"
] | https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/fp8/scaled_quant.py |
85beb12c-9aca-4963-98a0-73a6a62a12a3 | rms_norm.py | tascj/kaggle-lmsys-chatbot-arena | human_pref/inference/ops/rms_norm.py | 83cd93d50b9283c18711e8c63e4e1c6399c7b9ce | 0 | @wrap_jit_func(type_hint=dict(input=Tensor, weight=Tensor, output=Tensor,
input_row_stride=int, eps=float, N_COLS=torch.int32, BLOCK_N=torch.int32))
@triton.jit
def rms_norm_kernel(input, weight, output, input_row_stride: tl.constexpr,
eps: tl.constexpr, N_COLS: tl.constexpr, BLOCK_N: tl.constexpr):
"""rms ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/tascj/kaggle-lmsys-chatbot-arena/blob/83cd93d50b9283c18711e8c63e4e1c6399c7b9ce/human_pref/inference/ops/rms_norm.py |
db2799a9-b71d-4ed2-84ba-ff3e85441eca | multi_head_attention_kernels.py | BobMcDear/attorch | attorch/multi_head_attention_kernels.py | da06cb6236bb47195e33fe3986ed21c675ed94cc | 0 | @triton.jit
def _bwd_kernel(Q, K, V, sm_scale, Out, DO, DQ, DK, DV, L, D, stride_dqa,
stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh,
stride_kn, stride_kk, stride_vz, stride_vh, stride_vn, stride_vk, Z, H,
N_CTX, Z_H_N_CTX, SQ_Z_H_N_CTX, BLOCK_M: tl.constexpr, BLOCK_DMODEL: tl
.constex... | {
"Data Type": [
"fp32",
"fp16",
"bf16"
],
"Functionality": [
"Backpropagation",
"Attention Mechanisms"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/multi_head_attention_kernels.py |
db218ad8-20e0-48b5-b390-052c8b786f91 | softmax_online_v2.py | iclementine/optimize_softmax | softmax_online_v2.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": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"BSD"
] | https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_online_v2.py |
73a1b7d4-10ae-42d1-829c-fc9da1265666 | quant_per_block.py | rodjjo/editorium | editorium/app/server/pipelines/cogvideo/sageattention/quant_per_block.py | 7b92e2c92a144bf23bbe6fe88e3d513ffcf7d694 | 0 | @triton.jit
def k_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"
],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/rodjjo/editorium/blob/7b92e2c92a144bf23bbe6fe88e3d513ffcf7d694/editorium/app/server/pipelines/cogvideo/sageattention/quant_per_block.py |
e208a539-0dcc-4c48-b62a-23278be7b325 | test_triton_varargs.py | facebookresearch/xformers | tests/test_triton_varargs.py | a2f37f8c5f4e3ae0d3459a92e42cd1aeb45b03bc | 0 | @triton.jit
def weighted_sumN(output_ptr, a_ptr: 'VAR_ARGS_ARRAY', b: 'VAR_ARGS_ARRAY',
BLOCK_SIZE: tl.constexpr):
offset = tl.arange(0, BLOCK_SIZE)
output = tl.zeros([BLOCK_SIZE], tl.float32)
for i in range(len(a_ptr)):
output = output + tl.load(a_ptr[i] + offset) * b[i]
tl.store(output_ptr... | {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"BSD"
] | https://github.com/facebookresearch/xformers/blob/a2f37f8c5f4e3ae0d3459a92e42cd1aeb45b03bc/tests/test_triton_varargs.py |
940875b4-4e20-421f-a86c-5e25ff28a855 | 02-fused-softmax.py | triton-lang/triton | python/tutorials/02-fused-softmax.py | a2b398e0bb1b120f31cf386d6ae3261c3ab84207 | 0 | @triton.jit
def softmax_kernel(output_ptr, input_ptr, input_row_stride,
output_row_stride, n_rows, n_cols, BLOCK_SIZE: tl.constexpr, num_stages:
tl.constexpr):
row_start = tl.program_id(0)
row_step = tl.num_programs(0)
for row_idx in tl.range(row_start, n_rows, row_step, num_stages=num_stages
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/triton-lang/triton/blob/a2b398e0bb1b120f31cf386d6ae3261c3ab84207/python/tutorials/02-fused-softmax.py |
bd846196-d65e-4894-a342-0d208017c704 | 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({}, num_warps=num_warps) for
num_warps in [1, 2, 4, 8]], key=['BT'])
@triton.jit
def chunk_local_reversed_cumsum_scalar_kernel(s, o, offsets, indices, T: tl
.constexpr, H: tl.constexpr, BT: tl.c... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/cumsum.py |
d8ccdd9a-8a45-418c-8e08-65a619303b4e | triton_attn_torch_function.py | ROCm/aotriton | test/triton_attn_torch_function.py | 016f733e8ff746450e066f78bed68709ccd93e60 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_M': 128, 'BLOCK_N': 64,
'waves_per_eu': 0, 'pre_load_v': True}, num_stages=1, num_warps=4),
triton.Config({'BLOCK_M': 128, 'BLOCK_N': 64, 'waves_per_eu': 1,
'pre_load_v': True}, num_stages=1, num_warps=4), triton.Config({
'BLOCK_M': 128, 'BLOCK_N': 64, 'wa... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Softmax"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Cooperative Groups"
],
"Performance Objective": [
"Low Latency",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/test/triton_attn_torch_function.py |
feca8afb-e281-4618-b17b-e142d9d07e8c | softmax_online_v2_rev.py | iclementine/optimize_softmax | softmax_online_v2_rev.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": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Low Latency",
"High Throughput"
]
} | [
"BSD"
] | https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_online_v2_rev.py |
dbe1ee83-8582-4032-942f-933e819075c9 | 1_linear_trident_debug.py | gmgu/study-triton | toy_example/1_linear_trident_debug.py | 3a9a24fd3f1de3e7465535ffe72f6deac8a419bd | 0 | @staticmethod
@triton.jit
def forward(input_ptr: tl.tensor, weight_ptr: tl.tensor, bias_ptr: tl.
tensor, m_size: tl.int32, n_size: tl.int32, k_size: tl.int32,
input_m_stride: tl.int32, input_k_stride: tl.int32, weight_n_stride: tl
.int32, weight_k_stride: tl.int32, m_offset: tl.int32, n_offset: tl.
int3... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Coalesced",
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/gmgu/study-triton/blob/3a9a24fd3f1de3e7465535ffe72f6deac8a419bd/toy_example/1_linear_trident_debug.py |
54490e5d-07a7-43ff-af70-75332c3c39e7 | kernels.py | ShenzheZhu/sparse_autoencoder | sparse_autoencoder/kernels.py | afef049c905fda5b0f69729127ce0d3a42399152 | 0 | @triton.jit
def triton_sum_dim0_in_fp32_kernel(xs_ptr, out_ptr, stride_a, a, b,
BLOCK_SIZE_A: tl.constexpr, BLOCK_SIZE_B: tl.constexpr):
pid = tl.program_id(0)
offsets_b = tl.arange(0, BLOCK_SIZE_B) + pid * BLOCK_SIZE_B
all_out = tl.zeros((BLOCK_SIZE_B,), dtype=tl.float32)
for i in range(0, a, BLOCK... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ShenzheZhu/sparse_autoencoder/blob/afef049c905fda5b0f69729127ce0d3a42399152/sparse_autoencoder/kernels.py |
a4954557-c50d-4f29-8e9a-cc269e7c427f | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gated_delta_rule/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not
None, 'STORE_FINAL_STATE': lambda args: args['ht'] is not None,
'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [2, 4, 8]], key=['BT', 'BK', 'BV... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gated_delta_rule/chunk.py |
9158e059-6a68-45a0-bb6e-187574d65a8e | RzLinearBackward.py | apd10/RzLinear | python/rz_linear/impl/RzLinearBackward.py | eb56657b2de0a97f398f88af421b0fbcbc5469c9 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 128,
'BLOCK_SIZE_K': 256, 'BLOCK_SIZE_N': 32}, num_stages=3, num_warps=8),
triton.Config({'BLOCK_SIZE_M': 128, 'BLOCK_SIZE_K': 256, 'BLOCK_SIZE_N':
32}, num_stages=3, num_warps=4), triton.Config({'BLOCK_SIZE_M': 64,
'BLOCK_SIZE_K': 256, 'BLOCK_SIZ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Coalesced",
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearBackward.py |
9e9e1c3a-4a92-4686-a3c3-09f634021f06 | chunk_fuse.py | elephantmipt/rebased_minimal | flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py | e7b945509972fab9f9c1c7be431abf7d6bf62c95 | 0 | @triton.jit
def chunk_abc_fwd_kernel_cum(s, r, c, p, s_sk_h, s_sk_t, s_sk_m, T, BT: tl.
constexpr, BM: tl.constexpr, DM: tl.constexpr, NT: tl.constexpr):
i_m, i_bh = tl.program_id(0), tl.program_id(1)
p_s = tl.make_block_ptr(s + i_bh * s_sk_h, (T, DM), (s_sk_t, s_sk_m), (
0, i_m * BM), (BT, BM), (1,... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/elephantmipt/rebased_minimal/blob/e7b945509972fab9f9c1c7be431abf7d6bf62c95/flash_linear_attention/fla/ops/triton/abc/chunk_fuse.py |
7671d636-5551-4193-b0be-489e180535f4 | lightning_attn2_no_decay.py | OpenNLPLab/lightning-attention | lightning_attn/ops/triton/lightning_attn2_no_decay.py | d7439519541e966084eeaaf3ffd63eecc216f414 | 0 | @triton.jit
def _bwd_intra_kernel(Q, K, V, DO, DQ, DK, DV, b: tl.constexpr, h: tl.
constexpr, n: tl.constexpr, d: tl.constexpr, e: tl.constexpr, BLOCK: tl
.constexpr, NUM_BLOCK: tl.constexpr, CBLOCK: tl.constexpr, NUM_CBLOCK:
tl.constexpr):
off_bh = tl.program_id(0)
off_block = tl.program_id(1)
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/OpenNLPLab/lightning-attention/blob/d7439519541e966084eeaaf3ffd63eecc216f414/lightning_attn/ops/triton/lightning_attn2_no_decay.py |
46ac2c79-450e-48fc-8437-4e363de32217 | grid.py | daemyung/practice-triton | grid.py | 27f727726f1507c8380a1c11751d851c7c4a07ce | 0 | @triton.jit
def print_grid():
pid = tl.program_id(0)
tl.device_print('pid: ', pid)
| {
"Data Type": [],
"Functionality": [],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/daemyung/practice-triton/blob/27f727726f1507c8380a1c11751d851c7c4a07ce/grid.py |
0d1dcbf9-4918-4161-b36a-9394e15bb253 | mlstm_scan.py | LukasBluebaum/xLSTM-Triton-CUDA-Implementation | mlstm_scan.py | 6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b | 0 | @triton.jit
def precompute_mlstm_triton_scan(K, V, F, I, F_REDUCED, C, N, NH: tl.
constexpr, S: tl.constexpr, D: tl.constexpr, SB: tl.constexpr, VB: tl.
constexpr):
bh_id = tl.program_id(0)
sb_id = tl.program_id(1)
vb_id = tl.program_id(2)
batch_id = bh_id // NH
head_id = bh_id % NH
num_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_scan.py |
2396ab23-b768-4d96-8878-5a6ea4683b65 | triton_fused_local_attn_rerope.py | LouChao98/vqtree | ops/triton_fused_local_attn_rerope.py | 27a53274df7a804bce27dffcce5f5be73f64b6f3 | 0 | @triton.jit
def _attn_fwd_inner(acc, l_i, m_i, q1, q2, sm_scale, K1_block_ptr,
K2_block_ptr, V_block_ptr, start_m, offs_m, offs_n, SEQLEN_K: tl.
constexpr, WINDOW_SIZE: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N:
tl.constexpr, EVEN_MN: tl.constexpr, STAGE: tl.constexpr):
if STAGE == 1:
hi = st... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Softmax",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/LouChao98/vqtree/blob/27a53274df7a804bce27dffcce5f5be73f64b6f3/ops/triton_fused_local_attn_rerope.py |
0fa50a32-0fe2-47d6-882e-e43af53f8157 | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/rwkv4/fused_recurrent.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def fused_recurrent_rwkv4_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, t... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Register Intensive",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv4/fused_recurrent.py |
eac3fea0-6ec0-4a47-aee5-7bbb6b64ef29 | addition.py | neuro-ml/kerops | kerops/kernels/addition.py | 735336775e825d5cb06b8850d25423661b12d1ac | 0 | @triton.jit
def _AddStats_cl3d_impl(X_ptr, Y_ptr, Out_ptr, Mean_ptr, Sqmean_ptr, numel,
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
Y_ptr += pid * BLOCK_SIZE
Out_ptr += pid * BLOCK_SIZE
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Memory-Bound"
]
} | [
"MIT"
] | https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/addition.py |
221c6145-dd84-45c7-9c0e-18b5a05dcdca | complex_rnn.py | berlino/seq_icl | src/models/sequence/rnn/scan_triton/complex_rnn.py | 9b9223d15348b5a415fb453ed988ed5f7ab9fbdc | 0 | @triton.jit
def bwd_sequential_scan_complex(grad_output_real, grad_output_imag, v_real,
v_imag, f_real, f_imag, hidden_real, hidden_imag, 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) + offse... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Recurrent Neural Networks",
"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/complex_rnn.py |
8974a9b5-f6d2-496c-b6b2-4fdfa904b752 | dw_conv.py | neuro-ml/kerops | kerops/kernels/dw_conv.py | 735336775e825d5cb06b8850d25423661b12d1ac | 0 | @triton.jit
def _DWConv_cl3d_impl(input_ptr, weight_ptr, output_ptr, H, W, D, H_stride,
W_stride, ACCTYPE: tl.constexpr, channels: tl.constexpr, D_block: tl.
constexpr):
H_cell = tl.program_id(0)
W_cell = tl.program_id(1)
D_cell = tl.program_id(2)
output_ptr += D_cell * D_block * channels
in... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"Memory-Bound"
]
} | [
"MIT"
] | https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/dw_conv.py |
570a1e21-423e-48b9-9625-0e664ec62aae | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/common/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]], key=['BK', 'BV', 'US... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Coalesced",
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings",
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/common/fused_recurrent.py |
a44d6bb9-9a39-4506-bfa3-b7ebd9fa2abb | test_matmul.py | triton-lang/kernels | test/test_matmul.py | eeeebdd8be7d13629de22d600621e6234057eed3 | 0 | @triton.jit
def kernel(Y, X, N, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(0)
offs = pid * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
mask = offs < N
x = tl.load(X + offs, mask=mask)
tl.store(Y + offs, x, mask=mask)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Memory-Bound"
]
} | [
"MIT"
] | https://github.com/triton-lang/kernels/blob/eeeebdd8be7d13629de22d600621e6234057eed3/test/test_matmul.py |
ddf1f588-9692-47ab-b525-919d573b3c8a | softmax.py | dame-cell/Triformer | triformer/softmax.py | 0712537d576166b93fa09aa9509b2661b9ed8a68 | 0 | @triton.jit
def softmax_kernel_forward(out_ptr, inp_ptr, inp_stride, out_stride,
seq_len, is_causal, BLOCK_SIZE: tl.constexpr, num_warps: tl.constexpr):
batch_idx = tl.program_id(0)
batch_start_ptr = inp_ptr + batch_idx * inp_stride
pos_offsets = tl.arange(0, BLOCK_SIZE)
batch_ptrs = batch_start_ptr... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Strided Access",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"Latency Sensitive"
]
} | [
"MIT"
] | https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/softmax.py |
54ba9a77-a828-4180-a238-3b81400afbb1 | 1_linear_trident_debug.py | gmgu/study-triton | toy_example/1_linear_trident_debug.py | 3a9a24fd3f1de3e7465535ffe72f6deac8a419bd | 0 | @staticmethod
@util.autotune(configs=linear_configs(), key=['m_size', 'n_size', 'k_size'])
@triton.jit
def forward(output_ptr: tl.tensor, input_ptr: tl.tensor, weight_ptr: tl.
tensor, bias_ptr: tl.tensor, m_size: tl.int32, n_size: tl.int32, k_size:
tl.int32, input_batch_stride: tl.int32, input_m_stride: tl.int3... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access",
"Coalesced"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/gmgu/study-triton/blob/3a9a24fd3f1de3e7465535ffe72f6deac8a419bd/toy_example/1_linear_trident_debug.py |
171aad36-63cb-44be-831f-54745f85e0d3 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/hgrn/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def chunk_hgrn_fwd_kernel_o(gc, o, s_b, s_t, s_d, T: tl.constexpr, D: tl.
constexpr, BT: tl.constexpr, BD: tl.constexpr):
i_d, i_b = tl.program_id(0), tl.program_id(1)
o_d = i_d * BD + tl.arange(0, BD)
mask = o_d < D
for i_t in range(1, tl.cdiv(T, BT)):
p_gc = tl.make_block_ptr(g... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Strided Access",
"Coalesced"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/hgrn/chunk.py |
bff66182-3082-44d8-ab45-db96e371884d | activation.py | chengzeyi/stable-fast | src/sfast/triton/ops/activation.py | 3a6f35c7045f8f6812515957ca62ef37260ff080 | 0 | @triton.jit
def relu(x):
return tl.max(x, 0.0)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Low Latency"
]
} | [
"MIT"
] | https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/activation.py |
18871690-73de-4fa7-8cc1-99b5248781fc | mhmoe.py | dtadpole/triton-playground | mhmoe.py | 2d317976722d63080133b1bf88b1f0cdec98f831 | 0 | @triton.jit
def d_leacky_relu(x):
return tl.where(x >= 0, 1.0, 100.0)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Low Latency"
]
} | [
"MIT"
] | https://github.com/dtadpole/triton-playground/blob/2d317976722d63080133b1bf88b1f0cdec98f831/mhmoe.py |
be4722dd-52dd-4663-8146-0f41c82e92f7 | y_8.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/direct/y_8.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def eighth_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_siz... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_8.py |
1af50369-d016-482c-9e4e-234c967c3ae6 | dropout.py | daemyung/practice-triton | dropout.py | 27f727726f1507c8380a1c11751d851c7c4a07ce | 0 | @staticmethod
@triton.jit
def backward(grad_input_ptr, grad_output_ptr, output_ptr, size, p,
block_size: tl.constexpr):
pid = tl.program_id(0)
offset = pid * block_size
grad_input_block_ptr = tl.make_block_ptr(grad_input_ptr, shape=(size,),
strides=(1,), offsets=(offset,), block_shape=(block_siz... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Activation Functions"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/daemyung/practice-triton/blob/27f727726f1507c8380a1c11751d851c7c4a07ce/dropout.py |
b2c5e42d-4d18-4d41-be89-0859575d1a55 | lightningAttention2.py | Computational-Machine-Intelligence/LeetDecoding | leetDecoding/methods/lightningAttention2.py | 1b545c2f5bacc155255250d1f70ac9484744559a | 0 | @triton.jit
def _fwd_kernel_without_s(Q, K, V, Out, b: tl.constexpr, h: tl.constexpr, n:
tl.constexpr, d: tl.constexpr, e: tl.constexpr, BLOCK: tl.constexpr,
NUM_BLOCK: tl.constexpr, BLOCK_MODEL: tl.constexpr):
off_bh = tl.program_id(0)
off_h = off_bh % h
off_e = tl.program_id(1)
qk_offset = off... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Strided Access",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/Computational-Machine-Intelligence/LeetDecoding/blob/1b545c2f5bacc155255250d1f70ac9484744559a/leetDecoding/methods/lightningAttention2.py |
832c1247-97a6-4951-b770-b50148fc3427 | test_inductor.py | triton-lang/kernels | test/test_inductor.py | eeeebdd8be7d13629de22d600621e6234057eed3 | 0 | @triton.jit
def triton_(in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, in_ptr2, in_ptr3,
xnumel, rnumel, XBLOCK: tl.constexpr, RBLOCK: tl.constexpr):
xnumel = 512
rnumel = 4096
xoffset = tl.program_id(0) * XBLOCK
xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
xmask = xindex < xnumel
rbase = t... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bou... | [
"MIT"
] | https://github.com/triton-lang/kernels/blob/eeeebdd8be7d13629de22d600621e6234057eed3/test/test_inductor.py |
a2322d06-016c-4be9-920f-2be617b54e4c | 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({}, num_warps=num_warps) for
num_warps in [1, 2, 4, 8]], key=['BT'])
@triton.jit
def chunk_local_cumsum_scalar_kernel(s, o, offsets, indices, T: tl.
constexpr, H: tl.constexpr, BT: tl.constexpr,... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Low Latency",
"Single Instance",
"Latency Sensitive"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/cumsum.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.