{
    "templates": {
        "BatchedGemmFp4LowLatency": {
            "dtypeA": "e2m1",
            "dtypeC": "e2m1",
            "mmaM": 128,
            "mmaN": 8,
            "mmaK": 64,
            "tileM": 128,
            "tileN": 8,
            "tileK": 512,
            "epilogueTileM": 128,
            "epilogueTileN": 8,
            "numStages": 4,
            "numMmaStages": 1,
            "numSlicesForSplitK": 1,
            "useTwoTmaLoadWarps": true,
            "clusterDimX": 1,
            "clusterDimY": 1,
            "clusterDimZ": 1,
            "sliceK": false,
            "transposeMmaOutput": true,
            "useShuffledMatrixA": true,
            "useDeepSeekFp8": false,
            "useTmaStore": true,
            "useCustomMmaSchedule": true,
            "gridTriggerSecondaryB": true,
            "gridWaitForPrimaryA": false,
            "gridWaitForPrimaryB": true,
            "sfLayoutB": "8x4",
            "sfLayoutC": "8x4",
            "batch": "N",
            "useMetaFp8": false,
            "numExperts": 128,
            "useCudaGraph": true
        },
        "BatchedGemmPerTensorScalingFp8LowLatency": {
            "dtypeA": "e4m3",
            "dtypeC": "e4m3",
            "mmaM": 128,
            "mmaN": 8,
            "mmaK": 32,
            "tileM": 128,
            "tileN": 8,
            "tileK": 512,
            "epilogueTileM": 128,
            "epilogueTileN": 8,
            "numStages": 3,
            "numMmaStages": 1,
            "numSlicesForSplitK": 1,
            "useTwoTmaLoadWarps": true,
            "clusterDimX": 1,
            "clusterDimY": 1,
            "clusterDimZ": 1,
            "sliceK": false,
            "transposeMmaOutput": true,
            "useShuffledMatrixA": true,
            "useDeepSeekFp8": false,
            "useTmaStore": true,
            "useCustomMmaSchedule": true,
            "gridTriggerSecondaryB": true,
            "gridWaitForPrimaryA": false,
            "gridWaitForPrimaryB": true,
            "batch": "N",
            "useMetaFp8": false,
            "numExperts": 128,
            "useCudaGraph": true
        },
        "BatchedGemmDeepSeekFp8LowLatency": {
            "dtypeA": "e4m3",
            "dtypeC": "e4m3",
            "mmaM": 64,
            "mmaN": 8,
            "mmaK": 32,
            "tileM": 128,
            "tileN": 8,
            "tileK": 128,
            "epilogueTileM": 64,
            "epilogueTileN": 8,
            "numStages": 3,
            "numSlicesForSplitK": 1,
            "useTwoTmaLoadWarps": true,
            "clusterDimX": 1,
            "clusterDimY": 1,
            "clusterDimZ": 1,
            "sliceK": false,
            "transposeMmaOutput": true,
            "useShuffledMatrixA": false,
            "useDeepSeekFp8": true,
            "useTmaStore": true,
            "useCustomMmaSchedule": true,
            "gridTriggerSecondaryB": true,
            "gridWaitForPrimaryA": false,
            "gridWaitForPrimaryB": true,
            "numStagesMma": 2,
            "numStagesMmaWithinWorkTile": 2,
            "batch": "N",
            "useMetaFp8": false,
            "numExperts": 128,
            "useCudaGraph": true
        },
        "BatchedGemmDeepSeekFp8Throughput": {
            "dtypeA": "e4m3",
            "dtypeC": "e4m3",
            "mmaM": 64,
            "mmaN": 128,
            "mmaK": 32,
            "tileM": 128,
            "tileN": 128,
            "tileK": 128,
            "epilogueTileM": 64,
            "epilogueTileN": 128,
            "numStages": 4,
            "numSlicesForSplitK": 1,
            "useTwoTmaLoadWarps": true,
            "clusterDimX": 1,
            "clusterDimY": 1,
            "clusterDimZ": 1,
            "sliceK": false,
            "transposeMmaOutput": true,
            "useShuffledMatrixA": false,
            "useDeepSeekFp8": true,
            "useTmaStore": true,
            "useCustomMmaSchedule": true,
            "gridTriggerSecondaryA": false,
            "gridTriggerSecondaryB": true,
            "gridWaitForPrimaryA": false,
            "gridWaitForPrimaryB": true,
            "hoistMmaTaskTryWaits": true,
            "numStagesMma": 4,
            "numStagesMmaAcrossWorkTile": 2,
            "batch": "N",
            "useMetaFp8": false,
            "numExperts": 128,
            "useCudaGraph": true
        },
        "BatchedGemmMxE2m1MxE4m3LowLatency": {
            "dtypeA": "mxe2m1",
            "dtypeB": "mxe4m3",
            "dtypeC": "mxe4m3",
            "mmaM": 128,
            "mmaN": 8,
            "mmaK": 32,
            "tileM": 128,
            "tileN": 8,
            "tileK": 512,
            "epilogueTileM": 128,
            "epilogueTileN": 8,
            "numStages": 3,
            "numMmaStages": 1,
            "numSlicesForSplitK": 1,
            "useTwoTmaLoadWarps": true,
            "clusterDimX": 1,
            "clusterDimY": 1,
            "clusterDimZ": 1,
            "sliceK": false,
            "transposeMmaOutput": true,
            "useShuffledMatrixA": true,
            "useDeepSeekFp8": false,
            "useTmaStore": true,
            "useCustomMmaSchedule": true,
            "gridTriggerSecondaryB": true,
            "gridWaitForPrimaryA": false,
            "gridWaitForPrimaryB": true,
            "sfLayoutB": "8x4",
            "sfLayoutC": "8x4",
            "batch": "N",
            "useMetaFp8": false,
            "numExperts": 128,
            "useCudaGraph": true
        }
    },
    "configs": [
        {
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": ["bf16", "fp16", "e2m1"],
            "listN": "8,8",
            "numExperts": 2,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_template": "BatchedGemmPerTensorScalingFp8LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": ["bf16", "fp16", "e4m3"],
            "listN": "8,8",
            "numExperts": 2,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_template": "BatchedGemmDeepSeekFp8LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": ["bf16", "fp16", "e4m3"],
            "listN": "8,8",
            "numExperts": 2,
            "numStagesMma": 2,
            "tileScheduler": "static"
        },
        {
            "_comment": "DS_FP4_FC1",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "sfLayoutB": "linear",
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e2m1",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_comment": "DS_FP4_FC2_persistSched",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 2,
            "tileScheduler": "persistent"
        },
        {
            "_comment": "DS_FP4_FC2_staticSched",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_comment": "DS_FP4_TP8_EP1_FC2_persistSched",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 2,
            "tileK": 256,
            "numStages": 6,
            "tileScheduler": "persistent"
        },
        {
            "_comment": "DS_FP4_TP8_EP1_FC2_staticSched",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 1,
            "tileK": 256,
            "numStages": 6,
            "tileScheduler": "static"
        },
        {
            "_comment": "DS_FP8_FC1",
            "_template": "BatchedGemmDeepSeekFp8LowLatency",
            "routeAct": true,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e4m3",
            "numTokens": 2,
            "numExperts": 2,
            "numStages": 8,
            "numStagesMma": 2,
            "tileScheduler": "static"
        },
        {
            "_comment": "DS_FP8_FC2_persistent",
            "_template": "BatchedGemmDeepSeekFp8LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStages": 8,
            "numStagesMma": 4,
            "tileScheduler": "persistent"
        },
        {
            "_comment": "DS_FP8_FC2_static",
            "_template": "BatchedGemmDeepSeekFp8LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStages": 8,
            "numStagesMma": 2,
            "tileScheduler": "static"
        },
        {
            "_comment": "DS_FP8_FC1_16_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": true,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e4m3",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": "static",
            "tileN": 16,
            "epilogueTileN": 16,
            "mmaN": 16
        },
        {
            "_comment": "DS_FP8_FC2_16_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": ["persistent", "static"],
            "tileN": 16,
            "epilogueTileN": 16,
            "mmaN": 16
        },
        {
            "_comment": "DS_FP8_FC1_32_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": true,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e4m3",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": "static",
            "tileN": 32,
            "epilogueTileN": 32,
            "mmaN": 32
        },
        {
            "_comment": "DS_FP8_FC2_32_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": ["persistent", "static"],
            "tileN": 32,
            "epilogueTileN": 32,
            "mmaN": 32
        },
        {
            "_comment": "DS_FP8_FC1_64_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": true,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e4m3",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": "static",
            "tileN": 64,
            "epilogueTileN": 64,
            "mmaN": 64
        },
        {
            "_comment": "DS_FP8_FC2_64_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": ["persistent", "static"],
            "tileN": 64,
            "epilogueTileN": 64,
            "mmaN": 64
        },
        {
            "_comment": "DS_FP8_FC1_128_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": true,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e4m3",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": "static",
            "tileN": 128,
            "epilogueTileN": 128,
            "mmaN": 128
        },
        {
            "_comment": "DS_FP8_FC2_128_THROUGHPUT",
            "_template": "BatchedGemmDeepSeekFp8Throughput",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "tileScheduler": ["persistent", "static"],
            "tileN": 128,
            "epilogueTileN": 128,
            "mmaN": 128
        },
        {
            "_comment": "Llama4_FP8_FC1",
            "_template": "BatchedGemmPerTensorScalingFp8LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "useRoutingScalesOnInput": true,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "e4m3",
            "numTokens": 2,
            "numExperts": 2,
            "numStages": 3,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_comment": "Llama4_FP8_FC2_persistent",
            "_template": "BatchedGemmPerTensorScalingFp8LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStages": 3,
            "numStagesMma": 2,
            "tileScheduler": "persistent"
        },
        {
            "_comment": "Llama4_FP8_FC2_static",
            "_template": "BatchedGemmPerTensorScalingFp8LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStages": 3,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_comment": "MxE2m1_FC1",
            "_template": "BatchedGemmMxE2m1MxE4m3LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "sfLayoutB": "linear",
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "mxe4m3",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_comment": "MxE2m1_FC2_persistent",
            "_template": "BatchedGemmMxE2m1MxE4m3LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 2,
            "tileScheduler": "persistent"
        },
        {
            "_comment": "MxE2m1_FC2_static",
            "_template": "BatchedGemmMxE2m1MxE4m3LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 1,
            "tileScheduler": "static"
        },
        {
            "_comment": "MxE2m1_TP8_EP1_FC2_persistent",
            "_template": "BatchedGemmMxE2m1MxE4m3LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 2,
            "tileK": 256,
            "numStages": 4,
            "tileScheduler": "persistent"
        },
        {
            "_comment": "MxE2m1_TP8_EP1_FC2_static",
            "_template": "BatchedGemmMxE2m1MxE4m3LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "useRoutingScalesOnInput": false,
            "useUnrollLoop2xForMma": [true, false],
            "dtypeC": "bf16",
            "numTokens": 2,
            "numExperts": 2,
            "numStagesMma": 1,
            "tileK": 256,
            "numStages": 4,
            "tileScheduler": "static"
        },
        {
            "_comment": "Qwen3_TP1_EP8_FC1",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "sfLayoutB": "linear",
            "dtypeC": "e2m1",
            "numStages": 4,
            "numStagesMma": 1,
            "tileK": 512,
            "tileScheduler": "static",
            "useUnrollLoop2xForMma": [true]
        },
        {
            "_comment": "Qwen3_TP1_EP8_FC2",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "dtypeC": "bf16",
            "numStages": 4,
            "numStagesMma": 1,
            "tileK": 512,
            "tileScheduler": "static",
            "useUnrollLoop2xForMma": [false]
        },
        {
            "_comment": "Qwen3_TP2_EP4_FC1",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "sfLayoutB": "linear",
            "dtypeC": "e2m1",
            "numStages": 4,
            "numStagesMma": 1,
            "tileK": 512,
            "tileScheduler": "static",
            "useUnrollLoop2xForMma": [true]
        },
        {
            "_comment": "Qwen3_TP2_EP4_FC2",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "dtypeC": "bf16",
            "numStages": 4,
            "numStagesMma": 2,
            "tileK": 512,
            "tileScheduler": "persistent",
            "useUnrollLoop2xForMma": [false]
        },
        {
            "_comment": "Qwen3_TP4_EP2_FC1",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "sfLayoutB": "linear",
            "dtypeC": "e2m1",
            "numStages": 4,
            "numStagesMma": 1,
            "tileK": 512,
            "tileScheduler": "static",
            "useUnrollLoop2xForMma": [true]
        },
        {
            "_comment": "Qwen3_TP4_EP2_FC2",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "dtypeC": "bf16",
            "numStages": 4,
            "numStagesMma": 2,
            "tileK": 512,
            "tileScheduler": "persistent",
            "useUnrollLoop2xForMma": [false]
        },
        {
            "_comment": "Qwen3_TP8_EP1_FC1",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": true,
            "fusedAct": true,
            "sfLayoutB": "linear",
            "dtypeC": "e2m1",
            "numStages": 4,
            "numStagesMma": 1,
            "tileK": 512,
            "tileScheduler": "static",
            "useUnrollLoop2xForMma": [true]
        },
        {
            "_comment": "Qwen3_TP8_EP1_FC2",
            "_template": "BatchedGemmFp4LowLatency",
            "routeAct": false,
            "fusedAct": false,
            "dtypeC": "bf16",
            "numStages": 4,
            "numStagesMma": 2,
            "tileK": 256,
            "tileScheduler": "persistent",
            "useUnrollLoop2xForMma": [false]
        }
    ]
}
