[Bugfix] Replace c10::optional with std::optional in topk kernel (#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
This commit is contained in:
Pushpinder Singh
2026-02-13 08:30:23 -08:00
committed by GitHub
parent 59d53066d8
commit bcd65c1f6a

View File

@@ -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<torch::Tensor> row_starts = c10::nullopt) {
std::optional<torch::Tensor> 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");