Skip to content
KernelIndex
Search⌘K

submission 621513

Jayluci4 · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

No package. Vendor the mirrored source: 45 lines, June 9 Researcher Reciprocity License v1.0.

submission_moe_clean.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-moe-mxfp4-621513?include=source"
interfacepython
Compatibility
measured onAMD Instinct MI355X
declared hardwareAMD Instinct MI355X
architecturesgfx950
dtypesbf16, fp32, fp8_e8m0, int32, mxfp4

Benchmark evidence

1 measurement across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
AMD MXFP4 MoEsuite of 7 cases
AMD Instinct MI355X
177.8µs
#388 of 782
2026-03-24

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:d1c01ed433a5ce46e415cfd845c5b138e62da992a0d34235a0e5af324a6703b7
license declaredunknown
license concludedunknown
authorsJayluci4
imported2026-08-26

Kernel source

submission_moe_clean.py45 lines
#!POPCORN leaderboard amd-moe-mxfp4
#!POPCORN gpu MI355X
"""
MoE — clean fused_moe with pre-allocated output.
Focus: let fused_moe handle kernel selection, minimize Python overhead.
"""
import torch
import gc
import sys
import os
from task import input_t, output_t

from aiter.fused_moe import fused_moe
from aiter.ops.enum import ActivationType, QuantType

gc.disable()
sys.setswitchinterval(1000.0)

_ACT = ActivationType.Silu
_QT = QuantType.per_1x32
_out = {}


def custom_kernel(data: input_t) -> output_t:
    hidden = data[0]
    w1 = data[5]
    w2 = data[6]
    w1_scale = data[7]
    w2_scale = data[8]
    topk_w = data[9]
    topk_ids = data[10]

    bs = hidden.shape[0]
    d_hidden = hidden.shape[-1]
    key = (bs, d_hidden)

    if key not in _out:
        _out[key] = torch.empty(bs, d_hidden, dtype=torch.bfloat16, device="cuda")

    return fused_moe(
        hidden, w1, w2, topk_w, topk_ids,
        activation=_ACT, quant_type=_QT,
        w1_scale=w1_scale, w2_scale=w2_scale,
    )
scrolls · 45 lines total

Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0

Best evidence level for this revision: reported

JSON