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 |
|---|---|---|---|---|---|---|---|---|---|
84f5d3ce-86d9-4bd2-8886-537018fb3ecc | linear.py | neuro-ml/kerops | kerops/kernels/linear.py | 735336775e825d5cb06b8850d25423661b12d1ac | 0 | @triton.jit
def _ReLULinearAdd(input_ptr, weight_ptr, add_ptr, output_ptr,
numel_no_channels, in_channels: tl.constexpr, out_channels: tl.
constexpr, D_block: tl.constexpr, _ILP: tl.constexpr):
pid = tl.program_id(0)
input_ptr += pid * _ILP * in_channels * D_block
add_ptr += pid * _ILP * out_channel... | {
"Data Type": [
"fp16"
],
"Functionality": [
"Activation Functions",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/linear.py |
84cd1cd2-9462-473a-bb44-5b276d47af20 | bgmv_shrink.py | IBM/vllm | vllm/lora/ops/bgmv_shrink.py | 99523dd62be2ecf6c6db15e8133aaaf7855e7e86 | 0 | @triton.jit
def _bgmv_shrink_kernel(input_ptr, lora_ptr, out_ptr, N, K, lora_indices,
scaling, xm_stride, xk_stride, l0_stride, lora_k_stride, lora_n_stride,
cm_stride, cn_stride, BLOCK_N: tl.constexpr, BLOCK_K: tl.constexpr,
SPLIT_K: tl.constexpr):
"""
GroupGEMV, additionally, introducing SPLIT-K c... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Blocked Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/lora/ops/bgmv_shrink.py |
7aa394e6-e22f-4bc1-adb7-e9d132c66ff6 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gated_delta_rule/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [2, 4]], key=['BT', 'BK', 'BV'])
@triton.jit
def chunk_gated_delta_rule_fwd_kernel_prepare_dv(q, k, g, do, dv, offsets,
indices, scale, T: tl.constexpr,... | {
"Data Type": [
"fp16",
"fp32"
],
"Functionality": [
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access",
"Transposed Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Thr... | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gated_delta_rule/chunk.py |
9945be86-5f3d-4188-944a-1ea2180faf6f | RzLinearForward.py | apd10/RzLinear | python/rz_linear/impl/RzLinearForward.py | eb56657b2de0a97f398f88af421b0fbcbc5469c9 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 128,
'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 32}, num_stages=3, num_warps=8),
triton.Config({'BLOCK_SIZE_M': 256, 'BLOCK_SIZE_N': 128, 'BLOCK_SIZE_K':
32}, num_stages=3, num_warps=8), triton.Config({'BLOCK_SIZE_M': 256,
'BLOCK_SIZE_N': 64, 'BLOCK_SIZ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearForward.py |
7c4f95a3-8744-4afb-a957-f1b3a27eedcc | gemm_streamk_benchmark.py | intel/intel-xpu-backend-for-triton | benchmarks/triton_kernels_benchmark/gemm_streamk_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)], key=['M', 'N', 'K'])
@triton.jit
def full_tiles(a_ptr, b_ptr, c_ptr, M: tl.constexpr, N: tl.constexpr, K: tl
.constexpr, stride_am: tl... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_streamk_benchmark.py |
f6db9b7b-2ee0-44bc-9725-7ba9d1cba3c0 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gla/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({},
num_warps=2), triton.Config({}, num_warps=4), triton.Config({},
num_warps=8)], key=['BK', 'BT'])
@triton.jit
def chunk_gla_fwd_A_kernel_intra_sub_intra(q, k, ... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Attention Mechanisms",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compu... | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/chunk.py |
3db707e0-ddf4-4545-8ffd-260cfb5291c6 | 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': 256, 'BLOCK_SIZE_K': 128, 'BLOCK_SIZE_N':
32}, num_stages=3, num_warps=8), triton.Config({'BLOCK_SIZE_M': 128,
'BLOCK_SIZE_K': 256, 'BLOCK_SI... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication",
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearBackward.py |
c3518964-a1ec-4489-8219-cf05cf366207 | fused_softmax.py | intel/intel-xpu-backend-for-triton | benchmarks/triton_kernels_benchmark/fused_softmax.py | 6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2 | 0 | @triton.autotune(configs=[triton.Config({'threads_per_warp': 32}, num_warps
=32), triton.Config({'threads_per_warp': 32}, num_warps=16), triton.
Config({'threads_per_warp': 32}, num_warps=8), triton.Config({
'threads_per_warp': 32}, num_warps=4), triton.Config({
'threads_per_warp': 16}, num_warps=64), t... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"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/fused_softmax.py |
faeab38a-3414-4adf-b42a-0d11426d5131 | test_triton.py | apd10/RzLinear | python/tests/test_triton.py | eb56657b2de0a97f398f88af421b0fbcbc5469c9 | 0 | @triton.jit
def triton_tn_kernel(a_ptr, b_ptr, c_ptr, M, N, K, stride_am, stride_ak,
stride_bm, stride_bn, stride_ck, stride_cn, allow_tf32: tl.constexpr,
BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K:
tl.constexpr):
"""Kernel for computing the matmul C = A^T x B.
A has shape ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/tests/test_triton.py |
d0b8c6a2-7f55-44e6-9e98-4a7950d8a027 | k_layer_norm.py | cpuhrsch/torchfused | torchfused/triton/k_layer_norm.py | 6c40ed160dcecbe7825f268f7c86bccd359e0ebf | 0 | @triton.jit
def _store(y, Y, stride, N, META):
row = tl.program_id(0)
cols = tl.arange(0, META['BLOCK_SIZE_N'])
y_ptrs = Y + row * stride + cols
tl.store(y_ptrs, y, mask=cols < N)
| {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Low Latency"
]
} | [
"BSD"
] | https://github.com/cpuhrsch/torchfused/blob/6c40ed160dcecbe7825f268f7c86bccd359e0ebf/torchfused/triton/k_layer_norm.py |
3a7b1bd1-f3ca-43bf-a7b4-0c9a9351f847 | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def jagged_self_substraction_jagged_out_kernel(a_ptr, b_ptr, a_offsets_ptr,
b_offsets_ptr, max_seq_len, BLOCK_SIZE: tl.constexpr):
pid_batch = tl.program_id(0)
pid_index = tl.program_id(1)
a_offset = tl.load(a_offsets_ptr + pid_batch)
a_length = tl.load(a_offsets_ptr + pid_batch + 1) - a... | {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
1785486b-2352-41b5-af96-46f69ff6c60e | mamba_ssm.py | Charlie-XIAO/sparse-vllm | vllm/model_executor/layers/mamba/ops/mamba_ssm.py | d228909a30b0c245c35417fb7d2acdf9a3690042 | 0 | @triton.jit
def softplus(dt):
dt = tl.where(dt <= 20.0, tl.math.log(tl.math.exp(dt) + 1), dt)
return dt
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": [
"Low Latency"
]
} | [
"Apache"
] | https://github.com/Charlie-XIAO/sparse-vllm/blob/d228909a30b0c245c35417fb7d2acdf9a3690042/vllm/model_executor/layers/mamba/ops/mamba_ssm.py |
dcc18d2e-fcbe-411e-948a-c0bd4f7e40c3 | softmax_online_v2_spec.py | iclementine/optimize_softmax | softmax_online_v2_spec.py | 6ddeee3481dd5e63f4a30b946c417e97bc4494bf | 0 | @triton.jit
def softmax_kernel_online_v2(output_ptr, input_ptr, M, N, TILE_N: tl.constexpr
):
pid_m = tl.program_id(0)
m = tl.full((TILE_N,), value=-float('inf'), dtype=output_ptr.dtype.
element_ty)
z = tl.full((TILE_N,), value=0, dtype=output_ptr.dtype.element_ty)
prev_multiple = prev_multi... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/iclementine/optimize_softmax/blob/6ddeee3481dd5e63f4a30b946c417e97bc4494bf/softmax_online_v2_spec.py |
4d7c81d2-85d8-4a4f-9e51-fda6146986f7 | lightning_attn2.py | OpenNLPLab/lightning-attention | lightning_attn/ops/triton/lightning_attn2.py | d7439519541e966084eeaaf3ffd63eecc216f414 | 0 | @triton.jit
def _bwd_inter_kernel(Q, K, V, S, 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_h = off_bh % h
qk_offs... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Blocked Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/OpenNLPLab/lightning-attention/blob/d7439519541e966084eeaaf3ffd63eecc216f414/lightning_attn/ops/triton/lightning_attn2.py |
a120d48c-11cf-4fd5-a8e7-b007acd4cd2e | softmax_kernels.py | BobMcDear/attorch | attorch/softmax_kernels.py | da06cb6236bb47195e33fe3986ed21c675ed94cc | 0 | @triton.autotune(configs=warps_kernel_configs(), key=['batch_dim', 'feat_dim'])
@triton.heuristics({'BLOCK_SIZE_BATCH': BLOCK_SIZE_BATCH_heuristic,
'BLOCK_SIZE_FEAT': lambda args: next_power_of_2(args['feat_dim'])})
@triton.jit
def softmax_forward_kernel(input_pointer, output_pointer, batch_dim,
feat_dim, input... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/softmax_kernels.py |
5d6d3565-d6b7-4e2c-9a44-573d03809ba0 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gsa/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [2, 4, 8]], key=['BT'])
@triton.jit
def chunk_gsa_bwd_k_kernel_dA(v, g, do, dA, indices, offsets, scale, B: tl.
constexpr, T: tl.constexpr, HQ: tl.const... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"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/gsa/chunk.py |
735b3e92-e000-4d97-b785-9e46514b0726 | dropout_rng.py | ROCm/aotriton | tritonsrc/dropout_rng.py | 016f733e8ff746450e066f78bed68709ccd93e60 | 0 | @triton.jit
def debug_fill_dropout_rng_tensor(R, stride_rz, stride_rh, stride_rm,
stride_rn, seqlen_q, seqlen_k, philox_seed_ptr, philox_offset_base_ptr,
BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr):
philox_seed = tl.load(philox_seed_ptr)
philox_offset_base = tl.load(philox_offset_base_ptr)
debug_f... | {
"Data Type": [],
"Functionality": [],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/dropout_rng.py |
0f4487e2-762b-4302-8603-dbcd1043dab6 | dequant_kernel.py | drisspg/transformer_nuggets | transformer_nuggets/quant/dequant_kernel.py | a4c66bbeebaa479ad8b6ed82d7efbafa41b17260 | 0 | @triton.jit
def dequantize_scalers(quantized_scalers_ptr, quantization_factor_ptr,
scaler_mean_ptr, block_size, scaler_block_size):
"""Dequantizes the quantized scalers to bfloat16
Args:
quantized_scalers_ptr: Pointer to the quantized scalers
quantization_factor_ptr: Pointer to the quantizat... | {
"Data Type": [
"bf16",
"int8"
],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"BSD"
] | https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/quant/dequant_kernel.py |
f6685121-0e40-477c-b66b-4993da0134fc | chunk_h_parallel.py | sustcsonglin/flash-linear-attention | fla/ops/common/chunk_h_parallel.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'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=num_stages) for BK in [32, 64, 128] for BV in [32,
64, 128] for ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"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_parallel.py |
06154394-82a9-4d57-b6ed-f27fc9bbaca5 | flash_attention.py | falkaer/multi-scale-music | seq/flash_attention.py | a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d | 0 | @triton.jit
def _bwd_preprocess(Out, DO, NDO, L, Delta, M_Q, stride_oz, stride_oh,
stride_om, stride_od, stride_doz, stride_doh, stride_dom, stride_dod,
stride_ndoz, stride_ndoh, stride_ndom, stride_ndod, stride_lz,
stride_lh, stride_lm, stride_dz, stride_dh, stride_dm, BLOCK_DMODEL: tl
.constexpr, BLOC... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/falkaer/multi-scale-music/blob/a7794ddfb3bbd95b70acf3fe72a08d8a1d47564d/seq/flash_attention.py |
e5746bd4-5ff0-429c-abaa-ebb35c0d4af0 | fused_norm_gate.py | sustcsonglin/flash-linear-attention | fla/modules/fused_norm_gate.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({},
num_warps=2), triton.Config({}, num_warps=4), triton.Config({},
num_warps=8), triton.Config({}, num_warps=16), triton.Config({},
num_warps=32)], key=['N', 'HAS_RESIDUAL', 'STORE_RESIDUAL_OUT',
'IS_RMS_NORM', 'HAS_BIAS'])
@triton... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/fused_norm_gate.py |
1867f9a5-2505-4dea-85b4-7eec68d369de | nll_loss_kernels.py | BobMcDear/attorch | attorch/nll_loss_kernels.py | da06cb6236bb47195e33fe3986ed21c675ed94cc | 0 | @triton.autotune(configs=warps_kernel_configs(), key=['batch_dim',
'spatial_dim'])
@triton.heuristics({'BLOCK_SIZE_BATCH': BLOCK_SIZE_BATCH_heuristic,
'BLOCK_SIZE_SPATIAL': lambda args: next_power_of_2(args['spatial_dim'])})
@triton.jit
def nll_loss_backward_kernel(output_grad_pointer, target_pointer,
weigh... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/nll_loss_kernels.py |
13add3b4-2ac9-4b8e-9860-79b4012d9a64 | RzLinearBackward.py | apd10/RzLinear | python/rz_linear/impl/RzLinearBackward.py | eb56657b2de0a97f398f88af421b0fbcbc5469c9 | 0 | @triton.jit
def rz_linear_backward_weight_grad_core(a_ptr, b_ptr, c_ptr, init_factor, M,
N, K, H, stride_am, stride_ak, stride_bm, stride_bn, 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_S... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/apd10/RzLinear/blob/eb56657b2de0a97f398f88af421b0fbcbc5469c9/python/rz_linear/impl/RzLinearBackward.py |
74718d3f-c518-4407-8ec5-e202d737b762 | 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_s(q, k, s, rk, ck, pk, s_qk_h, s_qk_t, s_qk_d,
s_sk_h, s_sk_t, s_sk_m, T, scale, BT: tl.constexpr, BK: tl.constexpr,
BM: tl.constexpr, DK: tl.constexpr, DM: tl.constexpr, NT: tl.constexpr):
i_m, i_k, i_bh = tl.program_id(0), tl.program_id(1), tl.program_id(2)
n_bh = ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"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 |
0d55d92f-0a9b-4b89-9f91-5898bd40e024 | geglu.py | Kitsunetic/kitsu | kitsu/nn/geglu.py | 826967a493c89753ac2cf1e28b52b79998fc9076 | 0 | @triton.jit
def geglu_forward_kernel(x_ptr, y_ptr, N, C, C2, BLK_C: tl.constexpr, BLK_N:
tl.constexpr):
pid_n = tl.program_id(0)
pid_c = tl.program_id(1)
offs_n = pid_n * BLK_N + tl.arange(0, BLK_N)
offs_c = pid_c * BLK_C + tl.arange(0, BLK_C)
mask_n = offs_n < N
mask_c = offs_c < C2
mas... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/Kitsunetic/kitsu/blob/826967a493c89753ac2cf1e28b52b79998fc9076/kitsu/nn/geglu.py |
eca0e629-398b-4f13-a441-1f45f6e88d23 | stats.py | neuro-ml/kerops | kerops/kernels/stats.py | 735336775e825d5cb06b8850d25423661b12d1ac | 0 | @triton.jit
def _Stats_cl3d_backward_impl(X_ptr, Meangrad_ptr, Sqmeangrad_ptr,
Outputgrad_ptr, numel_no_channels, num_channels: tl.constexpr,
block_other: tl.constexpr):
pid = tl.program_id(0)
X_ptr += pid * num_channels * block_other
Outputgrad_ptr += pid * num_channels * block_other
channels_o... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Normalization"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/neuro-ml/kerops/blob/735336775e825d5cb06b8850d25423661b12d1ac/kerops/kernels/stats.py |
10275dc6-1d3c-4562-9324-771303bd1166 | sb_varlen_bwd.py | shawntan/stickbreaking-attention | stickbreaking_attention/sb_varlen/sb_varlen_bwd.py | 8dd32ad5e58f0ee0232fd4782dc53d354ff8d283 | 0 | @triton.autotune(configs=get_configs(), key=['token_size', 'head_size'],
reset_to_zero=['DK_ptr', 'DV_ptr'])
@triton.jit
def _backward(DO_ptr, stride_doh: tl.constexpr, stride_dom, stride_dod: tl.
constexpr, DR_ptr, stride_drh, stride_drm, A_ptr, stride_ah, stride_am,
Q_ptr, stride_qh: tl.constexpr, stride_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
... | [
"Apache"
] | https://github.com/shawntan/stickbreaking-attention/blob/8dd32ad5e58f0ee0232fd4782dc53d354ff8d283/stickbreaking_attention/sb_varlen/sb_varlen_bwd.py |
07efee37-5fc4-487f-907f-99cc5df92ca4 | 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_rcum(s, r, c, o, 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), (
(NT - 1) * BT, i_m * BM), ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled",
"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 |
67e4c93c-b727-4fc8-a953-27e3c96d1539 | parallel.py | sustcsonglin/flash-linear-attention | fla/ops/delta_rule/parallel.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.autotune(configs=[triton.Config({}, num_warps=1), triton.Config({},
num_warps=2), triton.Config({}, num_warps=4)], key=['BT', 'K', 'V'])
@triton.jit
def chunk_transform_qk_fwd_kernel(q, k, v, beta, o, A, q_new, k_new,
A_local, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, scale, T: tl.
constexpr, K: tl.... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled",
"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/delta_rule/parallel.py |
f9c0d792-543f-40b9-b98d-def82c9bbbb9 | sb_varlen_fwd.py | shawntan/stickbreaking-attention | stickbreaking_attention/sb_varlen/sb_varlen_fwd.py | 8dd32ad5e58f0ee0232fd4782dc53d354ff8d283 | 0 | @triton.autotune(configs=get_configs(), key=['head_size'])
@triton.jit
def _forward(Q_ptr, stride_qh: tl.constexpr, stride_qm, stride_qd: tl.
constexpr, K_ptr, stride_kh: tl.constexpr, stride_kn, stride_kd: tl.
constexpr, V_ptr, stride_vh: tl.constexpr, stride_vn, stride_vd: tl.
constexpr, O_ptr, stride_oh:... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled",
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/shawntan/stickbreaking-attention/blob/8dd32ad5e58f0ee0232fd4782dc53d354ff8d283/stickbreaking_attention/sb_varlen/sb_varlen_fwd.py |
fdbc848d-92d3-499e-a813-fa9e22d5993a | l2norm.py | sustcsonglin/flash-linear-attention | fla/modules/l2norm.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [1, 2, 4, 8, 16, 32]], key=['N'])
@triton.jit
def l2norm_bwd_kernel(X, DY, DX, stride_x_row, N, eps, BLOCK_N: tl.constexpr):
row = tl.program_id(0)
X += row * stride_x_row
DX += row * stride_x_row
DY += row * stride_x_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Backpropagation"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/modules/l2norm.py |
e3c53215-9ddd-4e38-942f-2dfc120fb36c | shape.py | 2niuhe/triton_utils | src/triton_utils/shape.py | 6184906ac3b86dac3ccbfac128ec393ccecde5df | 0 | @triton.jit
def load_full_1d(ptr, sz: tl.constexpr, stride=1):
"""Load 1d block [0,...,sz-1]"""
offs = get_1d_offest(sz)
mask = get_1d_mask(offs, sz)
return tl.load(ptr + offs, mask)
| {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Memory-Bound"
]
} | [
"Apache"
] | https://github.com/2niuhe/triton_utils/blob/6184906ac3b86dac3ccbfac128ec393ccecde5df/src/triton_utils/shape.py |
78bedff7-31b2-401f-b494-a038e6470b98 | glu_kernels.py | BobMcDear/attorch | attorch/glu_kernels.py | da06cb6236bb47195e33fe3986ed21c675ed94cc | 0 | @triton.autotune(configs=element_wise_kernel_configs(), key=['size'])
@triton.jit
def glu_forward_kernel(input1_pointer, input2_pointer, output_pointer, size,
param, act_func: tl.constexpr, BLOCK_SIZE: tl.constexpr):
"""
Applies the gated linear unit with an arbitrary activation function
to the input.
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/glu_kernels.py |
87d0765e-cecf-486a-95fb-7d23c0b6a3f0 | bucketed_argmax.py | graphcore-research/pytorch-approx-topk | approx_topk/experimental/bucketed_argmax.py | 339eea971f17bf810e2eec746a06b9c93dc4cce0 | 0 | @triton.jit
def _topk_triton_kernel__parallel_bk(xs_ptr, values_out_ptr,
indices_out_ptr, b: int, k: int, n: int, n_chunk: int, xs_stride: int,
BLOCK_SIZE: tl.constexpr, PAD_VALUE: tl.constexpr, INTERLEAVED: tl.
constexpr):
pidx = tl.program_id(axis=0).to(tl.int64)
bk_idx = BLOCK_SIZE * pidx + tl.ar... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Top-K Selection"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/graphcore-research/pytorch-approx-topk/blob/339eea971f17bf810e2eec746a06b9c93dc4cce0/approx_topk/experimental/bucketed_argmax.py |
c66dd256-37a5-4e14-9622-5ef0661c9e4c | decay.py | huyz2023/2by4-pretrain | sparse/decay.py | 9e330125dea71e5a3dee235f4efb8869f9e4cdd0 | 0 | @triton.jit
def masked_add_kernel(grad_ptr, p_ptr, p_mask_ptr, n_elements, alpha,
BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(axis=0)
block_start = pid * BLOCK_SIZE
offsets = block_start + tl.arange(0, BLOCK_SIZE)
mask = offsets < n_elements
p_mask = tl.load(p_mask_ptr + offsets, mask=mask).t... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/decay.py |
64df009f-59cf-495e-b5c2-0456d955bdc3 | linear.py | ai-compiler-study/triton-kernels | triton_kernels/kernels/linear.py | 2308e5e9d965059fe2d19b4d535debac4970b69e | 0 | @triton.jit
def gelu(x):
c = 0.7978845608028654
x_cubed = x * x * x
tanh_arg = c * (x + 0.044715 * x_cubed)
tanh_result = tanh(tanh_arg)
return 0.5 * x * (1 + tanh_result)
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/ai-compiler-study/triton-kernels/blob/2308e5e9d965059fe2d19b4d535debac4970b69e/triton_kernels/kernels/linear.py |
e786250d-5d3e-44b4-8ec6-304092edb0a2 | fused_chunk.py | sustcsonglin/flash-linear-attention | fla/ops/linear_attn/fused_chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def fused_chunk_linear_attn_bwd_kernel(q, k, v, do, dq, dk, dv, h0, 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, CHECK: tl.constexpr):
i_v, i_k, i_bh = tl.pro... | {
"Data Type": [
"bf16",
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Blocked Access",
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput",
... | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/linear_attn/fused_chunk.py |
36a84d74-811a-47c3-b0f6-b6e9716f4768 | partition_k.py | pytorch-labs/tritonbench | tritonbench/operators/gemm/partition_k.py | 3a5dccb159834968567a2e45e561dc1aeaa8f8a8 | 0 | @triton.jit
def _reduce(c_ptr, c_buf_ptr, M, N, stride_cm, stride_cn, stride_cb_m,
stride_cb_n, stride_cb_k, PK: tl.constexpr, BLOCK_SIZE_M: tl.constexpr,
BLOCK_SIZE_N: tl.constexpr):
pid = tl.program_id(0)
num_pid_m = tl.cdiv(M, BLOCK_SIZE_M)
num_pid_n = tl.cdiv(N, BLOCK_SIZE_N)
pid_m = pid // ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"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/gemm/partition_k.py |
d0677865-01e5-4cad-8f2a-27ff2419f1c7 | _semi_structured_conversions.py | huyz2023/2by4-pretrain | sparse/_semi_structured_conversions.py | 9e330125dea71e5a3dee235f4efb8869f9e4cdd0 | 0 | @triton.jit
def _MVUE24_approx(x0, x1, x2, x3, random0, random1):
eps = 1.19209e-07
a0 = tl.abs(x0) + eps
a1 = tl.abs(x1) + eps
a2 = tl.abs(x2) + eps
a3 = tl.abs(x3) + eps
sum = a0 + a1 + a2 + a3
t0 = a0 / sum
t1 = a1 / sum
t2 = a2 / sum
t3 = a3 / sum
s0 = sum - a0
s1 = s... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/huyz2023/2by4-pretrain/blob/9e330125dea71e5a3dee235f4efb8869f9e4cdd0/sparse/_semi_structured_conversions.py |
ccc604f8-18e9-45f5-b245-d3cc28061db6 | wy_fast.py | sustcsonglin/flash-linear-attention | fla/ops/delta_rule/wy_fast.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [1, 2, 4, 8]], key=['BT', 'BK', 'BV'])
@triton.jit
def fwd_recompute_w_u_kernel(k, v, beta, w, u, A, offsets, indices, T: tl.
constexpr, H: tl.constexpr... | {
"Data Type": [
"fp32",
"bf16"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Blocked Access",
"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/delta_rule/wy_fast.py |
326e20e4-4217-4f1d-919d-85d0480d4692 | test_triton.py | pytorch/xla | test/test_triton.py | 40efdb7b6571ce92797b5ba42619b79c1b147b3e | 0 | @triton.jit
def _attn_fwd_inner(acc, l_i, m_i, q, K_block_ptr, V_block_ptr, start_m,
qk_scale, BLOCK_M: tl.constexpr, HEAD_DIM: tl.constexpr, BLOCK_N: tl.
constexpr, STAGE: tl.constexpr, offs_m: tl.constexpr, offs_n: tl.
constexpr, N_CTX: tl.constexpr, fp8_v: tl.constexpr):
if STAGE == 1:
lo, hi... | {
"Data Type": [
"fp16"
],
"Functionality": [
"Attention Mechanisms",
"Softmax"
],
"Memory Access Pattern": [
"Blocked Access",
"Strided Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/pytorch/xla/blob/40efdb7b6571ce92797b5ba42619b79c1b147b3e/test/test_triton.py |
49f3c6b9-1c5a-473c-9559-2dfc1c27c665 | fused_chunk.py | sustcsonglin/flash-linear-attention | fla/ops/gla/fused_chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def fused_chunk_gla_fwd_kernel(q, k, v, g, o, h0, ht, s_k_h, s_k_t, s_k_d,
s_v_h, s_v_t, s_v_d, B: tl.constexpr, H: tl.constexpr, T: tl.constexpr,
K: tl.constexpr, V: tl.constexpr, BT: tl.constexpr, BK: tl.constexpr,
BV: tl.constexpr, USE_INITIAL_STATE: tl.constexpr, STORE_FINAL_STATE:
tl.co... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled",
"Blocked Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/fused_chunk.py |
9e707ccc-8655-4571-8d88-7225cd973c4c | 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_with_rmsnorm(a_ptr, w1_ptr, w3_ptr, out_ptr, rms_w_ptr, M, N,
K, stride_am, stride_ak, stride_w1k, stride_w1n, stride_w3k, stride_w3n,
stride_outm, stride_outn, stride_rms_w, USE_FP8: tl.constexpr, EPS: tl.
constex... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Matrix Multiplication",
"Normalization",
"Activation Functions"
],
"Memory Access Pattern": [
"Coalesced",
"Strided Access"
],
"Parallelization Strategy": [
"Cooperative Groups"
],
"Performance Objective": [
"Hi... | [
"MIT"
] | https://github.com/yann-Choho/projet_PPML/blob/9274e0561443b01f029ee6e0737f922f71d2da39/notebooks/triton_kernel.py |
2f039813-0a4f-434e-8684-dfa2962e6c20 | parallel.py | sustcsonglin/flash-linear-attention | fla/ops/rebased/parallel.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def parallel_rebased_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.p... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rebased/parallel.py |
fb256f38-277f-4402-8b55-cf02270b1533 | mlstm_matmul.py | LukasBluebaum/xLSTM-Triton-CUDA-Implementation | mlstm_matmul.py | 6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b | 0 | @triton.jit
def matrix_mult(x, y, B):
return tl.dot(x, y) if B >= 16 else tl.sum(x[:, :, None] * y, 1)
| {
"Data Type": [
"fp32",
"int8"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/LukasBluebaum/xLSTM-Triton-CUDA-Implementation/blob/6fb49b89cc74e7dadd0f3d56db05684bb4e86f4b/mlstm_matmul.py |
c186aa78-7e7f-494d-bcc8-d002861dceb2 | 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', 'BT'])
@triton.jit
def chunk_rwkv6_fwd_A_kernel_intra_sub_intra(q, k... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py |
48379ee8-f2ff-4497-a0e7-85d8537a7560 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/delta_rule/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [1, 2, 4]], key=['BT', 'BK', 'BV'])
@triton.jit
def chunk_delta_rule_fwd_kernel_o(q, k, v, h, o, offsets, indices, scale, T:
tl.constexpr, H: tl.constex... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Matrix Multiplication",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/delta_rule/chunk.py |
beebe0e4-2407-465c-b381-0707292d593f | conv_kernels.py | BobMcDear/attorch | attorch/conv_kernels.py | da06cb6236bb47195e33fe3986ed21c675ed94cc | 0 | @triton.autotune(configs=[conv2d_forward_config(128, 32, 128, n_warps=8,
n_stages=2), conv2d_forward_config(256, 32, 64, n_warps=8, n_stages=2),
conv2d_forward_config(256, 32, 32, n_warps=4, n_stages=4),
conv2d_forward_config(256, 64, 32, n_warps=4, n_stages=4),
conv2d_forward_config(256, 32, 16, n_warp... | {
"Data Type": [
"fp16"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/conv_kernels.py |
54b68535-dd6a-428b-ba2c-aacf68f8e026 | triton_rms_norm.py | vladmandic/dcae | dcae/nn/triton_rms_norm.py | 5223970c7e6c6acfe282e18be7e3821b61511673 | 0 | @triton.jit
def _rms_norm_2d_fwd_fused(X, Y, W, B, Rrms, M, C, N, num_blocks, eps,
BLOCK_SIZE: tl.constexpr):
m_n = tl.program_id(0)
m, n = m_n // num_blocks, m_n % num_blocks
Y += m * C * N
X += m * C * N
cols = n * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
mask = cols < N
x_sum_square = tl... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/vladmandic/dcae/blob/5223970c7e6c6acfe282e18be7e3821b61511673/dcae/nn/triton_rms_norm.py |
01a67365-f163-429d-bbd8-8c27946656e2 | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/generalized_delta_rule/iplr/fused_recurrent.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def fused_recurrent_bwd_kernel(q, k, v, alpha, beta, ha, dht, dh0, do, dq,
dk, dv, dalpha, dbeta, dha, h0, s_k_h, s_v_h, NK, scale, B, H, T, K: tl
.constexpr, V: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr,
USE_INITIAL_STATE: tl.constexpr, USE_DH0: tl.constexpr, USE_DHT: tl.
constexpr):... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Backpropagation"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/generalized_delta_rule/iplr/fused_recurrent.py |
7e5bd5a2-7393-4fdc-8835-64d5a5604ecc | triton_kernels.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/triton_kernels.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def _triton_second_order_fwd(x_ptr: tl.tensor, y_ptr: tl.tensor, z_ptr: tl.
tensor, sh_1_0_ptr: tl.tensor, sh_1_1_ptr: tl.tensor, sh_1_2_ptr: tl.
tensor, sh_2_0_ptr: tl.tensor, sh_2_1_ptr: tl.tensor, sh_2_2_ptr: tl.
tensor, sh_2_3_ptr: tl.tensor, sh_2_4_ptr: tl.tensor, BLOCK_SIZE: tl.
conste... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/triton_kernels.py |
2692045b-1381-44b0-bcd7-ec5e84568124 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/rwkv6/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'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.Config({'BK': BK, 'BV': BV}, num_warps=
num_warps, num_stage... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Backpropagation"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv6/chunk.py |
2845735e-85d3-4315-9d21-ce129b242704 | parallel.py | sustcsonglin/flash-linear-attention | fla/ops/based/parallel.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def _parallel_based_bwd_dkv(i_bh, i_c, i_k, i_v, i_h, q, k, v, do, dz, dk,
dv, s_k_h, s_k_t, s_k_d, s_v_h, s_v_t, s_v_d, B, H, T, scale, BTL: tl.
constexpr, BTS: tl.constexpr, BK: tl.constexpr, BV: tl.constexpr, K: tl
.constexpr, V: tl.constexpr):
p_k = tl.make_block_ptr(k + i_bh * s_k_h, (T... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/based/parallel.py |
86340ed0-7aa9-45cf-8b18-cb8988e9b602 | masks.py | drisspg/transformer_nuggets | transformer_nuggets/flash/masks.py | a4c66bbeebaa479ad8b6ed82d7efbafa41b17260 | 0 | @triton.jit
def inverse_causal_mask_triton(score, batch, head, seq_len_q, seq_len_kv):
score = tl.where(seq_len_q > seq_len_kv, float('-inf'), score)
return score
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Low Latency"
]
} | [
"BSD"
] | https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/flash/masks.py |
aed79a3c-9b2f-4cb8-809d-b5eb89f04608 | associative_rnn_scan.py | TushaarGVS/linear-rnn | linear_rnn/triton/associative_rnn_scan.py | 48320589b73154484be7d09a144923a2b9e56b85 | 0 | @triton.jit
def _associative_rnn_scan_fwd_kernel(x_ptr, a_ptr, cum_a_ptr, out_ptr,
stride_x_batch, stride_x_len, stride_x_dim, stride_a_batch,
stride_a_len, stride_a_dim, stride_out_batch, stride_out_len,
stride_out_dim, stride_cum_a_batch, stride_cum_a_len, stride_cum_a_dim,
BLOCK_SIZE_LEN: tl.constexp... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"Apache"
] | https://github.com/TushaarGVS/linear-rnn/blob/48320589b73154484be7d09a144923a2b9e56b85/linear_rnn/triton/associative_rnn_scan.py |
4df492d6-8632-47e9-80d8-2308db2c2a20 | math.py | BobMcDear/attorch | attorch/math.py | da06cb6236bb47195e33fe3986ed21c675ed94cc | 0 | @triton.jit
def standardize(input, mean, inv_std, weight, bias):
"""
Standardizes the input given its mean and inverse standard deviation,
multiplies the result by weights, and adds a bias vector.
Args:
input: Input to standardize.
mean: Mean of input.
inv_std: Inverse standard ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"MIT"
] | https://github.com/BobMcDear/attorch/blob/da06cb6236bb47195e33fe3986ed21c675ed94cc/attorch/math.py |
2e8a3dc0-e0ec-484c-ad3a-59cdc79b11ae | sgmv_shrink.py | IBM/vllm | vllm/lora/ops/sgmv_shrink.py | 99523dd62be2ecf6c6db15e8133aaaf7855e7e86 | 0 | @triton.jit
def _sgmv_shrink_kernel(input_ptr, lora_ptr, out_ptr, N, K, b_seq_start_loc,
seq_lens, lora_indices, scaling, xm_stride, xk_stride, l0_stride,
lora_k_stride, lora_n_stride, cm_stride, cn_stride, BLOCK_M: tl.
constexpr, BLOCK_N: tl.constexpr, BLOCK_K: tl.constexpr, EVEN_K: tl.
constexpr, SPLI... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication",
"Quantization"
],
"Memory Access Pattern": [
"Tiled",
"Blocked Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/IBM/vllm/blob/99523dd62be2ecf6c6db15e8133aaaf7855e7e86/vllm/lora/ops/sgmv_shrink.py |
b6a99fcb-ac7f-4a0f-ab1a-1f9af95e6c52 | sparse_linear.py | ServiceNow/Fast-LLM | fast_llm/functional/triton/sparse_linear.py | 8b46289079da67cba99628448a6b6083dac083cf | 0 | @triton.autotune(configs=autotune_configs, key=['col_dim',
'inner_sparse_dim', 'sparse_dim'])
@triton.jit
def input_inner_sparse_matmul_kernel(lhs_ptr, rhs_ptr, out_ptr,
expert_ends_ptr, row_dim: tl.constexpr, col_dim: tl.constexpr,
inner_sparse_dim: tl.constexpr, sparse_dim: tl.constexpr,
padded_sparse... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Coalesced",
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/ServiceNow/Fast-LLM/blob/8b46289079da67cba99628448a6b6083dac083cf/fast_llm/functional/triton/sparse_linear.py |
7118da2e-e1df-45f5-99f0-a46403452599 | gemm2.py | vedantroy/awq | examples/gemm2.py | a0e638f269862a78da4ea6a7f4c08bc54486018e | 0 | @triton.jit
def matmul_kernel_simple(a_ptr, qw_ptr, c_ptr, scales_ptr, zeros_ptr,
dbg_qwpacked_ptr, dbg_qwunpacked_ptr, dbg_dequant_ptr, dbg_scales_ptr,
dbg_unpacked_zeros_ptr, dbg_to_add_ptr, M, N, K, BLOCK_SIZE_M: tl.
constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr,
GROUP_SIZE_M: tl.... | {
"Data Type": [
"fp32",
"fp16"
],
"Functionality": [
"Matrix Multiplication",
"Quantization"
],
"Memory Access Pattern": [
"Tiled",
"Blocked Access"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"High Throughput",
"Compute B... | [
"MIT"
] | https://github.com/vedantroy/awq/blob/a0e638f269862a78da4ea6a7f4c08bc54486018e/examples/gemm2.py |
cce543b6-f8b2-4791-8e56-9a8d72b6369f | dequant_kernel.py | drisspg/transformer_nuggets | transformer_nuggets/quant/dequant_kernel.py | a4c66bbeebaa479ad8b6ed82d7efbafa41b17260 | 0 | @triton.jit
def dequant_nf4_tensor_kernel(inpt_ptr, output_ptr, quantized_scalers_ptr,
quantization_factor_ptr, scaler_mean_ptr, nf4_lut_ptr,
scaler_block_size: tl.constexpr, XBLOCK: tl.constexpr):
"""Dequantizes a tensor from nf4 to bfloat16"""
offset = tl.program_id(0) * XBLOCK
index = offset + tl... | {
"Data Type": [
"int8",
"bf16"
],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/drisspg/transformer_nuggets/blob/a4c66bbeebaa479ad8b6ed82d7efbafa41b17260/transformer_nuggets/quant/dequant_kernel.py |
75190c07-be32-4efd-b8f2-d8a6bee1648a | quantize.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/triton/quantize.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def _kernel_quantize_mx4(A, out, rand_bits, M, K, GROUPS_PER_ROW,
GROUPS_PER_THREAD, ROW_PADDING, GROUP_SIZE: tl.constexpr, EBITS: tl.
constexpr, MBITS: tl.constexpr, ROUNDING_MODE: tl.constexpr,
STOCHASTIC_CASTING: tl.constexpr, FP4_EXP_BIAS: tl.constexpr,
GROUP_LOAD: tl.constexpr, USE_INT6... | {
"Data Type": [
"int8"
],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Compute Bound"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/quantize.py |
e433ab40-e94b-424b-8781-6a02f5a372a2 | dx.py | Forkxz/TritonDeepLearningKernel | kernel/dropconnect/dx.py | add54b6318e8fa5fdbf8c7b47659de9fceaa5691 | 0 | @triton.jit
def dropconnect_dx_kernel(dy_ptr, w_ptr, dx_ptr, seed, M, K, N, stride_dym,
stride_dyn, stride_wk, stride_wn, stride_dm, stride_dk, stride_dn,
stride_xm, stride_xk, BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.
constexpr, BLOCK_SIZE_K: tl.constexpr, ALLOWTF32: tl.constexpr):
"""
dY_m = ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/Forkxz/TritonDeepLearningKernel/blob/add54b6318e8fa5fdbf8c7b47659de9fceaa5691/kernel/dropconnect/dx.py |
65eed763-e3c9-4f09-8b89-130070dd79d3 | sized_tuned_bwd.py | ROCm/aotriton | tritonsrc/sized_tuned_bwd.py | 016f733e8ff746450e066f78bed68709ccd93e60 | 0 | @triton.autotune(configs=TRITON_CONFIG_LIST_BWD_SIZED, key=['BLOCK_DMODEL',
'max_seqlen_q', 'max_seqlen_k'])
@triton.jit
def sized_tuned_bwd_kernel_dq(Q, K, V, B, sm_scale, Out, DO, DQ, DB, L, D,
stride_qz, stride_qh, stride_qm, stride_qk, stride_kz, stride_kh,
stride_kn, stride_kk, stride_vz, stride_vh, st... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/sized_tuned_bwd.py |
29eb6850-1766-413b-8e3d-01a3060c34f7 | chunk_h.py | sustcsonglin/flash-linear-attention | fla/ops/common/chunk_h.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'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.Config({'BK': BK, 'BV': BV}, num_warps=
num_warps, num_stage... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Thread-Block Mappings"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/common/chunk_h.py |
1e1944d8-6b04-41df-b0ee-4bdf17a83a50 | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/rwkv4/fused_recurrent.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def fused_recurrent_rwkv4_backward_kernel(w_ptr, w_s_c, u_ptr, u_s_c, k_ptr,
k_s_b, k_s_t, k_s_c, v_ptr, v_s_b, v_s_t, v_s_c, state_ptr, state_s_b,
state_s_abe, state_s_t, state_s_c, gwkv_ptr, gwkv_s_b, gwkv_s_t,
gwkv_s_c, gstate_out_ptr, gstate_out_s_b, gstate_out_s_abe,
gstate_out_s_c, gw_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Recurrent Neural Networks"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/rwkv4/fused_recurrent.py |
4a398122-1442-4248-8842-7e8a278b8424 | chunk.py | sustcsonglin/flash-linear-attention | fla/ops/hgrn/chunk.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.autotune(configs=[triton.Config({'BD': 32}, num_warps=1), triton.
Config({'BD': 32}, num_warps=2), triton.Config({'BD': 32}, num_warps=4),
triton.Config({'BD': 32}, num_warps=8), triton.Config({'BD': 64},
num_warps=1), triton.Config({'BD': 64}, num_warps=2), triton.Config({
'BD': 64}, num_warps=... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/hgrn/chunk.py |
67bfb3db-8a20-4dc2-925e-39148ea3e6d9 | rms_norm.py | dame-cell/Triformer | triformer/rms_norm.py | 0712537d576166b93fa09aa9509b2661b9ed8a68 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE': 128, 'NUM_WARPS': 4}
), triton.Config({'BLOCK_SIZE': 256, 'NUM_WARPS': 8}), triton.Config({
'BLOCK_SIZE': 512, 'NUM_WARPS': 16}), triton.Config({'BLOCK_SIZE': 1024,
'NUM_WARPS': 16}), triton.Config({'BLOCK_SIZE': 2048, 'NUM_WARPS': 32}),
triton.Conf... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization",
"Backpropagation"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/dame-cell/Triformer/blob/0712537d576166b93fa09aa9509b2661b9ed8a68/triformer/rms_norm.py |
7596edff-211e-475d-872d-74ad640ee13a | inout_tensor.py | gmgu/study-triton | 2_inout_tensor/inout_tensor.py | 3a9a24fd3f1de3e7465535ffe72f6deac8a419bd | 0 | @triton.jit
def copy_kernel(in_ptr, out_ptr, n: tl.constexpr):
offsets = tl.arange(0, n)
x = tl.load(in_ptr + offsets)
y = tl.store(out_ptr + offsets, x)
| {
"Data Type": [],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/gmgu/study-triton/blob/3a9a24fd3f1de3e7465535ffe72f6deac8a419bd/2_inout_tensor/inout_tensor.py |
9c7ea44a-b658-498e-bf16-7647e1ef2be1 | cross_entropy.py | ardywibowo/triton-mode | kernels/cross_entropy.py | 5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1 | 0 | @triton.jit
def triton_cross_entropy_backward(input_grad_ptr, input_stride,
grad_output_ptr, num_classes, BLOCK_SIZE: tl.constexpr):
row_id = tl.program_id(0).to(tl.int64)
input_grad_ptr += row_id * input_stride
grad_output = tl.load(grad_output_ptr)
for i in range(0, num_classes, BLOCK_SIZE):
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Softmax"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/ardywibowo/triton-mode/blob/5cd773ec95e25e23c6b75e312c7a9a1c6eb650b1/kernels/cross_entropy.py |
90672e0c-650f-4d76-8b2b-6f1033c4bc1c | y_9.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/direct/y_9.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def ninth_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": [
"Activation Functions",
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/y_9.py |
e243a29b-b114-4f2d-a187-afd303c61af0 | special.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/direct/special.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def joint_second_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):
block_id = tl.program_id(0)
coord_stride = 3
coord_striding = tl.arange(0, block_size) * coord_stride
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/direct/special.py |
12f42420-1a7f-46d4-adc4-5b7cb9b2a72f | triton_kernels.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/triton_kernels.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def _triton_fourth_order_fwd(x_ptr: tl.tensor, y_ptr: tl.tensor, z_ptr: tl.
tensor, sh_1_0_ptr: tl.tensor, sh_1_1_ptr: tl.tensor, sh_1_2_ptr: tl.
tensor, sh_2_0_ptr: tl.tensor, sh_2_1_ptr: tl.tensor, sh_2_2_ptr: tl.
tensor, sh_2_3_ptr: tl.tensor, sh_2_4_ptr: tl.tensor, sh_3_0_ptr: tl.
tensor... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Activation Functions",
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/triton_kernels.py |
2330b2e5-9c58-4b9b-8328-2f4b391bd8bf | kernels.py | pytorch-labs/tritonbench | tritonbench/operators/jagged_softmax/kernels.py | 3a5dccb159834968567a2e45e561dc1aeaa8f8a8 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_RAGGED': b_r,
'BLOCK_SIZE_M': b_m}, num_warps=w, num_stages=s) for b_r, b_m, w, s in
itertools.product(BLOCK_SIZES_RAGGED, BLOCK_SIZES_M, NUM_WARPS,
NUM_STAGES)], key=['M'])
@triton.jit
def triton_jagged_softmax_kernel_variable_length_loop_buffer_then_sum... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax",
"Elementwise Operations"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"BSD"
] | https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/operators/jagged_softmax/kernels.py |
a85dfd4f-2d51-4198-9b23-08c7173a6ea2 | 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=['BC', 'BK'])
@triton.jit
def chunk_gla_fwd_A_kernel_intra_sub_intra_split(... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Matrix Multiplication"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gla/chunk.py |
37d65854-b0fd-4bc2-a248-cd43fe18bd16 | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def jagged_jagged_bmm_jagged_out_kernel(a_ptr, a_offset_ptr, b_ptr,
b_offset_ptr, c_ptr, offsets_mn_ptr, max_seq_len, num_blocks_n, K,
stride_am, stride_ak, stride_bk, stride_bn, allow_tf32: tl.constexpr,
BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K:
tl.constexpr):
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [],
"Parallelization Strategy": [],
"Performance Objective": []
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
9c9a0484-f69a-4208-aa24-d3d5c62c9050 | sb_varlen_bwd.py | shawntan/stickbreaking-attention | stickbreaking_attention/sb_varlen/sb_varlen_bwd.py | 8dd32ad5e58f0ee0232fd4782dc53d354ff8d283 | 0 | @triton.jit
def _backward_one_row(seq_prog_id, seq_length, qk_scale, M_range, N_range,
D_range, D_mask, cm, DO_head_seq_ptr, stride_dom, stride_dod: tl.
constexpr, DR_head_seq_ptr, stride_drm, A_head_seq_ptr, stride_am: tl.
constexpr, Q_head_seq_ptr, stride_qm, stride_qd: tl.constexpr,
K_head_seq_ptr, s... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled",
"Transposed Access",
"Blocked Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/shawntan/stickbreaking-attention/blob/8dd32ad5e58f0ee0232fd4782dc53d354ff8d283/stickbreaking_attention/sb_varlen/sb_varlen_bwd.py |
0fa9d38c-c513-408f-a16f-741c7127f438 | flash_triton.py | MayDomine/Burst-Attention | burst_attn/flash_triton.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, Lse, TMP, softmax_scale, stride_qb,
... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Softmax"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/MayDomine/Burst-Attention/blob/b088c554072935074ea9c643de5ee363be5ab1f6/burst_attn/flash_triton.py |
8a6f7534-fbb7-4a16-8b55-555cc439bcf0 | paged_attn_v2.py | AlibabaPAI/FLASHNN | flashnn/triton_kernels/paged_attn_v2.py | 528a9301587f5fb135b25d973a87ba0a40a703a7 | 0 | @triton.jit
def _paged_attention_v2_reduce(out, exp_sums, max_logits, tmp_out,
context_lens, stride_exp_m, stride_exp_n, stride_out_m, stride_out_n,
stride_tmp_m, stride_tmp_n, stride_tmp_k, HEAD_SIZE: tl.constexpr,
NUM_PARTITIONS: tl.constexpr):
seq_idx = tl.program_id(axis=1)
head_idx = tl.program... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Softmax"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/AlibabaPAI/FLASHNN/blob/528a9301587f5fb135b25d973a87ba0a40a703a7/flashnn/triton_kernels/paged_attn_v2.py |
8114d12c-96e5-4779-a4c3-39663c02465d | conv.py | chengzeyi/stable-fast | src/sfast/triton/ops/conv.py | 3a6f35c7045f8f6812515957ca62ef37260ff080 | 0 | @conv_heuristics()
@triton.jit
def _kernel_delta_x(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_x_ptr, BATCH, IN_C, IN_H, IN_W,
KERNEL_N, KERNEL_H, KERNEL_W, OUT_H, OUT_W, stride_h, stride_w,
padd... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/conv.py |
bd8d9b19-0eb1-4606-abf9-07bc9b74d955 | logsumexp.py | sustcsonglin/flash-linear-attention | fla/ops/utils/logsumexp.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'HAS_SCALE': lambda args: args['scale'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [1, 2, 4, 8, 16, 32]], key=['D'])
@triton.jit
def logsumexp_fwd_kernel(x, z, scale, D: tl.constexpr, B: tl.constexpr,
HAS_SCALE: tl.constexpr):
i_n, i_d... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/utils/logsumexp.py |
6a35f449-cfba-4f15-a4d9-9faf8f90396e | gemm_postop_addmatrix_benchmark.py | intel/intel-xpu-backend-for-triton | benchmarks/triton_kernels_benchmark/gemm_postop_addmatrix_benchmark.py | 6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2 | 0 | @triton.autotune(configs=[triton.Config({'BLOCK_SIZE_M': 256,
'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 32, 'GROUP_SIZE_M': 4, 'grf_mode':
'large'}, num_stages=2, num_warps=32), triton.Config({'BLOCK_SIZE_M':
256, 'BLOCK_SIZE_N': 256, 'BLOCK_SIZE_K': 32, 'GROUP_SIZE_M': 4,
'grf_mode': 'large'}, num_stages=3... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Tiled",
"Blocked Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/intel/intel-xpu-backend-for-triton/blob/6ee08cd29ec3cd8b8eb3f92b9c93977fc6f6e5c2/benchmarks/triton_kernels_benchmark/gemm_postop_addmatrix_benchmark.py |
10debe65-3ac2-4a2b-b2a0-78f9bbae7964 | triton_jagged_tensor_ops.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/triton/jagged/triton_jagged_tensor_ops.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def tensor_elementwise_add(x, y):
return x + y
| {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Low Latency"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/triton/jagged/triton_jagged_tensor_ops.py |
965c0840-cbb1-4409-bcfe-384d35052963 | softmax.py | l1351868270/implicit_gemm.triton | triton_kernel/softmax.py | 64eb8548ccf4576883c928f6315be8b24680a455 | 0 | @triton.jit
def _ld_softmax_bwd_kernel(ds_ptr, p_ptr, dp_ptr, ds_row_stride,
p_row_stride, dp_row_stride, n_rows, n_cols, BLOCK_SIZE: tl.constexpr):
row_idx = tl.program_id(0)
p_start_ptr = p_ptr + row_idx * p_row_stride
dp_start_ptr = dp_ptr + row_idx * dp_row_stride
col_offsets = tl.arange(0, BLOC... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Backpropagation",
"Softmax"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/l1351868270/implicit_gemm.triton/blob/64eb8548ccf4576883c928f6315be8b24680a455/triton_kernel/softmax.py |
23ae7635-b08c-4919-a8c0-55f2f7104fe2 | 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['HxW']),
4096 // (triton.next_power_of_2(kwargs['C'] // kwargs['groups']))
))... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Normalization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Memory-Bound"
]
} | [
"MIT"
] | https://github.com/chengzeyi/stable-fast/blob/3a6f35c7045f8f6812515957ca62ef37260ff080/src/sfast/triton/ops/group_norm.py |
770ec2b3-7745-432e-bbae-8d2c438cc02f | triton_sll.py | pytorch/FBGEMM | fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.jit
def jagged_softmax_kernel(input_ptr, output_ptr, input_offsets_ptr,
input_row_stride, input_head_stride, output_row_stride,
output_head_stride, max_seq_len: tl.constexpr, BLOCK_SIZE: tl.constexpr):
"""
input shpae is [SUM_B, H]
output shape is [SUM_B, H]
"""
pid_batch = tl.progra... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Softmax"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/fbgemm_gpu/sll/triton_sll.py |
5c760d10-cb85-49c6-9d13-141637fb65e6 | matrix-vector-multiplication-bf16.py | northstreet12/triton-cpu | python/tutorials/matrix-vector-multiplication-bf16.py | bfb302ffc5fde3b9efe040cb452ddac0454dbb98 | 0 | @triton.jit
def gemv_kernel(Y, A, X, M, N, stride_am, BLOCK_SIZE_M: tl.constexpr,
BLOCK_SIZE_N: tl.constexpr):
start_m = tl.program_id(0)
rm = start_m * BLOCK_SIZE_M + tl.arange(0, BLOCK_SIZE_M)
rn = tl.arange(0, BLOCK_SIZE_N)
A = A + (rm[:, None] * stride_am + rn[None, :])
X = X + rn
acc = ... | {
"Data Type": [
"bf16",
"fp32"
],
"Functionality": [
"Matrix Multiplication"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"MIT"
] | https://github.com/northstreet12/triton-cpu/blob/bfb302ffc5fde3b9efe040cb452ddac0454dbb98/python/tutorials/matrix-vector-multiplication-bf16.py |
1e8d4b3f-525d-4e92-a1e7-b8c95e9d1b8e | bwd_kernel_dk_dv.py | ROCm/aotriton | tritonsrc/bwd_kernel_dk_dv.py | 016f733e8ff746450e066f78bed68709ccd93e60 | 0 | @triton.jit
def bwd_kernel_dk_dv(Q, K, V, B, 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, stride_bz,
stride_bh, stride_bm, stride_bn, stride_oz, stride_oh, stride_om,
stride_ok, stride... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Backpropagation"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/ROCm/aotriton/blob/016f733e8ff746450e066f78bed68709ccd93e60/tritonsrc/bwd_kernel_dk_dv.py |
ee05de93-5deb-4808-b6ef-0af8f24d4eda | triton_fused_vq_attn.py | LouChao98/vqtree | ops/triton_fused_vq_attn.py | 27a53274df7a804bce27dffcce5f5be73f64b6f3 | 0 | @triton.heuristics({'EVEN_M': lambda args: args['seqlen_q'] % args[
'BLOCK_M'] == 0})
@triton.jit
def _vq_fwd_kernel(Q, K_VQ, K_VQ_CNT, V_VQ, V_VQ_INDEX, Out, L,
softmax_scale, stride_q_b, stride_q_h, stride_q_m, stride_kvq_h,
stride_kvq_c, stride_kvqc_b, stride_kvqc_h, stride_kvqc_n, stride_vvq_b,
stri... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Softmax",
"Quantization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/LouChao98/vqtree/blob/27a53274df7a804bce27dffcce5f5be73f64b6f3/ops/triton_fused_vq_attn.py |
a1c210f1-dae7-43a1-b05d-d236f1f87998 | real_rnn_tie_input_gate.py | berlino/seq_icl | src/models/sequence/rnn/scan_triton/real_rnn_tie_input_gate.py | 9b9223d15348b5a415fb453ed988ed5f7ab9fbdc | 0 | @triton.jit
def fwd_sequential_scan_fused(v, f1, hidden, 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
h1 = tl.zeros([BLOCK_M], dtype=tl.float32)
for _ ... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Activation Functions",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/berlino/seq_icl/blob/9b9223d15348b5a415fb453ed988ed5f7ab9fbdc/src/models/sequence/rnn/scan_triton/real_rnn_tie_input_gate.py |
4e1ef67f-1573-4d17-8121-3a7f8e148d1b | shape.py | 2niuhe/triton_utils | src/triton_utils/shape.py | 6184906ac3b86dac3ccbfac128ec393ccecde5df | 0 | @triton.jit
def load_full_2d(ptr, sz0: tl.constexpr, sz1: tl.constexpr, stride0=None,
stride1=1):
"""Load 2d block [0,...,sz0-1] x [0,...,sz1-1]"""
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, sz0), tl.... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Low Latency"
]
} | [
"Apache"
] | https://github.com/2niuhe/triton_utils/blob/6184906ac3b86dac3ccbfac128ec393ccecde5df/src/triton_utils/shape.py |
399b5bd6-779f-481e-b641-a97817c65b63 | 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": [
"fp16",
"fp32"
],
"Functionality": [
"Softmax",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound",
"High Throughput"
]
} | [
"Apache"
] | https://github.com/kimiasa/Experiments/blob/c4e73bfefd8290695ec52b6386b6b81838ca94a1/src/ops/triton/k_softmax.py |
a5f58e11-541c-49c1-aad8-632c55cafadf | mamba_ssm.py | Charlie-XIAO/sparse-vllm | vllm/model_executor/layers/mamba/ops/mamba_ssm.py | d228909a30b0c245c35417fb7d2acdf9a3690042 | 0 | @triton.heuristics({'HAS_DT_BIAS': lambda args: args['dt_bias_ptr'] is not
None})
@triton.heuristics({'HAS_D': lambda args: args['D_ptr'] is not None})
@triton.heuristics({'HAS_Z': lambda args: args['z_ptr'] is not None})
@triton.heuristics({'HAS_STATE_BATCH_INDICES': lambda args: args[
'state_batch_indices_ptr... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/Charlie-XIAO/sparse-vllm/blob/d228909a30b0c245c35417fb7d2acdf9a3690042/vllm/model_executor/layers/mamba/ops/mamba_ssm.py |
bfa71336-4d07-4f50-b917-10440a567a7d | wy_fast.py | sustcsonglin/flash-linear-attention | fla/ops/gated_delta_rule/wy_fast.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.autotune(configs=[triton.Config({}, num_warps=num_warps) for
num_warps in [2, 4, 8]], key=['BK'])
@triton.jit
def fwd_prepare_wy_repr_kernel_chunk64(k, g, beta, Aw, Au, offsets, indices,
T: tl.constexpr, K: tl.constexpr, H: tl... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms",
"Quantization",
"Elementwise Operations"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gated_delta_rule/wy_fast.py |
382c7df7-c231-4082-9738-316b2060d437 | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/retention/fused_recurrent.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.heuristics({'USE_INITIAL_STATE': lambda args: args['h0'] is not
None, 'STORE_FINAL_STATE': lambda args: args['ht'] is not None,
'USE_OFFSETS': lambda args: args['offsets'] is not None})
@triton.jit
def fused_recurrent_retention_fwd_kernel(q, k, v, o, h0, ht, offsets, scale,
B: tl.constexpr, T: tl.co... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/retention/fused_recurrent.py |
cdef9924-80d7-4787-9792-40f7c0314224 | triton_kernels.py | IntelLabs/EquiTriton | src/equitriton/sph_harm/triton_kernels.py | 1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c | 0 | @triton.jit
def _triton_third_order_fwd(x_ptr: tl.tensor, y_ptr: tl.tensor, z_ptr: tl.
tensor, sh_1_0_ptr: tl.tensor, sh_1_1_ptr: tl.tensor, sh_1_2_ptr: tl.
tensor, sh_2_0_ptr: tl.tensor, sh_2_1_ptr: tl.tensor, sh_2_2_ptr: tl.
tensor, sh_2_3_ptr: tl.tensor, sh_2_4_ptr: tl.tensor, sh_3_0_ptr: tl.
tensor,... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [],
"Performance Objective": [
"Compute Bound"
]
} | [
"Apache"
] | https://github.com/IntelLabs/EquiTriton/blob/1cbf04f69b512a5c1d8ff4880dbf6e17fe089d4c/src/equitriton/sph_harm/triton_kernels.py |
8a07eb48-f388-411a-8bea-4db66f7e583a | test_triton.py | pytorch/xla | test/test_triton.py | 40efdb7b6571ce92797b5ba42619b79c1b147b3e | 0 | @triton.jit
def add_kernel(x_ptr, y_ptr, output_ptr, n_elements, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(axis=0)
block_start = pid * BLOCK_SIZE
offsets = block_start + tl.arange(0, BLOCK_SIZE)
mask = offsets < n_elements
x = tl.load(x_ptr + offsets, mask=mask)
y = tl.load(y_ptr + offsets,... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Elementwise Operations"
],
"Memory Access Pattern": [
"Coalesced"
],
"Parallelization Strategy": [],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/pytorch/xla/blob/40efdb7b6571ce92797b5ba42619b79c1b147b3e/test/test_triton.py |
73d4eb91-5118-44b5-a7cc-d60243dd1659 | fused_recurrent.py | sustcsonglin/flash-linear-attention | fla/ops/gsa/fused_recurrent.py | 5968de9a22c096326b19859cfe05dac36155c31d | 0 | @triton.jit
def fused_recurrent_gsa_inference_kernel(q, k, v, s, g, o, hk0, hv0, hkt,
hvt, scale, K: tl.constexpr, V: tl.constexpr, M: tl.constexpr, BK: tl.
constexpr, BV: tl.constexpr, NG: tl.constexpr):
i_bh = tl.program_id(0)
i_bg = i_bh // NG
b_s = tl.load(s + i_bg * M + tl.arange(0, M)).to(tl.f... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks",
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"MIT"
] | https://github.com/sustcsonglin/flash-linear-attention/blob/5968de9a22c096326b19859cfe05dac36155c31d/fla/ops/gsa/fused_recurrent.py |
d007ef85-87e3-4ce0-8e46-7b94cff34ce5 | triton_fused_attention.py | pytorch-labs/tritonbench | tritonbench/kernels/triton_fused_attention.py | 3a5dccb159834968567a2e45e561dc1aeaa8f8a8 | 0 | @triton.autotune(list(filter(keep, configsOpt)), key=['N_CTX'])
@triton.jit
def _attn_fwd_opt(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, s... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Attention Mechanisms"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Persistent Kernels"
],
"Performance Objective": [
"High Throughput"
]
} | [
"BSD"
] | https://github.com/pytorch-labs/tritonbench/blob/3a5dccb159834968567a2e45e561dc1aeaa8f8a8/tritonbench/kernels/triton_fused_attention.py |
858e4bb7-3ed2-490f-84f5-a9677c3f962b | lstm_fw.py | NX-AI/flashrnn | flashrnn/flashrnn/triton_fused/lstm_fw.py | 3fca666a81c8740af4878d7bc5e2a51900e4fe14 | 0 | @triton.autotune(configs, key=['siz_B', 'T', 'B', 'NH', 'DH'])
@triton.jit
def _forward_sequence_kernel(states_initial, Wx, R, b, states_all,
gates_all, T: tl.constexpr, NS: tl.constexpr, B: tl.constexpr, NH: tl.
constexpr, DH: tl.constexpr, NGI: tl.constexpr, NGR: tl.constexpr,
siz_B: tl.constexpr, OUTPUT_... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Recurrent Neural Networks"
],
"Memory Access Pattern": [
"Tiled"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"High Throughput",
"Batch-Oriented"
]
} | [
"MIT",
"BSD"
] | https://github.com/NX-AI/flashrnn/blob/3fca666a81c8740af4878d7bc5e2a51900e4fe14/flashrnn/flashrnn/triton_fused/lstm_fw.py |
87908dfa-3000-45a4-bd58-e284ba835528 | fp8_gemm.py | pytorch/FBGEMM | fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py | fe980ab54a6e28818d81c8694b6564e7f804418b | 0 | @triton.autotune(configs=[Config({'BLOCK_SIZE': 512}), Config({'BLOCK_SIZE':
1024}), Config({'BLOCK_SIZE': 2048}), Config({'BLOCK_SIZE': 4096}),
Config({'BLOCK_SIZE': 8192})], key=['K'])
@triton.jit
def _kernel_quantize_fp8_row(A, A_scale, A_fp8, scale_ub, B, M, N, K,
stride_ab, stride_am, stride_an, stride... | {
"Data Type": [
"fp32"
],
"Functionality": [
"Quantization"
],
"Memory Access Pattern": [
"Strided Access"
],
"Parallelization Strategy": [
"Grid-Stride Loops"
],
"Performance Objective": [
"Compute Bound"
]
} | [
"BSD",
"MIT"
] | https://github.com/pytorch/FBGEMM/blob/fe980ab54a6e28818d81c8694b6564e7f804418b/fbgemm_gpu/experimental/gemm/triton_gemm/fp8_gemm.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.