KernelBench hard deprecated · RTX PRO 6000
Paged Attention Nemotron 3 Ultra
wrongdid not score
Diagnostic, not a kernel result. Active session (354 assistant turns) that authored kernel code, but graded solution.py is 0 bytes — agentic file-delivery failure on the opencode/OpenRouter route. No reward hacks.
Kernel source (redacted)
[['bf16'], ['RTX_PRO_6000', 'H100', 'B200'], ['K | V] so a single gather pulls both.\n Stored as bf16.\n block_table: (batch, max_blocks) int32\n seq_lens: (batch,) int32\n\n Output:\n attn_out: (batch, num_heads, head_dim) bf16\n "', '\\\\n\n def __init__(\n self,\n batch: int,\n num_heads: int,\n num_kv_heads: int,\n head_dim: int,\n seq_len: int,\n page_size: int,\n ):\n super().__init__()\n assert num_heads % num_kv_heads == 0, "num_heads must be a multiple of num_kv_heads (GQA)"\n self.batch = batch\n self.num_heads = num_heads\n self.num_kv_heads = num_kv_heads\n self.head_dim = head_dim\n self.seq_len = seq_len\n self.page_size = page_size\n self.group_size = num_heads // num_kv_heads\n self.scale = 1.0 / math.sqrt(head_dim)\n\n self.register_buffer("_dummy', 'torch.zeros(1, dtype=torch.bfloat16), persistent=False)\n\n def forward(\n self,\n query: torch.Tensor,\n kv_cache: torch.Tensor,\n block_table: torch.Tensor,\n seq_lens: torch.Tensor,\n ) -> torch.Tensor:\n B, H, D = query.shape\n Hkv = self.num_kv_heads\n G = self.group_size\n P = self.page_size\n\n out = torch.empty(B, H, D, dtype=query.dtype, device=query.device)\n\n for b in range(B):\n L = int(seq_lens[b].item())\n num_pages = (L + P - 1) // P\n pages = block_table[b, :num_pages].long()\n kv = kv_cache.index_select(0, pages)\n kv = kv.reshape(num_pages * P, Hkv, 2 * D)\n kv = kv[:L]\n k = kv[..., :D]\n v = kv[..., D:]\n\n k = k.repeat_interleave(G, dim=1)\n v = v.repeat_interleave(G, dim=1)\n\n q = query[b]\n qf = q.float()\n kf = k.float()\n vf = v.float()\n scores = torch.einsum(', 'hd,lhd->hl', 'qf, kf) * self.scale\n probs = torch.softmax(scores, dim=-1)\n o = torch.einsum(', 'hl,lhd->hd', 'probs, vf)\n out[b] = o.to(query.dtype)\n\n return out\n\n\ndef get_inputs():\n "', 'Build random paged inputs for the current module-level shape knobs."', '\\\\n from reference import BATCH, NUM_HEADS, NUM_KV_HEADS, HEAD_DIM, SEQ_LEN, PAGE_SIZE\n\n B = BATCH\n H = NUM_HEADS\n Hkv = NUM_KV_HEADS\n D = HEAD_DIM\n L = SEQ_LEN\n P = PAGE_SIZE\n\n pages_per_seq = (L + P - 1) // P\n total_pages = max(B * pages_per_seq + 8, 64)\n\n query = torch.randn(B, H, D, dtype=torch.bfloat16) * 0.1\n kv_cache = torch.randn(total_pages, P, Hkv, 2 * D, dtype=torch.bfloat16) * 0.1\n\n perm = torch.randperm(total_pages)[: B * pages_per_seq].reshape(B, pages_per_seq).int()\n block_table = perm.contiguous()\n seq_lens = torch.full((B,), L, dtype=torch.int32)\n\n return [query, kv_cache, block_table, seq_lens]\n\n\ndef get_init_inputs():\n from reference import BATCH, NUM_HEADS, NUM_KV_HEADS, HEAD_DIM, SEQ_LEN, PAGE_SIZE\n return [BATCH, NUM_HEADS, NUM_KV_HEADS, HEAD_DIM, SEQ_LEN, PAGE_SIZE]']]20260610_232415_opencode-nemotron_nvidia_nemotron-3-ultra-550b-a55b_03_paged_attention