TensorRT-LLMs/tensorrt_llm/_torch/custom_ops
Yukun He cd80e0a7f1
[None][fix] Make tile_tokens_dim calculation just in time before kernel launching. (#7529)
tile_tokens_dim directly depends on the num_token, which is a dynamic shape during tuning and inference. When AutoTuner prepares dummy tensors with different num_tokens, it does not update the value of tile_tokens_dim automatically. Therefore, the value stored in the AutoTuner cache is misaligned, which will introduce a lot of cache misses during inference, which hurts perf a lot.

To avoid this issue, we move the calculation of tile_tokens_dim right before kernel launching, so that the value of tile_tokens_dim is always up to date with the num_tokens of the current input tensor used for the kernel runner.

Also, the tile_tokens_dim is calculated based on the number of tokens of a tuned bucket, instead of the original token number. Because we only tune the value for the buckets, not for the raw input token number, to avoid unexpected misalignment between tile_tokens_dim and the token number.

This PR also removes the warmup requests with the extra input shapes, which are triggered in the CUDA graph warmup phase.

Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com>
2025-09-18 10:58:52 +08:00
..
__init__.py [None][ci] move unittests to sub-directories (#6635) 2025-08-20 05:42:22 -04:00
cpp_custom_ops.py [TRTLLM-7027][feat] Fuse d2t to logitsBitmaskKernel and fix a race condition in one-model spec (#7481) 2025-09-04 23:30:14 +08:00
flashinfer_custom_ops.py [None][ci] move unittests to sub-directories (#6635) 2025-08-20 05:42:22 -04:00
torch_custom_ops.py [TRTLLM-6898][feat] Add Cute DSL nvfp4 linear op (#7632) 2025-09-16 14:25:26 +08:00
trtllm_gen_custom_ops.py [None][fix] Make tile_tokens_dim calculation just in time before kernel launching. (#7529) 2025-09-18 10:58:52 +08:00
userbuffers_custom_ops.py feat: Introduce UB allocator for pytorch flow (#3257) 2025-04-08 18:39:49 +08:00