Skip to content

[Excutor] Change cudagraph hashkey from batch size to num_tokens #3454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2025

Conversation

littledgg
Copy link
Contributor

@littledgg littledgg commented Aug 18, 2025

实际上原本的逻辑就是根据实际这一轮的num_tokens数ids_remove_padding.shape[0]去作为hashkey,这里只是更改相关变量与注释的名字,不显式使用含有batch size的变量,为后续mtp和prefill进入cudagraph做准备。

Copy link

paddle-bot bot commented Aug 18, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 18, 2025

# Concrete batch size
# Concrete shape
runtime_bs: int
Copy link
Collaborator

@gongshaotian gongshaotian Aug 18, 2025

Choose a reason for hiding this comment

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

runtime_bs -> captured_size 下一个PR改吧

Copy link
Collaborator

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

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

LGTM

@gongshaotian gongshaotian merged commit 70ee910 into PaddlePaddle:develop Aug 18, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants