---
id: pr-tensorrt-llm-13811
repo: NVIDIA/TensorRT-LLM
pr: 13811
title: '[None][feat] Indexer topk opt'
author: pcastonguay
date: '2026-05-08'
url: https://github.com/NVIDIA/TensorRT-LLM/pull/13811
source_category: upstream-code
architectures:
- sm100
tags:
- benchmark kernel
- benchmark_test
- cuda kernel
- cute dsl
- moe_routing
techniques: []
hardware_features: []
kernel_types:
- moe
languages:
- cuda-cpp
- cute-dsl
captured_at: '2026-05-16'
status: merged
merge_sha: 8c4cb11cb3766ada79321f4b38fdbbbff73a8970
inclusion_reason: Separate routing, permutation, top-k, and expert GEMM costs; keep tail-token and expert-layout tests attached to the idea.
changed_paths:
- cpp/tensorrt_llm/kernels/IndexerTopK.h
- cpp/tensorrt_llm/kernels/indexerTopK.cu
- cpp/tensorrt_llm/thop/IndexerTopKOp.cpp
- tests/unittest/_torch/thop/parallel/test_indexer_topk.py
artifact_dir: evidence/pull-bundles/tensorrt-llm/gh-13811
head_ref_oid: 3f896a64b0db929e3e153a793bcf3488f601b8e7
---
# [None][feat] Indexer topk opt

- Repository: `NVIDIA/TensorRT-LLM`
- PR: [13811](https://github.com/NVIDIA/TensorRT-LLM/pull/13811)
- Decision: `Separate routing, permutation, top-k, and expert GEMM costs; keep tail-token and expert-layout tests attached to the idea.`
- Reason: Separate routing, permutation, top-k, and expert GEMM costs; keep tail-token and expert-layout tests attached to the idea.

## Changed Paths

- `cpp/tensorrt_llm/kernels/IndexerTopK.h`
- `cpp/tensorrt_llm/kernels/indexerTopK.cu`
- `cpp/tensorrt_llm/thop/IndexerTopKOp.cpp`
- `tests/unittest/_torch/thop/parallel/test_indexer_topk.py`

## Evidence Bundle

`evidence/pull-bundles/tensorrt-llm/gh-13811`
