{
 "name": "kernel_bank_H024",
 "hour": 24,
 "items": [
  {
   "id": "prior",
   "kind": "prior",
   "text": "Working principles (general, not specific to any task): be thorough and verify against the live environment state. When a tool or API returns an empty, missing or surprising result where you expected data, do not take it at face value: investigate before concluding, check the arguments you passed, and try reasonable alternatives. Make sure you have collected all of the information the task needs. Before finishing, re-check that your answer and every required action are correct and complete.",
   "label": ""
  },
  {
   "id": "les-15e9e8569f",
   "kind": "lesson",
   "text": "Checker rule: getattr needs a literal, non-private attribute name",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-93e64733c9",
   "kind": "lesson",
   "text": "Pitfall: A reply without a ```python fenced code block was rejected by the checker. Always wrap the full ModelNew source in a ```python block.",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-4cfeee51c1",
   "kind": "lesson",
   "text": "Pitfall: Output mismatch beyond 1e-4 occurred repeatedly. Fix by forcing exact fp32 tl.dot(allow_tf32=False) and exact masking: K bounds at block granularity, tril mask, and zero-initialized output for skipped tiles.",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-e79cba77da",
   "kind": "lesson",
   "text": "Checker rule: forward modified its input tensors in place",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-1a767e9b1b",
   "kind": "lesson",
   "text": "Checker rule: do not define a class named Model (the reference); define ModelNew only",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-0aec41e64f",
   "kind": "lesson",
   "text": "Process: never SUBMIT code that has not passed ACTION: CHECK in this episode. Untested submissions that fail to compile or mismatch the reference score 0; a CHECK costs one reply and shows the compiler output.",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-11e399176f",
   "kind": "lesson",
   "text": "Pitfall: cpp_sources is compiled by plain c++ without CUDA headers: never use cudaStream_t or at::cuda::getCurrentCUDAStream there. Put wrappers needing streams in cuda_sources, keeping only plain-type prototypes in cpp_sources.",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-d10f50ba0c",
   "kind": "lesson",
   "text": "Pitfall: If cpp_sources must reference CUDA types or the current stream, explicitly #include <cuda_runtime.h> and <ATen/cuda/CUDAContext.h>; torch/extension.h does not provide them.",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-d9b41ee5fa",
   "kind": "lesson",
   "text": "Checker rule: assignment to attribute 'm.conv1' is not allowed (only self.<x>)",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-49a7dd4aa1",
   "kind": "lesson",
   "text": "Checker rule: assignment to attribute 'm.bn1' is not allowed (only self.<x>)",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-6405d23c44",
   "kind": "lesson",
   "text": "Checker rule: assignment to attribute 'm.conv2' is not allowed (only self.<x>)",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-24bf5ba8a9",
   "kind": "lesson",
   "text": "Checker rule: assignment to attribute 'm.bn2' is not allowed (only self.<x>)",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-6c7acdf532",
   "kind": "lesson",
   "text": "Checker rule: assignment to attribute 'm.downsample' is not allowed (only self.<x>)",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "les-5c37cab285",
   "kind": "lesson",
   "text": "Checker rule: At least one of your own kernels must actually launch during forward; a pure torch path (even with a compiled but unused kernel) is rejected as no_custom_kernel.",
   "label": "### Lessons about this environment (from official checker verdicts and verified outcomes)"
  },
  {
   "id": "pit-69809d3cb6",
   "kind": "pitfall",
   "text": "Pitfall: Avoid launching a per-forward weight-transform kernel (flip/transpose) before a library call. Cache the transformed weight once, or fuse the transform, since extra launches and memory traffic make it slower than eager.",
   "label": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-0d52154172",
   "kind": "pitfall",
   "text": "Pitfall: Don'...'s native transposed conv is usually as fast or faster, so this measured slower.",
   "label": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-4e0e42c44e",
   "kind": "pitfall",
   "text": "Pitfall: In Triton kernels over large tensors (e.g. 3D conv outputs), compute offsets in int64 (cast program_id/indices with .to(tl.int64)). int32 products like n*C*S can overflow and crash, leaving no output during timing.",
   "label": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-9be3ce52bf",
   "kind": "pitfall",
   "text": "Pitfall: Never launch a pure copy/identity kernel into a fresh buffer just to have a custom kernel; that adds a full memory round-trip and guarantees slowdown versus eager.",
   "label": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-65672ca4bf",
   "kind": "pitfall",
   "text": "Pitfall: Don't rewrite conv_transpose as flipped-weight F.conv2d plus a separate elementwise kernel; the per-call weight flip and extra full-output pass make it slower. Fuse bias into a real kernel, or skip pointless copies.",
   "label": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)"
  },
  {
   "id": "rec-21ef38357b",
   "kind": "recipe",
   "text": "[2.29x on conv_transposed_2D_asymmetric_input_asymmetric_kernel___padded__] For stride-1 transposed conv, rewrite it as a regular cuDNN conv2d: build the weight with a tiny Triton kernel that swaps the IC/OC axes and flips KH/KW, (IC,OC,KH,KW)->(OC,IC,KH-1-kh,KW-1-kw). Then call F.conv2d with padding=(K-1-p) per dimension and pass the bias through. cuDNN's forward conv path is much faster than ConvTranspose's dgrad path. Keep the math in fp32 so it is exact. For stride>1, groups, dilation or output_padding, fall back to nn.ConvTranspose2d. Cache the flipped weight if it is static.",
   "label": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-a172f35135",
   "kind": "recipe",
   "text": "[1.68x on ConvTranspose3d_BatchNorm_AvgPool_AvgPool] Keep the ConvTranspose in cuDNN via torch. Fold training-mode BatchNorm into a per-channel affine: one Triton program per (n,c) row loops over contiguous spatial data in 1024-wide blocks, accumulating fp32 sum and sum-of-squares. Finish mean/var/scale/shift with tiny torch ops. Because BN is affine, apply it after pooling: replace the two 2x pools with one fused 4x4x4 average kernel. Use one thread per output, int64 index math, static_range unrolled loads, and scale*avg+shift at store.",
   "label": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-001120b436",
   "kind": "recipe",
   "text": "[1.32x on ConvTranspose3d_BatchNorm_Subtract] Keep ConvTranspose in cuDNN via torch. Fuse everything after it into two Triton passes over the contiguous (N*C, S) view. Pass 1: one program per (n,c) row, loop over S in 1024-element blocks, accumulate fp32 sum and sum-of-squares. Finish the tiny per-channel math in torch: batch mean/var (training-mode BN) and scale = gamma/sqrt(var+eps). Pass 2: write scale*(x - row_mean) in one read-modify-write sweep. BN's beta, shift and the conv bias cancel algebraically, so fold them away. fp32 accumulation meets 1e-4.",
   "label": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-edeef3809c",
   "kind": "recipe",
   "text": "[1.26x on ConvTranspose3d_Sum_LayerNorm_AvgPool_GELU] Keep ConvTranspose in cuDNN via torch and fuse only the epilogue in Triton. LayerNorm normalises the last dim (W), not channels, so treat the output as a 2D [rows, W] view. Launch one program per row with BLOCK=next_pow2(W), add scalar bias before the mean, take a two-pass variance in fp32, and compute rstd as 1/sqrt(var+eps). Then run a second elementwise kernel fusing avgpool (static_range window loads, multiply by 1/k) with exact erf-GELU. Use int64 index math. Better still, fuse LN into the pool kernel to avoid the intermediate write.",
   "label": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-7d67d21ded",
   "kind": "recipe",
   "text": "[1.26x on ConvTranspose3d_LeakyReLU_Multiply_LeakyReLU_Max] Keep the ConvTranspose3d itself in cuDNN via nn.ConvTranspose3d and fuse the entire epilogue into one Triton kernel that reads the conv output once: LeakyReLU, per-channel scale, LeakyReLU, MaxPool. Launch one thread per pooled output element over a flat index (BLOCK=256, 1D grid). Decode n\u00b7c/od/oh/ow with div/mod, load the per-channel multiplier once, and unroll the 2x2x2 window with tl.static_range. Use tl.where for the slopes and a -1e30 init for max. Keep all math fp32, which stays within 1e-4.",
   "label": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-e75be99f9e",
   "kind": "recipe",
   "text": "[1.06x on ConvTranspose3d_MaxPool_Softmax_Subtract_Swish_Max] Keep ConvTranspose3d (and MaxPool3d) in cuDNN via torch and call .contiguous() on the result. Fuse all channel-wise epilogues (softmax over C, per-channel bias/subtract, activation, reduction over C) into one Triton kernel. Map one lane per (n, spatial) position with a flat 1D grid and BLOCK=256. Loop over the C channels with stride-S loads, so consecutive lanes read consecutive spatial addresses (coalesced). Use a stable 3-pass softmax (max, sum-exp, normalize+epilogue) in fp32. Re-reads hit L1/L2. Write only the reduced output.",
   "label": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "ker-865a0b6422",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef fused_kernel(x_ptr, out_ptr, N, C, D, H, W, OD, OH, OW, total, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    idx = pid * BLOCK + tl.arange(0, BLOCK)\n    idx64 = idx.to(tl.int64)\n    mask = idx < total\n\n    ow = idx64 % OW\n    t = idx64 // OW\n    oh = t % OH\n    t = t // OH\n    od = t % OD\n    n = t // OD\n\n    d0 = od * 6\n    h0 = oh * 6\n    w0 = ow * 6\n\n    C64 = C.to(tl.int64)\n    D64 = D.to(tl.int64)\n    H64 = H.to(tl.int64)\n    W64 = W.to(tl.int64)\n\n    s = tl.zeros((BLOCK,), tl.float32)\n    for c in range(0, C):\n        base_nc = (n * C64 + c) * D64\n        m = tl.full((BLOCK,), -1e30, tl.float32)\n        for dz in tl.static_range(6):\n            iz = d0 + dz\n            for dy in tl.static_range(6):\n                iy = h0 + dy\n                for dx in tl.static_range(6):\n                    ix = w0 + dx\n                    off = ((base_nc + iz) * H64 + iy) * W64 + ix\n                    v = tl.load(x_ptr + off, mask=mask, other=-1e30)\n                    m = tl.maximum(m, v)\n        s += m\n    tl.store(out_ptr + idx64, s, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_channels, out_channels, kernel_size, stride, padding):\n        super().__init__()\n        self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding)\n\n    def forward(self, x):\n        c = self.conv_transpose(x).contiguous()\n        N, C, D, H, W = c.shape\n        P1D, P1H, P1W = D // 2, H // 2, W // 2\n        OD, OH, OW = P1D // 3, P1H // 3, P1W // 3\n        out = torch.empty((N, 1, OD, OH, OW), device=c.device, dtype=c.dtype)\n        total = N * OD * OH * OW\n        BLOCK = 128\n        grid = (triton.cdiv(total, BLOCK),)\n        fused_kernel[grid](c, out, N, C, D, H, W, OD, OH, OW, total, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related conv_transpose problem (L2_078 ConvTranspose3d_Max_Max_Sum, 1.00x): adapt what applies"
  },
  {
   "id": "ker-735958c9f3",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef fused_kernel(x_ptr, out_ptr, mult_ptr, N, C, D, H, W, OD, OH, OW,\n                 slope, total, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    idx = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = idx < total\n\n    ow = idx % OW\n    t = idx // OW\n    oh = t % OH\n    t = t // OH\n    od = t % OD\n    nc = t // OD\n    c = nc % C\n\n    m = tl.load(mult_ptr + c, mask=mask, other=0.0)\n\n    acc = tl.full((BLOCK,), -1e30, tl.float32)\n    for dz in tl.static_range(2):\n        for dy in tl.static_range(2):\n            for dx in tl.static_range(2):\n                iz = od * 2 + dz\n                iy = oh * 2 + dy\n                ix = ow * 2 + dx\n                in_off = (((nc * D + iz) * H + iy) * W + ix)\n                v = tl.load(x_ptr + in_off, mask=mask, other=0.0)\n                v = tl.where(v >= 0, v, v * slope)\n                v = v * m\n                v = tl.where(v >= 0, v, v * slope)\n                acc = tl.maximum(acc, v)\n    tl.store(out_ptr + idx, acc, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding, multiplier_shape):\n        super().__init__()\n        self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, output_padding=output_padding)\n        self.multiplier = nn.Parameter(torch.randn(multiplier_shape))\n\n    def forward(self, x):\n        c = self.conv_transpose(x).contiguous()\n        N, C, D, H, W = c.shape\n        OD, OH, OW = D // 2, H // 2, W // 2\n        out = torch.empty((N, C, OD, OH, OW), device=c.device, dtype=c.dtype)\n        total = N * C * OD * OH * OW\n        mult = self.multiplier.contiguous().view(-1)\n        BLOCK = 256\n        grid = (triton.cdiv(total, BLOCK),)\n        fused_kernel[grid](c, out, mult, N, C, D, H, W, OD, OH, OW, 0.2, total, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related conv_transpose problem (L2_074 ConvTranspose3d_LeakyReLU_Multiply_LeakyReLU_Max, 1.26x): adapt what applies"
  },
  {
   "id": "pit-6ea0c69e03",
   "kind": "pitfall",
   "text": "Pitfall: When using split-K, keep the split count small; a very large split writes and re-reads a huge partial-sum buffer plus an extra reduction launch, eating the occupancy gain.",
   "label": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-474c4e4cdf",
   "kind": "pitfall",
   "text": "Pitfall: Strict fp32 Triton tl.dot (allow_tf32=False) rarely beats cuBLAS on matmul; a hand split-K version was correct but still 0.88x. Fuse surrounding ops or exploit structure instead of reimplementing plain GEMM.",
   "label": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-b4c54d1d46",
   "kind": "pitfall",
   "text": "Pitfall: For bandwidth-bound Triton kernels, give each program more work: larger tiles, multiple rows per program, more warps. Tiny per-program work and Python launch overhead lose to cuBLAS/ATen kernels.",
   "label": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-83f095e15c",
   "kind": "pitfall",
   "text": "Pitfall: Don't expect a single-pass memory-bound elementwise or broadcast kernel to beat eager, which already runs near bandwidth peak. Win by fusing multiple ops or reducing memory traffic.",
   "label": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-25393eeb09",
   "kind": "pitfall",
   "text": "Pitfall: If writing a Triton GEMM anyway, use @triton.autotune over several BM/BN/BK, num_warps and num_stages configs, plus grouped tile ordering. A single fixed 64x64x32 config is far slower than eager.",
   "label": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-8b7c11b862",
   "kind": "pitfall",
   "text": "Pitfall: Do not hand-write a plain fp32 matmul with TF32 disabled; it loses to cuBLAS. Call torch.matmul on transposed views (no .contiguous copies) and spend custom-kernel effort only on fusing surrounding ops.",
   "label": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)"
  },
  {
   "id": "rec-97181ed7d3",
   "kind": "recipe",
   "text": "[36.02x on Gemm_Subtract_GlobalAvgPool_LogSumExp_GELU_ResidualAdd] Look for algebraic collapse before writing kernels. When a GEMM feeds a linear reduction (a mean or sum over output features), rewrite mean(Wx+b-s) as x\u00b7(W.sum(0)/N) + mean(b-s). This turns the GEMM into a GEMV kept in torch/cuBLAS. Check for degenerate ops: logsumexp over a size-1 dim is the identity, so drop it. Apply cheap scalar ops such as GELU on the reduced vector in torch. Fuse the final per-row broadcast plus residual add into one coalesced 1D Triton elementwise kernel (BLOCK=1024, row = offs // n_feat). fp32 summation stays within 1e-4.",
   "label": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-8bd287f31a",
   "kind": "recipe",
   "text": "[4.58x on Matmul_for_lower_triangular_matrices] Exploit structural sparsity (triangular, banded, diagonal) with a custom Triton tiled matmul instead of dense cuBLAS. Use a 2D grid of output tiles and return early for tiles that are entirely zero. Clamp the K-loop to the nonzero range: for tril\u00d7tril, run from floor(n_lo/BK)*BK to min(m_lo+BM, N). Accumulate in fp32 with tl.dot(allow_tf32=False) to stay within 1e-4. Apply the output mask with tl.where before the store. Pre-zero the output with torch.zeros so skipped tiles stay zero. 64x64x32 tiles, 4 warps, 3 stages.",
   "label": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-d2c54a1922",
   "kind": "recipe",
   "text": "[4.11x on Matmul_for_upper_triangular_matrices] Exploit structural sparsity (triangular, banded, or block-sparse) with a Triton tiled GEMM instead of dense cuBLAS. Use a 2D grid over output tiles, early-return tiles that are entirely masked out, and clip the K loop to the nonzero range (for triu\u00b7triu, k from the row-tile start to the column-tile end, aligned to BLOCK_K). Accumulate in fp32 with tl.dot(allow_tf32=False) to stay within 1e-4. Apply the triangle mask with tl.where before storing. Preallocate the output with torch.zeros so skipped tiles stay zero. Tiles 64x64x32, 4 warps, 3 stages.",
   "label": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-8274c30657",
   "kind": "recipe",
   "text": "[1.02x on Matmul_BatchNorm_BiasAdd_Divide_Swish] Keep the GEMM (nn.Linear) in cuBLAS via torch and fuse only the epilogue in Triton. For training-mode BatchNorm, run a per-column stats kernel that accumulates sum and sum-of-squares in fp32, giving biased variance for normalization. Update running_mean/var under no_grad using the unbiased var, M/(M-1). Then one flat elementwise kernel applies normalize, gamma/beta, bias, divide and Swish, indexing per-column params with offs % N. Gains are small because the GEMM dominates; next, coalesce stats loads with 2D column tiles.",
   "label": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-4365468e5f",
   "kind": "recipe",
   "text": "[1.01x on Matmul_GroupNorm_LeakyReLU_Sum] Keep the Linear GEMM in cuBLAS via the module's own fc (F.linear with bias). Fuse every downstream per-row op into one Triton kernel reading the GEMM output once: GroupNorm, affine, LeakyReLU and x+x (as y*2). Use one program per (row, group), BLOCK=next_power_of_2(group size), contiguous masked loads. Compute the two-pass mean/variance in fp32 registers and mask padded lanes before squaring. Expect small gains, since the GEMM dominates; for tiny groups, batch several groups per program to cut launch and occupancy waste.",
   "label": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "rec-63e1a542cd",
   "kind": "recipe",
   "text": "[1.01x on Gemm_Sigmoid_Scaling_ResidualAdd] Keep the GEMM in cuBLAS through nn.Linear / F.linear in fp32, with the bias folded in by cuBLAS. Replace the chain of eager elementwise ops (sigmoid, scale, residual add) with a single flat 1D Triton kernel: one load, compute s=1/(1+exp(-v)), y=s*scale+v, one store. Use contiguous masked blocks of 1024 and grid=cdiv(n,BLOCK). Writing in place into the GEMM output saves an allocation. The gain is small because the GEMM dominates; a bigger win requires a fused-epilogue GEMM.",
   "label": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "ker-1c044c9b6e",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef gn_kernel(x_ptr, w_ptr, b_ptr, out_ptr,\n              N, C, G, CG, eps, neg_slope,\n              BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    row = pid // G\n    grp = pid % G\n    base = row * C + grp * CG\n    offs = tl.arange(0, BLOCK)\n    mask = offs < CG\n    v = tl.load(x_ptr + base + offs, mask=mask, other=0.0)\n    s = tl.sum(v, axis=0)\n    mean = s / CG\n    d = tl.where(mask, v - mean, 0.0)\n    var = tl.sum(d * d, axis=0) / CG\n    rstd = 1.0 / tl.sqrt(var + eps)\n    coff = grp * CG + offs\n    w = tl.load(w_ptr + coff, mask=mask, other=0.0)\n    b = tl.load(b_ptr + coff, mask=mask, other=0.0)\n    y = (v - mean) * rstd * w + b\n    y = tl.where(y >= 0, y, y * neg_slope)\n    y = y + y\n    tl.store(out_ptr + base + offs, y, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, input_size, hidden_size, num_groups, eps=1e-5, negative_slope=0.01):\n        super().__init__()\n        self.fc = nn.Linear(input_size, hidden_size)\n        self.gn = nn.GroupNorm(num_groups=num_groups, num_channels=hidden_size, eps=eps)\n        self.leaky_relu = nn.LeakyReLU(negative_slope=negative_slope)\n        self.num_groups = num_groups\n        self.hidden_size = hidden_size\n        self.eps = eps\n        self.negative_slope = negative_slope\n\n    def forward(self, x):\n        z = self.fc(x).contiguous()\n        N, C = z.shape\n        G = self.num_groups\n        CG = C // G\n        out = torch.empty_like(z)\n        BLOCK = triton.next_power_of_2(CG)\n        grid = (N * G,)\n        gn_kernel[grid](z, self.gn.weight, self.gn.bias, out,\n                        N, C, G, CG, self.eps, self.negative_slope,\n                        BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_062 Matmul_GroupNorm_LeakyReLU_Sum, 1.01x): adapt what applies"
  },
  {
   "id": "ker-8f913b2bf6",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef swish_scale_kernel(x_ptr, out_ptr, scale, n, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n\n    v = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    s = 1.0 / (1.0 + tl.exp(-v))\n    y = v * s * scale\n    tl.store(out_ptr + offs, y, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, scaling_factor):\n        super().__init__()\n        self.matmul = nn.Linear(in_features, out_features)\n        self.scaling_factor = scaling_factor\n\n    def forward(self, x):\n        z = F.linear(x, self.matmul.weight, self.matmul.bias).contiguous()\n        out = torch.empty_like(z)\n        n = z.numel()\n        BLOCK = 1024\n        grid = (triton.cdiv(n, BLOCK),)\n        swish_scale_kernel[grid](z, out, float(self.scaling_factor), n, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_059 Matmul_Swish_Scaling, 1.00x): adapt what applies"
  },
  {
   "id": "ker-6558b83d05",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef epilogue_kernel(x_ptr, out_ptr, scaling, n_elements, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n_elements\n    v = tl.load(x_ptr + offs, mask=mask)\n    s = 1.0 / (1.0 + tl.exp(-v))\n    y = s * scaling + v\n    tl.store(out_ptr + offs, y, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, input_size, hidden_size, scaling_factor):\n        super().__init__()\n        self.gemm = nn.Linear(input_size, hidden_size)\n        self.scaling_factor = scaling_factor\n\n    def forward(self, x):\n        z = self.gemm(x)\n        out = torch.empty_like(z)\n        n = z.numel()\n        BLOCK = 1024\n        grid = (triton.cdiv(n, BLOCK),)\n        epilogue_kernel[grid](z, out, self.scaling_factor, n, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_070 Gemm_Sigmoid_Scaling_ResidualAdd, 1.01x): adapt what applies"
  },
  {
   "id": "ker-d0dcdcbae6",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef reduce_kernel(x_ptr, sum_ptr, sqsum_ptr, S, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = tl.arange(0, BLOCK)\n    base = pid * S\n    acc = tl.zeros((), dtype=tl.float32)\n    accsq = tl.zeros((), dtype=tl.float32)\n    for i in range(0, S, BLOCK):\n        idx = i + offs\n        m = idx < S\n        v = tl.load(x_ptr + base + idx, mask=m, other=0.0)\n        acc += tl.sum(v)\n        accsq += tl.sum(v * v)\n    tl.store(sum_ptr + pid, acc)\n    tl.store(sqsum_ptr + pid, accsq)\n\n\n@triton.jit\ndef out_kernel(x_ptr, out_ptr, scale_ptr, smean_ptr, S, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = tl.arange(0, BLOCK)\n    base = pid * S\n    sc = tl.load(scale_ptr + pid)\n    sm = tl.load(smean_ptr + pid)\n    for i in range(0, S, BLOCK):\n        idx = i + offs\n        m = idx < S\n        v = tl.load(x_ptr + base + idx, mask=m, other=0.0)\n        r = sc * (v - sm)\n        tl.store(out_ptr + base + idx, r, mask=m)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_channels, out_channels, kernel_size, stride, padding, bias=True):\n        super(ModelNew, self).__init__()\n        self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, bias=bias)\n        self.batch_norm = nn.BatchNorm3d(out_channels)\n\n    def forward(self, x):\n        c = self.conv_transpose(x)\n        N, C, D, H, W = c.shape\n        S = D * H * W\n        c2 = c.contiguous().view(N * C, S)\n\n        ssum = torch.empty(N * C, device=c.device, dtype=torch.float32)\n        ssq = torch.empty(N * C, device=c.device, dtype=torch.float32)\n        reduce_kernel[(N * C,)](c2, ssum, ssq, S, BLOCK=1024)\n\n        ssum_nc = ssum.view(N, C)\n        ssq_nc = ssq.view(N, C)\n        total_sum = ssum_nc.sum(0)\n        total_sq = ssq_nc.sum(0)\n        M = N * S\n        mean_c = total_sum / M\n        var_c = total_sq / M - mean_c * mean_c\n        scale_c = self.batch_norm.weight / torch.sqrt(var_c + self.batch_norm.eps)  # (C,)\n\n        scale_nc = scale_c.unsqueeze(0).expand(N, C).contiguous().view(N * C)\n        smean_nc = (ssum_nc / S).contiguous().view(N * C)\n\n        out = torch.empty_like(c2)\n        out_kernel[(N * C,)](c2, out, scale_nc, smean_nc, S, BLOCK=1024)\n        return out.view(N, C, D, H, W)\n```",
   "label": "### A verified kernel for a related conv_transpose problem (L2_015 ConvTranspose3d_BatchNorm_Subtract, 1.32x): adapt what applies"
  },
  {
   "id": "ker-b30336142d",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef fused_kernel(x_ptr, sub_ptr, out_ptr, N, C, S, total, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    idx = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = idx < total\n\n    # idx indexes (n, s) flat where s in [0,S)\n    n = idx // S\n    s = idx % S\n    base = n * C * S + s\n\n    # pass 1: max over channels\n    mx = tl.full((BLOCK,), -1e30, tl.float32)\n    for c in range(0, C):\n        v = tl.load(x_ptr + base + c * S, mask=mask, other=-1e30)\n        mx = tl.maximum(mx, v)\n\n    # pass 2: sum of exp\n    sm = tl.zeros((BLOCK,), tl.float32)\n    for c in range(0, C):\n        v = tl.load(x_ptr + base + c * S, mask=mask, other=0.0)\n        sm += tl.exp(v - mx)\n\n    # pass 3: softmax, subtract, swish, max over channels\n    res = tl.full((BLOCK,), -1e30, tl.float32)\n    for c in range(0, C):\n        v = tl.load(x_ptr + base + c * S, mask=mask, other=0.0)\n        sub = tl.load(sub_ptr + c)\n        sm_val = tl.exp(v - mx) / sm\n        y = sm_val - sub\n        swish = (tl.sigmoid(y) * y)\n        res = tl.maximum(res, swish)\n\n    tl.store(out_ptr + idx, res, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding, pool_kernel_size, pool_stride, pool_padding):\n        super().__init__()\n        self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, output_padding=output_padding)\n        self.max_pool = nn.MaxPool3d(kernel_size=pool_kernel_size, stride=pool_stride, padding=pool_padding)\n        self.subtract = nn.Parameter(torch.randn(out_channels))\n\n    def forward(self, x):\n        x = self.conv_transpose(x)\n        x = self.max_pool(x).contiguous()\n        N, C, D, H, W = x.shape\n        S = D * H * W\n        total = N * S\n\n        out = torch.empty((N, D, H, W), device=x.device, dtype=x.dtype)\n        sub = self.subtract.contiguous()\n\n        BLOCK = 256\n        grid = (triton.cdiv(total, BLOCK),)\n        fused_kernel[grid](x, sub, out, N, C, S, total, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related conv_transpose problem (L2_089 ConvTranspose3d_MaxPool_Softmax_Subtract_Swish_Max, 1.06x): adapt what applies"
  },
  {
   "id": "ker-0609afeaca",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef stats_kernel(x_ptr, mean_ptr, var_ptr, M, N, BLOCK_M: tl.constexpr):\n    col = tl.program_id(0)\n    offs = tl.arange(0, BLOCK_M)\n    acc = tl.zeros((), dtype=tl.float32)\n    acc2 = tl.zeros((), dtype=tl.float32)\n    for start in range(0, M, BLOCK_M):\n        idx = start + offs\n        mask = idx < M\n        v = tl.load(x_ptr + idx * N + col, mask=mask, other=0.0)\n        acc += tl.sum(v)\n        acc2 += tl.sum(v * v)\n    mean = acc / M\n    var = acc2 / M - mean * mean\n    tl.store(mean_ptr + col, mean)\n    tl.store(var_ptr + col, var)\n\n@triton.jit\ndef apply_kernel(x_ptr, out_ptr, mean_ptr, var_ptr, gamma_ptr, beta_ptr, bias_ptr,\n                 eps, divide_value, M, N, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < M * N\n    col = offs % N\n    v = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    mean = tl.load(mean_ptr + col, mask=mask, other=0.0)\n    var = tl.load(var_ptr + col, mask=mask, other=0.0)\n    gamma = tl.load(gamma_ptr + col, mask=mask, other=0.0)\n    beta = tl.load(beta_ptr + col, mask=mask, other=0.0)\n    bias = tl.load(bias_ptr)\n    inv = 1.0 / tl.sqrt(var + eps)\n    y = (v - mean) * inv * gamma + beta\n    y = (y + bias) / divide_value\n    y = y * (1.0 / (1.0 + tl.exp(-y)))\n    tl.store(out_ptr + offs, y, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, bn_eps=1e-5, bn_momentum=0.1, bias_shape=(1,), divide_value=1.0):\n        super().__init__()\n        self.matmul = nn.Linear(in_features, out_features)\n        self.bn = nn.BatchNorm1d(out_features, eps=bn_eps, momentum=bn_momentum)\n        self.bias = nn.Parameter(torch.randn(bias_shape))\n        self.divide_value = divide_value\n        self.bn_eps = bn_eps\n        self.bn_momentum = bn_momentum\n\n    def forward(self, x):\n        z = self.matmul(x).contiguous()\n        M, N = z.shape\n        mean = torch.empty(N, device=z.device, dtype=torch.float32)\n        var = torch.empty(N, device=z.device, dtype=torch.float32)\n        stats_kernel[(N,)](z, mean, var, M, N, BLOCK_M=1024)\n\n        with torch.no_grad():\n            self.bn.running_mean.mul_(1 - self.bn_momentum).add_(self.bn_momentum * mean)\n            unbiased = var * (M / (M - 1))\n            self.bn.running_var.mul_(1 - self.bn_momentum).add_(self.bn_momentum * unbiased)\n            self.bn.num_batches_tracked.add_(1)\n\n        out = torch.empty_like(z)\n        bias_flat = self.bias.reshape(-1)\n        BLOCK = 1024\n        grid = (triton.cdiv(M * N, BLOCK),)\n        apply_kernel[grid](z, out, mean, var, self.bn.weight, self.bn.bias, bias_flat,\n                           self.bn_eps, self.divide_value, M, N, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_097 Matmul_BatchNorm_BiasAdd_Divide_Swish, 1.02x): adapt what applies"
  },
  {
   "id": "ker-4a82a14d5e",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef bias_relu_kernel(x_ptr, bias_ptr, out_ptr, M, N, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < M * N\n    col = offs % N\n    v = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    b = tl.load(bias_ptr + col, mask=mask, other=0.0)\n    y = tl.maximum(v + b, 0.0)\n    tl.store(out_ptr + offs, y, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, bias_shape):\n        super().__init__()\n        self.gemm = nn.Linear(in_features, out_features, bias=False)\n        self.bias = nn.Parameter(torch.randn(bias_shape))\n\n    def forward(self, x):\n        z = torch.mm(x, self.gemm.weight.t())\n        M, N = z.shape\n        out = torch.empty_like(z)\n        BLOCK = 1024\n        grid = (triton.cdiv(M * N, BLOCK),)\n        bias_relu_kernel[grid](z, self.bias, out, M, N, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_076 Gemm_Add_ReLU, 1.01x): adapt what applies"
  },
  {
   "id": "ker-d63a2a3ef9",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef fused_kernel(x_ptr, out_ptr, mult, neg_slope, n, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n\n    v = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    v = v * mult\n    v = tl.where(v >= 0, v, v * neg_slope)\n    tl.store(out_ptr + offs, v, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, multiplier, negative_slope):\n        super().__init__()\n        self.gemm = nn.Linear(in_features, out_features)\n        self.multiplier = multiplier\n        self.negative_slope = negative_slope\n\n    def forward(self, x):\n        z = torch.addmm(self.gemm.bias, x, self.gemm.weight.t())\n        n = z.numel()\n        out = torch.empty_like(z)\n        BLOCK = 1024\n        grid = (triton.cdiv(n, BLOCK),)\n        fused_kernel[grid](z, out, self.multiplier, self.negative_slope, n, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_012 Gemm_Multiply_LeakyReLU, 1.00x): adapt what applies"
  },
  {
   "id": "ker-f1f0450765",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef fused_kernel(x_ptr, bias_ptr, gamma_ptr, beta_ptr, out_ptr,\n                 N, C, G, CG, eps,\n                 BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    row = pid // G\n    grp = pid % G\n    col0 = grp * CG\n    offs = tl.arange(0, BLOCK)\n    mask = offs < CG\n    chan = col0 + offs\n    idx = row * C + chan\n\n    v = tl.load(x_ptr + idx, mask=mask, other=0.0)\n    b = tl.load(bias_ptr + chan, mask=mask, other=0.0)\n    v = v + b\n    # hardtanh [-1,1]\n    v = tl.minimum(tl.maximum(v, -1.0), 1.0)\n    # mish: v * tanh(softplus(v))\n    sp = tl.log(1.0 + tl.exp(v))\n    v = v * (tl.exp(sp) - tl.exp(-sp)) / (tl.exp(sp) + tl.exp(-sp))\n\n    # group norm stats\n    s = tl.sum(tl.where(mask, v, 0.0), axis=0)\n    mean = s / CG\n    d = tl.where(mask, v - mean, 0.0)\n    var = tl.sum(d * d, axis=0) / CG\n    inv = 1.0 / tl.sqrt(var + eps)\n    g = tl.load(gamma_ptr + chan, mask=mask, other=0.0)\n    bt = tl.load(beta_ptr + chan, mask=mask, other=0.0)\n    out = (v - mean) * inv * g + bt\n    tl.store(out_ptr + idx, out, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, bias_shape, num_groups):\n        super().__init__()\n        self.gemm = nn.Linear(in_features, out_features)\n        self.bias = nn.Parameter(torch.randn(bias_shape))\n        self.hardtanh = nn.Hardtanh()\n        self.mish = nn.Mish()\n        self.groupnorm = nn.GroupNorm(num_groups=num_groups, num_channels=out_features)\n        self.num_groups = num_groups\n        self.out_features = out_features\n\n    def forward(self, x):\n        z = self.gemm(x)\n        N, C = z.shape\n        G = self.num_groups\n        CG = C // G\n        out = torch.empty_like(z)\n        BLOCK = triton.next_power_of_2(CG)\n        grid = (N * G,)\n        fused_kernel[grid](\n            z, self.bias, self.groupnorm.weight, self.groupnorm.bias, out,\n            N, C, G, CG, float(self.groupnorm.eps),\n            BLOCK=BLOCK,\n        )\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_094 Gemm_BiasAdd_Hardtanh_Mish_GroupNorm, 1.01x): adapt what applies"
  },
  {
   "id": "pit-263235db52",
   "kind": "pitfall",
   "text": "Pitfall: For per-channel affine ops on NCHW, launch a 2D grid (one program per N*C row, tiles over HW). Precompute per-channel scale/shift once, instead of per-element div/mod, four parameter gathers and an rsqrt.",
   "label": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-06df4b1c90",
   "kind": "pitfall",
   "text": "Pitfall: Don't replace cuDNN BatchNorm in training mode with separate torch mean/var reductions, running-stat updates and an elementwise kernel. The extra launches and memory passes outweigh the fusion; it ran far slower than eager.",
   "label": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-720c125700",
   "kind": "pitfall",
   "text": "Pitfall: Do not cache derived weights or folded parameters on the first forward call. Recompute them from the live parameters, or confirm that both modes match the reference within 1e-4.",
   "label": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-3a07b0abdd",
   "kind": "pitfall",
   "text": "Pitfall: Do not fold BatchNorm into conv weights using running_mean/var. The evaluator may run the reference in training mode, where BN normalizes with batch statistics. Check self.training, or compute batch stats yourself.",
   "label": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)"
  },
  {
   "id": "rec-04ea4c7983",
   "kind": "recipe",
   "text": "[1.00x on RegNet] Keep convolutions, pooling and Linear in cuDNN/cuBLAS via torch. Fuse BatchNorm+ReLU into one elementwise Triton kernel. Precompute per-channel scale=w/sqrt(var+eps) and shift=b-mean*scale in torch. In training mode use batch mean/var (unbiased=False) and update running stats with the unbiased correction n/(n-1). Index channels with (offs//HW)%C on contiguous NCHW, use 1D BLOCK=1024 with masking, and do fp32 math throughout. Gains are small (~1.005x). For more, fuse BN+ReLU+maxpool or the final pool with GAP.",
   "label": "### Verified recipes for network problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "ker-5a91e892c6",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef bn_relu_kernel(x_ptr, out_ptr, scale_ptr, shift_ptr, HW, C, n_elem, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n_elem\n    c = (offs // HW) % C\n    x = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    s = tl.load(scale_ptr + c, mask=mask, other=0.0)\n    sh = tl.load(shift_ptr + c, mask=mask, other=0.0)\n    y = x * s + sh\n    y = tl.maximum(y, 0.0)\n    tl.store(out_ptr + offs, y, mask=mask)\n\ndef apply_bn_relu(x, scale, shift):\n    N, C, H, W = x.shape\n    out = torch.empty_like(x)\n    HW = H * W\n    n = x.numel()\n    grid = (triton.cdiv(n, 1024),)\n    bn_relu_kernel[grid](x, out, scale.contiguous(), shift.contiguous(), HW, C, n, BLOCK=1024)\n    return out\n\nclass ModelNew(nn.Module):\n    def __init__(self, input_channels, stages, block_widths, output_classes):\n        super(ModelNew, self).__init__()\n        self.stages = stages\n        self.block_widths = block_widths\n        layers = []\n        current = input_channels\n        for i in range(stages):\n            layers.append(nn.Sequential(\n                nn.Conv2d(current, block_widths[i], kernel_size=3, padding=1),\n                nn.BatchNorm2d(block_widths[i]),\n                nn.ReLU(),\n                nn.Conv2d(block_widths[i], block_widths[i], kernel_size=3, padding=1),\n                nn.BatchNorm2d(block_widths[i]),\n                nn.ReLU(),\n                nn.MaxPool2d(kernel_size=2, stride=2),\n            ))\n            current = block_widths[i]\n        self.feature_extractor = nn.Sequential(*layers)\n        self.fc = nn.Linear(block_widths[-1], output_classes)\n\n    def _bn_params(self, bn, x):\n        if self.training:\n            mean = x.mean(dim=[0, 2, 3])\n            var = x.var(dim=[0, 2, 3], unbiased=False)\n            n = x.numel() // x.shape[1]\n            with torch.no_grad():\n                bn.running_mean.mul_(1 - bn.momentum).add_(bn.momentum * mean)\n                bn.running_var.mul_(1 - bn.momentum).add_(bn.momentum * var * n / (n - 1))\n        else:\n            mean = bn.running_mean\n            var = bn.running_var\n        scale = bn.weight / torch.sqrt(var + bn.eps)\n        shift = bn.bias - mean * scale\n        return scale, shift\n\n    def forward(self, x):\n        for stage in self.feature_extractor:\n            conv1 = stage[0]\n            bn1 = stage[1]\n            conv2 = stage[3]\n            bn2 = stage[4]\n            pool = stage[6]\n            x = conv1(x)\n            s, sh = self._bn_params(bn1, x)\n            x = apply_bn_relu(x, s, sh)\n            x = conv2(x)\n            s, sh = self._bn_params(bn2, x)\n            x = apply_bn_relu(x, s, sh)\n            x = pool(x)\n        x = torch.mean(x, dim=[2, 3])\n        x = self.fc(x)\n        return x\n```",
   "label": "### A verified kernel for a related network problem (L3_027 RegNet, 1.00x): adapt what applies"
  },
  {
   "id": "pit-d5872964f6",
   "kind": "pitfall",
   "text": "Pitfall: Handle every optional forward argument (e.g. initial_states) and every intermediate the reference includes, even when it defaults to zeros. Verify the returned tensor is the same slice and quantity the reference returns.",
   "label": "### Pitfalls seen on earlier attention problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-8435e9ebfe",
   "kind": "pitfall",
   "text": "Pitfall: Do not algebraically restructure the reference'...'s exact operation order and test against it before optimizing.",
   "label": "### Pitfalls seen on earlier attention problems (wrong results or slower than eager)"
  },
  {
   "id": "ker-370fab9980",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef epilogue_kernel(x_ptr, out_ptr, scaling, hmin, hmax, n, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n\n    v = tl.load(x_ptr + offs, mask=mask)\n    v = v * scaling\n    v = tl.minimum(tl.maximum(v, hmin), hmax)\n    g = 0.5 * v * (1.0 + tl.erf(v * 0.7071067811865476))\n    tl.store(out_ptr + offs, g, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, scaling_factor, hardtanh_min, hardtanh_max):\n        super().__init__()\n        self.gemm = nn.Linear(in_features, out_features)\n        self.scaling_factor = scaling_factor\n        self.hardtanh_min = hardtanh_min\n        self.hardtanh_max = hardtanh_max\n\n    def forward(self, x):\n        z = self.gemm(x)\n        out = torch.empty_like(z)\n        n = z.numel()\n        BLOCK = 1024\n        grid = (triton.cdiv(n, BLOCK),)\n        epilogue_kernel[grid](z, out, self.scaling_factor,\n                              float(self.hardtanh_min), float(self.hardtanh_max),\n                              n, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_053 Gemm_Scaling_Hardtanh_GELU, 1.01x): adapt what applies"
  },
  {
   "id": "ker-ae3c5733ff",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef mish2_kernel(x_ptr, out_ptr, n, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n\n    v = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    sp = tl.log(1.0 + tl.exp(v))\n    y = v * (tl.exp(sp) - tl.exp(-sp)) / (tl.exp(sp) + tl.exp(-sp))\n    sp2 = tl.log(1.0 + tl.exp(y))\n    z = y * (tl.exp(sp2) - tl.exp(-sp2)) / (tl.exp(sp2) + tl.exp(-sp2))\n    tl.store(out_ptr + offs, z, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features):\n        super().__init__()\n        self.linear = nn.Linear(in_features, out_features)\n\n    def forward(self, x):\n        z = self.linear(x).contiguous()\n        out = torch.empty_like(z)\n        n = z.numel()\n        BLOCK = 1024\n        grid = (triton.cdiv(n, BLOCK),)\n        mish2_kernel[grid](z, out, n, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_029 Matmul_Mish_Mish, 1.00x): adapt what applies"
  },
  {
   "id": "ker-38bc1e9f51",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef add_kernel(x_ptr, s_ptr, out_ptr, n_feat, n, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < n\n    row = offs // n_feat\n    v = tl.load(x_ptr + offs, mask=mask)\n    s = tl.load(s_ptr + row, mask=mask)\n    tl.store(out_ptr + offs, v + s, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features, bias=True):\n        super().__init__()\n        self.gemm = nn.Linear(in_features, out_features, bias=bias)\n        self.subtract = nn.Parameter(torch.randn(out_features))\n        self.out_features = out_features\n\n    def forward(self, x):\n        # mean over output features of (Wx + b - subtract) = (colsum/out)\u00b7x + c\n        colsum = self.gemm.weight.sum(dim=0) / self.out_features  # (in,)\n        if self.gemm.bias is not None:\n            c = (self.gemm.bias - self.subtract).mean()\n        else:\n            c = (-self.subtract).mean()\n        s = x @ colsum + c  # (batch,)\n        # logsumexp over single element (dim=1 after keepdim mean) is identity\n        s = F.gelu(s)\n        out = torch.empty_like(x)\n        n = x.numel()\n        n_feat = x.shape[1]\n        BLOCK = 1024\n        grid = (triton.cdiv(n, BLOCK),)\n        add_kernel[grid](x, s, out, n_feat, n, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_051 Gemm_Subtract_GlobalAvgPool_LogSumExp_GELU_ResidualAdd, 36.02x): adapt what applies"
  },
  {
   "id": "ker-f5807f0030",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n@triton.jit\ndef stats_kernel(x_ptr, mean_ptr, var_ptr, M, N, BLOCK_M: tl.constexpr):\n    col = tl.program_id(0)\n    offs = tl.arange(0, BLOCK_M)\n    acc = tl.zeros((), dtype=tl.float32)\n    acc2 = tl.zeros((), dtype=tl.float32)\n    for start in range(0, M, BLOCK_M):\n        idx = start + offs\n        mask = idx < M\n        v = tl.load(x_ptr + idx * N + col, mask=mask, other=0.0)\n        acc += tl.sum(v)\n        acc2 += tl.sum(v * v)\n    mean = acc / M\n    var = acc2 / M - mean * mean\n    tl.store(mean_ptr + col, mean)\n    tl.store(var_ptr + col, var)\n\n@triton.jit\ndef apply_kernel(x_ptr, out_ptr, mean_ptr, var_ptr, gamma_ptr, beta_ptr,\n                 eps, M, N, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    mask = offs < M * N\n    col = offs % N\n    v = tl.load(x_ptr + offs, mask=mask, other=0.0)\n    mean = tl.load(mean_ptr + col, mask=mask, other=0.0)\n    var = tl.load(var_ptr + col, mask=mask, other=0.0)\n    gamma = tl.load(gamma_ptr + col, mask=mask, other=0.0)\n    beta = tl.load(beta_ptr + col, mask=mask, other=0.0)\n    inv = 1.0 / tl.sqrt(var + eps)\n    y = (v - mean) * inv * gamma + beta\n    # gelu\n    g = 0.5 * y * (1.0 + tl.erf(y * 0.7071067811865476))\n    # relu\n    g = tl.maximum(g, 0.0)\n    tl.store(out_ptr + offs, g, mask=mask)\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_features, out_features):\n        super().__init__()\n        self.gemm = nn.Linear(in_features, out_features)\n        self.batch_norm = nn.BatchNorm1d(out_features)\n        self.eps = 1e-5\n        self.momentum = 0.1\n\n    def forward(self, x):\n        z = self.gemm(x).contiguous()\n        M, N = z.shape\n        mean = torch.empty(N, device=z.device, dtype=torch.float32)\n        var = torch.empty(N, device=z.device, dtype=torch.float32)\n        stats_kernel[(N,)](z, mean, var, M, N, BLOCK_M=2048)\n\n        if self.training:\n            with torch.no_grad():\n                self.batch_norm.running_mean.mul_(1 - self.momentum).add_(self.momentum * mean)\n                unbiased = var * (M / (M - 1))\n                self.batch_norm.running_var.mul_(1 - self.momentum).add_(self.momentum * unbiased)\n                self.batch_norm.num_batches_tracked.add_(1)\n            use_mean, use_var = mean, var\n        else:\n            use_mean = self.batch_norm.running_mean\n            use_var = self.batch_norm.running_var\n\n        out = torch.empty_like(z)\n        BLOCK = 1024\n        grid = (triton.cdiv(M * N, BLOCK),)\n        apply_kernel[grid](z, out, use_mean, use_var, self.batch_norm.weight,\n                           self.batch_norm.bias, self.eps, M, N, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related matmul problem (L2_041 Gemm_BatchNorm_GELU_ReLU, 1.01x): adapt what applies"
  },
  {
   "id": "ker-071e045dd4",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef reduce_kernel(x_ptr, sum_ptr, sqsum_ptr, S, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = tl.arange(0, BLOCK)\n    base = pid * S\n    acc = tl.zeros((), dtype=tl.float32)\n    accsq = tl.zeros((), dtype=tl.float32)\n    for i in range(0, S, BLOCK):\n        idx = i + offs\n        m = idx < S\n        v = tl.load(x_ptr + base + idx, mask=m, other=0.0)\n        acc += tl.sum(v)\n        accsq += tl.sum(v * v)\n    tl.store(sum_ptr + pid, acc)\n    tl.store(sqsum_ptr + pid, accsq)\n\n\n@triton.jit\ndef pool_kernel(x_ptr, out_ptr, scale_ptr, shift_ptr,\n                N, C, D, H, W, OD, OH, OW, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = pid * BLOCK + tl.arange(0, BLOCK)\n    total = N * C * OD * OH * OW\n    mask = offs < total\n    o = offs.to(tl.int64)\n    ow = o % OW\n    t = o // OW\n    oh = t % OH\n    t = t // OH\n    od = t % OD\n    t = t // OD\n    c = t % C\n    n = t // C\n\n    sc = tl.load(scale_ptr + c, mask=mask, other=0.0)\n    sh = tl.load(shift_ptr + c, mask=mask, other=0.0)\n\n    HW = H * W\n    DHW = D * HW\n    base = (n * C + c) * DHW\n\n    acc = tl.zeros((BLOCK,), dtype=tl.float32)\n    for dd in tl.static_range(4):\n        for hh in tl.static_range(4):\n            for ww in tl.static_range(4):\n                id_ = od * 4 + dd\n                ih = oh * 4 + hh\n                iw = ow * 4 + ww\n                addr = base + id_ * HW + ih * W + iw\n                v = tl.load(x_ptr + addr, mask=mask, other=0.0)\n                acc += v\n    acc = acc * (1.0 / 64.0)\n    r = sc * acc + sh\n    tl.store(out_ptr + offs, r, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_channels, out_channels, kernel_size, stride, padding, bias_shape):\n        super().__init__()\n        self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding)\n        self.batch_norm = nn.BatchNorm3d(out_channels)\n\n    def forward(self, x):\n        c = self.conv_transpose(x)\n        N, C, D, H, W = c.shape\n        S = D * H * W\n        c2 = c.contiguous().view(N * C, S)\n\n        ssum = torch.empty(N * C, device=c.device, dtype=torch.float32)\n        ssq = torch.empty(N * C, device=c.device, dtype=torch.float32)\n        reduce_kernel[(N * C,)](c2, ssum, ssq, S, BLOCK=1024)\n\n        ssum_nc = ssum.view(N, C)\n        ssq_nc = ssq.view(N, C)\n        M = N * S\n        mean_c = ssum_nc.sum(0) / M\n        var_c = ssq_nc.sum(0) / M - mean_c * mean_c\n        scale_c = self.batch_norm.weight / torch.sqrt(var_c + self.batch_norm.eps)\n        shift_c = self.batch_norm.bias - scale_c * mean_c\n\n        OD = D // 4\n        OH = H // 4\n        OW = W // 4\n        out = torch.empty((N, C, OD, OH, OW), device=c.device, dtype=torch.float32)\n        total = N * C * OD * OH * OW\n        BLOCK = 256\n        grid = (triton.cdiv(total, BLOCK),)\n        cc = c.contiguous()\n        pool_kernel[grid](cc, out, scale_c.contiguous(), shift_c.contiguous(),\n                          N, C, D, H, W, OD, OH, OW, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related conv_transpose problem (L2_072 ConvTranspose3d_BatchNorm_AvgPool_AvgPool, 1.68x): adapt what applies"
  },
  {
   "id": "ker-49cd13f98a",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef ln_kernel(x_ptr, out_ptr, w_ptr, b_ptr, sw, W, eps, BLOCK: tl.constexpr):\n    pid = tl.program_id(0).to(tl.int64)\n    offs = tl.arange(0, BLOCK)\n    m = offs < W\n    base = pid * W\n    v = tl.load(x_ptr + base + offs, mask=m, other=0.0) + sw\n    mean = tl.sum(v, axis=0) / W\n    d = tl.where(m, v - mean, 0.0)\n    var = tl.sum(d * d, axis=0) / W\n    rstd = 1.0 / tl.sqrt(var + eps)\n    w = tl.load(w_ptr + offs, mask=m, other=0.0)\n    b = tl.load(b_ptr + offs, mask=m, other=0.0)\n    r = d * rstd * w + b\n    tl.store(out_ptr + base + offs, r, mask=m)\n\n\n@triton.jit\ndef pool_gelu_kernel(x_ptr, out_ptr, D, H, W, OD, OH, OW, total, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    idx = pid * BLOCK + tl.arange(0, BLOCK)\n    idx64 = idx.to(tl.int64)\n    mask = idx < total\n    ow = idx64 % OW\n    t = idx64 // OW\n    oh = t % OH\n    t = t // OH\n    od = t % OD\n    nc = t // OD\n\n    acc = tl.zeros((BLOCK,), tl.float32)\n    for dz in tl.static_range(2):\n        for dy in tl.static_range(2):\n            for dx in tl.static_range(2):\n                iz = od * 2 + dz\n                iy = oh * 2 + dy\n                ix = ow * 2 + dx\n                in_off = ((nc * D + iz) * H + iy) * W + ix\n                v = tl.load(x_ptr + in_off, mask=mask, other=0.0)\n                acc += v\n    acc = acc * 0.125\n    gelu = acc * 0.5 * (1.0 + tl.erf(acc * 0.70710678118654752440))\n    tl.store(out_ptr + idx64, gelu, mask=mask)\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, in_channels, out_channels, kernel_size, stride, padding, output_padding, sum_weight, norm_shape, pool_kernel_size):\n        super().__init__()\n        self.conv_transpose = nn.ConvTranspose3d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, output_padding=output_padding)\n        self.sum_weight = nn.Parameter(torch.tensor(sum_weight))\n        self.norm = nn.LayerNorm(norm_shape)\n        self.avg_pool = nn.AvgPool3d(kernel_size=pool_kernel_size)\n        self.gelu = nn.GELU()\n\n    def forward(self, x):\n        c = self.conv_transpose(x).contiguous()\n        N, C, D, H, W = c.shape\n        rows = N * C * D * H\n        c2 = c.view(rows, W)\n        normed = torch.empty_like(c2)\n        BLOCKW = triton.next_power_of_2(W)\n        w = self.norm.weight.contiguous()\n        b = self.norm.bias.contiguous()\n        ln_kernel[(rows,)](c2, normed, w, b, float(self.sum_weight.item()), W, self.norm.eps, BLOCK=BLOCKW)\n        normed = normed.view(N, C, D, H, W)\n\n        OD, OH, OW = D // 2, H // 2, W // 2\n        out = torch.empty((N, C, OD, OH, OW), device=c.device, dtype=c.dtype)\n        total = N * C * OD * OH * OW\n        BLOCK = 256\n        grid = (triton.cdiv(total, BLOCK),)\n        pool_gelu_kernel[grid](normed, out, D, H, W, OD, OH, OW, total, BLOCK=BLOCK)\n        return out\n```",
   "label": "### A verified kernel for a related conv_transpose problem (L2_003 ConvTranspose3d_Sum_LayerNorm_AvgPool_GELU, 1.26x): adapt what applies"
  },
  {
   "id": "pit-33cd992453",
   "kind": "pitfall",
   "text": "Pitfall: Before writing a kernel, check whether the eager baseline is already one fused vendor-library call (cuDNN RNN, cuBLAS). Decomposing it into many smaller launches is almost always slower, even when correct.",
   "label": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-c5e387d239",
   "kind": "pitfall",
   "text": "Pitfall: For recurrent ops, don't replace cuDNN with a Python per-timestep loop launching separate GEMM and gate kernels. Launch overhead dominates and yields big slowdowns, so keep cuDNN or fuse the entire time loop into one persistent kernel.",
   "label": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-72f6005e71",
   "kind": "pitfall",
   "text": "Pitfall: Gains must come from fusing or eliminating real work, such as skipping computations whose results are never returned. A trivial copy or pass-through kernel cannot beat eager.",
   "label": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-b924c52976",
   "kind": "pitfall",
   "text": "Pitfall: Don't call the cuDNN/PyTorch op and then append a token Triton copy kernel. The extra launch and allocation only make it slower than eager. Return library outputs directly, or replace real work with fused kernels.",
   "label": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-8b9dc1534f",
   "kind": "pitfall",
   "text": "Pitfall: Avoid one-program-per-output-element dot-product kernels (tl.sum per element) for matmuls; use tiled tl.dot or keep cuBLAS, since naive reductions lose to eager even at small sizes.",
   "label": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)"
  },
  {
   "id": "pit-fb58481a1f",
   "kind": "pitfall",
   "text": "Pitfall: Don't wrap the dominant op (e.g., cuDNN LSTM) in PyTorch and only replace a tiny trailing linear with a custom kernel. Launch overhead plus a naive dot-product kernel makes it slower; optimize the actual hot path.",
   "label": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)"
  },
  {
   "id": "rec-b5dde2147d",
   "kind": "recipe",
   "text": "[1.03x on VanillaRNN] Keep every GEMM in cuBLAS through torch (matmul/addmm, F.linear). Drop torch.cat in a concat-then-Linear cell: slice the weight into W_x and W_h column views, compute x@W_x.T, then accumulate h@W_h.T in place with addmm_. Fuse bias-add and tanh into a single Triton elementwise pass, one program per row, looping over columns in 1024-wide masked blocks. Accumulate in fp32 and use an exact tanh formula. Expect only small gains because the large GEMMs dominate runtime.",
   "label": "### Verified recipes for rnn problems (speedups measured by the protected evaluator)"
  },
  {
   "id": "ker-abc5cb7218",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\nbatch_size = 256\ninput_size = 16384\nhidden_size = 16384\noutput_size = 8192\n\n@triton.jit\ndef bias_tanh_kernel(x_ptr, b_ptr, out_ptr, n_rows, n_cols, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    row = pid\n    offs = tl.arange(0, BLOCK)\n    for c in range(0, n_cols, BLOCK):\n        idx = c + offs\n        mask = idx < n_cols\n        v = tl.load(x_ptr + row * n_cols + idx, mask=mask, other=0.0)\n        b = tl.load(b_ptr + idx, mask=mask, other=0.0)\n        r = v + b\n        r = (tl.exp(2.0 * r) - 1.0) / (tl.exp(2.0 * r) + 1.0)\n        tl.store(out_ptr + row * n_cols + idx, r, mask=mask)\n\n\ndef bias_tanh(x, b):\n    n_rows, n_cols = x.shape\n    out = torch.empty_like(x)\n    grid = (n_rows,)\n    bias_tanh_kernel[grid](x, b, out, n_rows, n_cols, BLOCK=1024)\n    return out\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, input_size: int, hidden_size: int, output_size: int):\n        super(ModelNew, self).__init__()\n        self.input_size = input_size\n        self.hidden_size = hidden_size\n        self.output_size = output_size\n        self.hidden = torch.randn((batch_size, hidden_size))\n\n        self.i2h = nn.Linear(input_size + hidden_size, hidden_size)\n        self.h2o = nn.Linear(hidden_size, output_size)\n        self.tanh = nn.Tanh()\n\n    def forward(self, x: torch.Tensor, initial_hidden=None) -> torch.Tensor:\n        if initial_hidden is not None:\n            self.hidden.copy_(initial_hidden)\n        self.hidden = self.hidden.to(x.device)\n\n        W = self.i2h.weight  # (hidden, input+hidden)\n        W_x = W[:, :self.input_size]\n        W_h = W[:, self.input_size:]\n\n        # pre-activation = x @ W_x.T + hidden @ W_h.T + bias\n        pre = x @ W_x.t()\n        pre = pre.addmm_(self.hidden, W_h.t())\n\n        new_hidden = bias_tanh(pre, self.i2h.bias)\n        self.hidden = new_hidden\n\n        output = self.h2o(new_hidden)\n        return output\n```",
   "label": "### A verified kernel for a related rnn problem (L3_033 VanillaRNN, 1.03x): adapt what applies"
  },
  {
   "id": "ker-dfc8d8394b",
   "kind": "kernel",
   "text": "```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport triton\nimport triton.language as tl\n\n\n@triton.jit\ndef bias_tanh_kernel(pre_ptr, b_ptr, out_ptr, n_rows, hidden_size, BLOCK: tl.constexpr):\n    pid = tl.program_id(0)\n    offs = tl.arange(0, BLOCK)\n    mask = offs < hidden_size\n    v = tl.load(pre_ptr + pid * hidden_size + offs, mask=mask, other=0.0)\n    b = tl.load(b_ptr + offs, mask=mask, other=0.0)\n    r = v + b\n    e = tl.exp(2.0 * r)\n    r = (e - 1.0) / (e + 1.0)\n    tl.store(out_ptr + pid * hidden_size + offs, r, mask=mask)\n\n\ndef bias_tanh(pre, b, out):\n    n_rows, hidden_size = pre.shape\n    BLOCK = triton.next_power_of_2(hidden_size)\n    bias_tanh_kernel[(n_rows,)](pre, b, out, n_rows, hidden_size, BLOCK=BLOCK)\n    return out\n\n\nclass ModelNew(nn.Module):\n    def __init__(self, input_size: int, hidden_size: int, output_size: int):\n        super(ModelNew, self).__init__()\n        self.input_size = input_size\n        self.hidden_size = hidden_size\n        self.output_size = output_size\n\n        self.i2h = nn.Linear(input_size + hidden_size, hidden_size)\n        self.h2o = nn.Linear(hidden_size, output_size)\n        self.tanh = nn.Tanh()\n\n    def forward(self, x: torch.Tensor, h0: torch.Tensor) -> torch.Tensor:\n        seq_len, batch_size, _ = x.size()\n        hidden = h0.to(x.device)\n\n        W = self.i2h.weight\n        W_x = W[:, :self.input_size]\n        W_h = W[:, self.input_size:]\n        b = self.i2h.bias\n\n        x2d = x.reshape(seq_len * batch_size, self.input_size)\n        pre_all = (x2d @ W_x.t()).reshape(seq_len, batch_size, self.hidden_size)\n\n        Wh_t = W_h.t().contiguous()\n\n        hiddens = torch.empty(seq_len, batch_size, self.hidden_size,\n                              device=x.device, dtype=x.dtype)\n\n        for t in range(seq_len):\n            pre = pre_all[t].addmm(hidden, Wh_t)\n            hidden = bias_tanh(pre, b, hiddens[t])\n\n        h2d = hiddens.reshape(seq_len * batch_size, self.hidden_size)\n        out = self.h2o(h2d).reshape(seq_len, batch_size, self.output_size)\n        return out\n```",
   "label": "### A verified kernel for a related rnn problem (L3_034 VanillaRNNHidden, 1.01x): adapt what applies"
  }
 ],
 "problems": {
  "L2_020": {
   "split": "dev",
   "ref_split": "learn",
   "family": "conv_transpose",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-69809d3cb6",
      "pit-0d52154172",
      "pit-4e0e42c44e",
      "pit-9be3ce52bf",
      "pit-65672ca4bf"
     ]
    },
    {
     "header": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-21ef38357b",
      "rec-a172f35135",
      "rec-001120b436",
      "rec-edeef3809c",
      "rec-7d67d21ded",
      "rec-e75be99f9e"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_078 ConvTranspose3d_Max_Max_Sum, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-865a0b6422"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_074 ConvTranspose3d_LeakyReLU_Multiply_LeakyReLU_Max, 1.26x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-735958c9f3"
     ]
    }
   ],
   "ctx_sha": "52a5fe04bf576804",
   "ctx_chars": 10756,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-69809d3cb6",
    "pit-0d52154172",
    "pit-4e0e42c44e",
    "pit-9be3ce52bf",
    "pit-65672ca4bf",
    "rec-21ef38357b",
    "rec-a172f35135",
    "rec-001120b436",
    "rec-edeef3809c",
    "rec-7d67d21ded",
    "rec-e75be99f9e",
    "ker-865a0b6422",
    "ker-735958c9f3"
   ]
  },
  "L2_037": {
   "split": "dev",
   "ref_split": "learn",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_062 Matmul_GroupNorm_LeakyReLU_Sum, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-1c044c9b6e"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_059 Matmul_Swish_Scaling, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-8f913b2bf6"
     ]
    }
   ],
   "ctx_sha": "b7d3b378c9e92c33",
   "ctx_chars": 9893,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-1c044c9b6e",
    "ker-8f913b2bf6"
   ]
  },
  "L2_040": {
   "split": "dev",
   "ref_split": "learn",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_059 Matmul_Swish_Scaling, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-8f913b2bf6"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_070 Gemm_Sigmoid_Scaling_ResidualAdd, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-6558b83d05"
     ]
    }
   ],
   "ctx_sha": "c705b15bb2c57b08",
   "ctx_chars": 8989,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-8f913b2bf6",
    "ker-6558b83d05"
   ]
  },
  "L2_058": {
   "split": "dev",
   "ref_split": "learn",
   "family": "conv_transpose",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-69809d3cb6",
      "pit-0d52154172",
      "pit-4e0e42c44e",
      "pit-9be3ce52bf",
      "pit-65672ca4bf"
     ]
    },
    {
     "header": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-21ef38357b",
      "rec-a172f35135",
      "rec-001120b436",
      "rec-edeef3809c",
      "rec-7d67d21ded",
      "rec-e75be99f9e"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_015 ConvTranspose3d_BatchNorm_Subtract, 1.32x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-d0dcdcbae6"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_089 ConvTranspose3d_MaxPool_Softmax_Subtract_Swish_Max, 1.06x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-b30336142d"
     ]
    }
   ],
   "ctx_sha": "d0a999376e3d430c",
   "ctx_chars": 11393,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-69809d3cb6",
    "pit-0d52154172",
    "pit-4e0e42c44e",
    "pit-9be3ce52bf",
    "pit-65672ca4bf",
    "rec-21ef38357b",
    "rec-a172f35135",
    "rec-001120b436",
    "rec-edeef3809c",
    "rec-7d67d21ded",
    "rec-e75be99f9e",
    "ker-d0dcdcbae6",
    "ker-b30336142d"
   ]
  },
  "L2_081": {
   "split": "dev",
   "ref_split": "learn",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_097 Matmul_BatchNorm_BiasAdd_Divide_Swish, 1.02x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-0609afeaca"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_076 Gemm_Add_ReLU, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-4a82a14d5e"
     ]
    }
   ],
   "ctx_sha": "baed172422eeb8d7",
   "ctx_chars": 10901,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-0609afeaca",
    "ker-4a82a14d5e"
   ]
  },
  "L2_088": {
   "split": "dev",
   "ref_split": "learn",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_012 Gemm_Multiply_LeakyReLU, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-d63a2a3ef9"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_094 Gemm_BiasAdd_Hardtanh_Mish_GroupNorm, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-f1f0450765"
     ]
    }
   ],
   "ctx_sha": "346e890b9cb8e685",
   "ctx_chars": 10191,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-d63a2a3ef9",
    "ker-f1f0450765"
   ]
  },
  "L3_008": {
   "split": "dev",
   "ref_split": "learn",
   "family": "network",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-263235db52",
      "pit-06df4b1c90",
      "pit-720c125700",
      "pit-3a07b0abdd"
     ]
    },
    {
     "header": "### Verified recipes for network problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-04ea4c7983"
     ]
    },
    {
     "header": "### A verified kernel for a related network problem (L3_027 RegNet, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-5a91e892c6"
     ]
    }
   ],
   "ctx_sha": "1aa698d3a9589f25",
   "ctx_chars": 6513,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-263235db52",
    "pit-06df4b1c90",
    "pit-720c125700",
    "pit-3a07b0abdd",
    "rec-04ea4c7983",
    "ker-5a91e892c6"
   ]
  },
  "L3_044": {
   "split": "dev",
   "ref_split": "learn",
   "family": "attention",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier attention problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-d5872964f6",
      "pit-8435e9ebfe"
     ]
    }
   ],
   "ctx_sha": "5c5e8811718de973",
   "ctx_chars": 2425,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-d5872964f6",
    "pit-8435e9ebfe"
   ]
  },
  "L3_048": {
   "split": "dev",
   "ref_split": "learn",
   "family": "attention",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier attention problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-d5872964f6",
      "pit-8435e9ebfe"
     ]
    }
   ],
   "ctx_sha": "5c5e8811718de973",
   "ctx_chars": 2425,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-d5872964f6",
    "pit-8435e9ebfe"
   ]
  },
  "L3_050": {
   "split": "dev",
   "ref_split": "learn",
   "family": "attention",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier attention problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-d5872964f6",
      "pit-8435e9ebfe"
     ]
    }
   ],
   "ctx_sha": "5c5e8811718de973",
   "ctx_chars": 2425,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-d5872964f6",
    "pit-8435e9ebfe"
   ]
  },
  "L2_014": {
   "split": "probe",
   "ref_split": "probe",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_070 Gemm_Sigmoid_Scaling_ResidualAdd, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-6558b83d05"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_053 Gemm_Scaling_Hardtanh_GELU, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-370fab9980"
     ]
    }
   ],
   "ctx_sha": "9ac79c33be050f60",
   "ctx_chars": 9192,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-6558b83d05",
    "ker-370fab9980"
   ]
  },
  "L2_022": {
   "split": "probe",
   "ref_split": "probe",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_029 Matmul_Mish_Mish, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-ae3c5733ff"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_051 Gemm_Subtract_GlobalAvgPool_LogSumExp_GELU_ResidualAdd, 36.02x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-38bc1e9f51"
     ]
    }
   ],
   "ctx_sha": "fcb53f6a93403e98",
   "ctx_chars": 9546,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-ae3c5733ff",
    "ker-38bc1e9f51"
   ]
  },
  "L2_030": {
   "split": "probe",
   "ref_split": "probe",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_094 Gemm_BiasAdd_Hardtanh_Mish_GroupNorm, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-f1f0450765"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_053 Gemm_Scaling_Hardtanh_GELU, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-370fab9980"
     ]
    }
   ],
   "ctx_sha": "a70e73b80ca58faf",
   "ctx_chars": 10373,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-f1f0450765",
    "ker-370fab9980"
   ]
  },
  "L2_033": {
   "split": "probe",
   "ref_split": "probe",
   "family": "matmul",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier matmul problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-6ea0c69e03",
      "pit-474c4e4cdf",
      "pit-b4c54d1d46",
      "pit-83f095e15c",
      "pit-25393eeb09",
      "pit-8b7c11b862"
     ]
    },
    {
     "header": "### Verified recipes for matmul problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-97181ed7d3",
      "rec-8bd287f31a",
      "rec-d2c54a1922",
      "rec-8274c30657",
      "rec-4365468e5f",
      "rec-63e1a542cd"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_041 Gemm_BatchNorm_GELU_ReLU, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-f5807f0030"
     ]
    },
    {
     "header": "### A verified kernel for a related matmul problem (L2_076 Gemm_Add_ReLU, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-4a82a14d5e"
     ]
    }
   ],
   "ctx_sha": "20b7935cf56f91ca",
   "ctx_chars": 10823,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-6ea0c69e03",
    "pit-474c4e4cdf",
    "pit-b4c54d1d46",
    "pit-83f095e15c",
    "pit-25393eeb09",
    "pit-8b7c11b862",
    "rec-97181ed7d3",
    "rec-8bd287f31a",
    "rec-d2c54a1922",
    "rec-8274c30657",
    "rec-4365468e5f",
    "rec-63e1a542cd",
    "ker-f5807f0030",
    "ker-4a82a14d5e"
   ]
  },
  "L2_050": {
   "split": "probe",
   "ref_split": "probe",
   "family": "conv_transpose",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-69809d3cb6",
      "pit-0d52154172",
      "pit-4e0e42c44e",
      "pit-9be3ce52bf",
      "pit-65672ca4bf"
     ]
    },
    {
     "header": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-21ef38357b",
      "rec-a172f35135",
      "rec-001120b436",
      "rec-edeef3809c",
      "rec-7d67d21ded",
      "rec-e75be99f9e"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_072 ConvTranspose3d_BatchNorm_AvgPool_AvgPool, 1.68x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-071e045dd4"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_003 ConvTranspose3d_Sum_LayerNorm_AvgPool_GELU, 1.26x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-49cd13f98a"
     ]
    }
   ],
   "ctx_sha": "c0dcc8ddc9a91092",
   "ctx_chars": 12888,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-69809d3cb6",
    "pit-0d52154172",
    "pit-4e0e42c44e",
    "pit-9be3ce52bf",
    "pit-65672ca4bf",
    "rec-21ef38357b",
    "rec-a172f35135",
    "rec-001120b436",
    "rec-edeef3809c",
    "rec-7d67d21ded",
    "rec-e75be99f9e",
    "ker-071e045dd4",
    "ker-49cd13f98a"
   ]
  },
  "L2_061": {
   "split": "probe",
   "ref_split": "probe",
   "family": "conv_transpose",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier conv_transpose problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-69809d3cb6",
      "pit-0d52154172",
      "pit-4e0e42c44e",
      "pit-9be3ce52bf",
      "pit-65672ca4bf"
     ]
    },
    {
     "header": "### Verified recipes for conv_transpose problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-21ef38357b",
      "rec-a172f35135",
      "rec-001120b436",
      "rec-edeef3809c",
      "rec-7d67d21ded",
      "rec-e75be99f9e"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_072 ConvTranspose3d_BatchNorm_AvgPool_AvgPool, 1.68x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-071e045dd4"
     ]
    },
    {
     "header": "### A verified kernel for a related conv_transpose problem (L2_015 ConvTranspose3d_BatchNorm_Subtract, 1.32x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-d0dcdcbae6"
     ]
    }
   ],
   "ctx_sha": "5533cb2a86547de2",
   "ctx_chars": 12352,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-69809d3cb6",
    "pit-0d52154172",
    "pit-4e0e42c44e",
    "pit-9be3ce52bf",
    "pit-65672ca4bf",
    "rec-21ef38357b",
    "rec-a172f35135",
    "rec-001120b436",
    "rec-edeef3809c",
    "rec-7d67d21ded",
    "rec-e75be99f9e",
    "ker-071e045dd4",
    "ker-d0dcdcbae6"
   ]
  },
  "L3_010": {
   "split": "probe",
   "ref_split": "probe",
   "family": "network",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-263235db52",
      "pit-06df4b1c90",
      "pit-720c125700",
      "pit-3a07b0abdd"
     ]
    },
    {
     "header": "### Verified recipes for network problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-04ea4c7983"
     ]
    },
    {
     "header": "### A verified kernel for a related network problem (L3_027 RegNet, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-5a91e892c6"
     ]
    }
   ],
   "ctx_sha": "1aa698d3a9589f25",
   "ctx_chars": 6513,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-263235db52",
    "pit-06df4b1c90",
    "pit-720c125700",
    "pit-3a07b0abdd",
    "rec-04ea4c7983",
    "ker-5a91e892c6"
   ]
  },
  "L3_023": {
   "split": "probe",
   "ref_split": "probe",
   "family": "network",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier network problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-263235db52",
      "pit-06df4b1c90",
      "pit-720c125700",
      "pit-3a07b0abdd"
     ]
    },
    {
     "header": "### Verified recipes for network problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-04ea4c7983"
     ]
    },
    {
     "header": "### A verified kernel for a related network problem (L3_027 RegNet, 1.00x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-5a91e892c6"
     ]
    }
   ],
   "ctx_sha": "1aa698d3a9589f25",
   "ctx_chars": 6513,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-263235db52",
    "pit-06df4b1c90",
    "pit-720c125700",
    "pit-3a07b0abdd",
    "rec-04ea4c7983",
    "ker-5a91e892c6"
   ]
  },
  "L3_032": {
   "split": "probe",
   "ref_split": "probe",
   "family": "attention",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier attention problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-d5872964f6",
      "pit-8435e9ebfe"
     ]
    }
   ],
   "ctx_sha": "5c5e8811718de973",
   "ctx_chars": 2425,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-d5872964f6",
    "pit-8435e9ebfe"
   ]
  },
  "L3_040": {
   "split": "probe",
   "ref_split": "probe",
   "family": "rnn",
   "preamble": "## Kernel memory (items verified by the protected evaluator on training problems; may not all apply)",
   "layout": [
    {
     "header": "### Lessons about this environment (from official checker verdicts and verified outcomes)",
     "kind": "lesson",
     "ids": [
      "les-15e9e8569f",
      "les-93e64733c9",
      "les-4cfeee51c1",
      "les-e79cba77da",
      "les-1a767e9b1b",
      "les-0aec41e64f",
      "les-11e399176f",
      "les-d10f50ba0c",
      "les-d9b41ee5fa",
      "les-49a7dd4aa1",
      "les-6405d23c44",
      "les-24bf5ba8a9",
      "les-6c7acdf532",
      "les-5c37cab285"
     ]
    },
    {
     "header": "### Pitfalls seen on earlier rnn problems (wrong results or slower than eager)",
     "kind": "pitfall",
     "ids": [
      "pit-33cd992453",
      "pit-c5e387d239",
      "pit-72f6005e71",
      "pit-b924c52976",
      "pit-8b9dc1534f",
      "pit-fb58481a1f"
     ]
    },
    {
     "header": "### Verified recipes for rnn problems (speedups measured by the protected evaluator)",
     "kind": "recipe",
     "ids": [
      "rec-b5dde2147d"
     ]
    },
    {
     "header": "### A verified kernel for a related rnn problem (L3_033 VanillaRNN, 1.03x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-abc5cb7218"
     ]
    },
    {
     "header": "### A verified kernel for a related rnn problem (L3_034 VanillaRNNHidden, 1.01x): adapt what applies",
     "kind": "kernel",
     "ids": [
      "ker-dfc8d8394b"
     ]
    }
   ],
   "ctx_sha": "71fd1a97cbd02e3b",
   "ctx_chars": 8224,
   "candidates": [
    "prior",
    "les-15e9e8569f",
    "les-93e64733c9",
    "les-4cfeee51c1",
    "les-e79cba77da",
    "les-1a767e9b1b",
    "les-0aec41e64f",
    "les-11e399176f",
    "les-d10f50ba0c",
    "les-d9b41ee5fa",
    "les-49a7dd4aa1",
    "les-6405d23c44",
    "les-24bf5ba8a9",
    "les-6c7acdf532",
    "les-5c37cab285",
    "pit-33cd992453",
    "pit-c5e387d239",
    "pit-72f6005e71",
    "pit-b924c52976",
    "pit-8b9dc1534f",
    "pit-fb58481a1f",
    "rec-b5dde2147d",
    "ker-abc5cb7218",
    "ker-dfc8d8394b"
   ]
  }
 }
}