Skip to content

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

Merged
vllm-bot merged 1 commit intovllm-project:mainfrom
FloatingVertex:main
Feb 13, 2026
Merged

[Bugfix] Replace c10::optional with std::optional in topk kernel#34467
vllm-bot merged 1 commit intovllm-project:mainfrom
FloatingVertex:main

Conversation

@FloatingVertex
Copy link
Contributor

@FloatingVertex FloatingVertex commented Feb 12, 2026

Purpose

Replaced the usage of c10::optional with std::optional as c10::optional is deprecated.

The project has migrated away from it in prior PRs (#11730, #17819, #25602) and header for this function is already using std::optional.

Test Plan

CI


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify mergify bot added the bug Something isn't working label Feb 12, 2026
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

Copy link
Collaborator

@yeqcharlotte yeqcharlotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you fix DCO?

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the deprecated c10::optional with std::optional in the large_context_topk kernel function. The change is correct and aligns with the ongoing effort to migrate away from deprecated c10 utilities. The updated function signature is consistent with its usage and the function it calls (get_params), which already uses std::optional. This is a good code health improvement.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 13, 2026 05:05
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 13, 2026
Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
auto-merge was automatically disabled February 13, 2026 09:54

Head branch was pushed to by a user without write access

@vllm-bot vllm-bot merged commit bcd65c1 into vllm-project:main Feb 13, 2026
109 of 112 checks passed
athrael-soju pushed a commit to athrael-soju/vllm that referenced this pull request Feb 14, 2026
…m-project#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
Signed-off-by: Athrael Soju <athrael.soju@gmail.com>
wzhao18 pushed a commit to wzhao18/vllm that referenced this pull request Feb 18, 2026
…m-project#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
eldarkurtic pushed a commit to eldarkurtic/vllm that referenced this pull request Feb 19, 2026
…m-project#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
Signed-off-by: Eldar Kurtic <research@neuralmagic.com>
ZJY0516 pushed a commit to ZJY0516/vllm that referenced this pull request Feb 23, 2026
…m-project#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
llsj14 pushed a commit to llsj14/vllm that referenced this pull request Mar 1, 2026
…m-project#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
tunglinwood pushed a commit to tunglinwood/vllm that referenced this pull request Mar 4, 2026
…m-project#34467)

Signed-off-by: Pushpinder Singh <pushpindersingh135@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants