-
Notifications
You must be signed in to change notification settings - Fork 6
Imarkov/conditional compilation ranges #127
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
Imarkov/conditional compilation ranges #127
Conversation
ProExpertProg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few initial thoughts. Could we also use a dataclass instead of a tuple for a compiled range? We can add utility methods (like is_single_size), names to the elements, and docs to make the code clearer.
Also, currently if there is more than one range above the cudagraphs capture size, I think we don't ever trigger it in the GPU model runner as the compilation only happens as the compiled model is invoked with the shape (with _dummy_run) - we should make sure to dummy run for each compile range.
I also think we should try to give hints to Inductor about the range, can be done as a follow-up.
vllm/compilation/backends.py
Outdated
| elapsed = now - compilation_start_time | ||
| compilation_config.compilation_time += elapsed | ||
| if runtime_shape is None: | ||
| if compile_range is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lost the compilation time update
| if compile_range is None: | |
| compilation_config.compilation_time += elapsed | |
| if compile_range is None: |
| """Sizes to compile for inductor. In addition | ||
| to integers, it also supports "cudagraph_capture_sizes" to | ||
| specify the sizes for cudagraph capture.""" | ||
| compile_ranges_split_points: list[int] | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment implies ranges are done inclusive-exclusive but in the code you use inclusive-inclusive. Can we standardize on inclusive-exclusive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do inclusive-exclusive in the code in piecewise_backend.py.
self.is_in_range = (
lambda x, range: range[0] <= x < range[1]
if range[0] < range[1]
else x == range[0]
)
| state = { | ||
| "ranges": self.ranges, | ||
| } | ||
| return InductorPass.hash_dict(state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the current range to cache key and check the number of times the manager gets called (to make sure the bug you found doesn't manifest)
…on (vllm-project#28394) Signed-off-by: Ido Segev <[email protected]>
Signed-off-by: mgoin <[email protected]>
…ject#24794) Signed-off-by: Matthew Bonanni <[email protected]> Signed-off-by: Matthew Bonanni <[email protected]> Co-authored-by: Luka Govedič <[email protected]>
Signed-off-by: chaojun-zhang <[email protected]>
…llm-project#28399) Signed-off-by: DarkLight1337 <[email protected]>
…28386) Signed-off-by: Ido Segev <[email protected]>
Signed-off-by: Maryam Tahhan <[email protected]>
Signed-off-by: Jan van Lunteren <[email protected]>
Signed-off-by: Mark McLoughlin <[email protected]>
…ect#28444) Signed-off-by: Lin, Fanli <[email protected]>
Signed-off-by: Bradley <[email protected]> Co-authored-by: Harry Mellor <[email protected]>
Signed-off-by: the-codeboy <[email protected]>
…del (vllm-project#27165) Signed-off-by: zhuhaoran <[email protected]>
…tized model (vllm-project#24239) Signed-off-by: xuebwang-amd <[email protected]> Co-authored-by: fxmarty-amd <[email protected]> Co-authored-by: Cyrus Leung <[email protected]>
…ect#27334) Signed-off-by: xuebwang-amd <[email protected]>
…ormers to SDPA (vllm-project#28424) Signed-off-by: zhewenli <[email protected]> Signed-off-by: Roger Wang <[email protected]> Co-authored-by: Roger Wang <[email protected]>
Signed-off-by: Matthew Bonanni <[email protected]>
Signed-off-by: Xin Yang <[email protected]>
Signed-off-by: Lin, Fanli <[email protected]>
…ject#26971) Signed-off-by: Lukas Geiger <[email protected]>
vllm-project#28245) Signed-off-by: Jialin Ouyang <[email protected]>
…ct#28203) Signed-off-by: gcanlin <[email protected]>
Signed-off-by: Livinfly <[email protected]>
Signed-off-by: Jee Jee Li <[email protected]>
Signed-off-by: Kyuyeun Kim <[email protected]>
Signed-off-by: wangxiyuan <[email protected]>
…#28315) Signed-off-by: Lucas Wilkinson <[email protected]>
…ultimodal models (vllm-project#28858) Signed-off-by: Roger Wang <[email protected]>
Signed-off-by: tiehexue <[email protected]>
) Signed-off-by: zhewenli <[email protected]>
…4799) Signed-off-by: Ronald1995 <[email protected]> Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Benjamin Chislett <[email protected]> Co-authored-by: Nick Hill <[email protected]> Co-authored-by: Benjamin Chislett <[email protected]>
…lm-project#28768) Signed-off-by: Nick Hill <[email protected]>
… model in Eagle (vllm-project#28435) Signed-off-by: Shreyas Kulkarni <[email protected]>
Signed-off-by: yewentao256 <[email protected]>
Signed-off-by: Maziyar Panahi <[email protected]> Signed-off-by: Pranav <[email protected]> Co-authored-by: Maziyar Panahi <[email protected]>
…her mode and dp >1 (vllm-project#28774)
Signed-off-by: Zhuohan Li <[email protected]>
…m-project#28831) Signed-off-by: Thomas Mao <[email protected]> Signed-off-by: bbartels <[email protected]> Co-authored-by: Thomas Mao <[email protected]> Co-authored-by: Chauncey <[email protected]>
Signed-off-by: Michael Goin <[email protected]> Signed-off-by: mgoin <[email protected]>
… like gpt-oss (vllm-project#28638) Signed-off-by: xuebwang-amd <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: yewentao256 <[email protected]>
…llm-project#28872) Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: Didier Durand <[email protected]>
…ct#28897) Signed-off-by: Andy Xie <[email protected]>
) Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Kuntai Du <[email protected]>
…#28908) Signed-off-by: Isotr0py <[email protected]>
) Signed-off-by: Nick Hill <[email protected]> Co-authored-by: Cyrus Leung <[email protected]>
…llm-project#28846) Signed-off-by: jesse <[email protected]> Signed-off-by: Song Zhixin <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: gcanlin <[email protected]>
…llm-project#28925) Signed-off-by: NickLucche <[email protected]> Co-authored-by: Cyrus Leung <[email protected]>
Signed-off-by: Alex Yun <[email protected]>
…#28937) Signed-off-by: Ido Segev <[email protected]>
Signed-off-by: Luciano Martins <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: Luciano Martins <[email protected]> Co-authored-by: Isotr0py <[email protected]>
Signed-off-by: ilmarkov <[email protected]>
Purpose
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.