From bcd65c1f6a25ab76be325fbc0766eb074519a4fc Mon Sep 17 00:00:00 2001 From: Pushpinder Singh <35847523+FloatingVertex@users.noreply.github.com> Date: Fri, 13 Feb 2026 08:30:23 -0800 Subject: [PATCH] [Bugfix] Replace c10::optional with std::optional in topk kernel (#34467) Signed-off-by: Pushpinder Singh --- csrc/topk.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csrc/topk.cu b/csrc/topk.cu index e2702b2d07..a7850f5363 100644 --- a/csrc/topk.cu +++ b/csrc/topk.cu @@ -349,7 +349,7 @@ void setup_kernel_smem_once() { void large_context_topk( const torch::Tensor& logits, torch::Tensor& indices, const torch::Tensor& seq_lens, - c10::optional row_starts = c10::nullopt) { + std::optional row_starts = std::nullopt) { TORCH_CHECK(logits.is_cuda(), "logits must be a CUDA tensor"); TORCH_CHECK(indices.is_cuda(), "indices must be a CUDA tensor"); TORCH_CHECK(seq_lens.is_cuda(), "seq_lens must be a CUDA tensor");