Skip to content

Conversation

@ZJY0516
Copy link
Contributor

@ZJY0516 ZJY0516 commented Sep 15, 2025

Purpose

Add a separate test for noop_elimination.

Test Plan

pytest tests/compile/test_noop_elimination.py

Test Result


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.

Signed-off-by: zjy0516 <[email protected]>
@mergify mergify bot added the ci/build label Sep 15, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 15, 2025

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 15, 2025

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

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 adds a new test for the NoOpEliminationPass, which is a great addition to improve test coverage. The test correctly verifies the elimination of no-op reshapes and slices. I've identified an opportunity to further improve the test coverage by adding a case for slice_scatter elimination, which is also handled by this pass. My feedback includes a suggestion for a new test function to cover this scenario.

Signed-off-by: zjy0516 <[email protected]>
@pytorch-bot pytorch-bot bot removed the ci/build label Sep 15, 2025
@mergify mergify bot added the ci/build label Sep 15, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 15, 2025

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

@ZJY0516
Copy link
Contributor Author

ZJY0516 commented Sep 15, 2025

@ProExpertProg PTAL

Copy link
Collaborator

@ProExpertProg ProExpertProg left a comment

Choose a reason for hiding this comment

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

Thanks for writing this test! While you're at it, could you fix the bug with eliminating noop slices?

The issue is that we use the dims_equivalent function for bth reshapes and slices, and while -1 means "infer" for reshapes, it actually means len-1 for slices, so currently we might incorrectly eliminate .slice(x, 0, -1). The easiest way to fix it would be to just directly look at input and output shapes of the meta tensors (originally I avoided that because I didn't want to rely on meta shapes too much but if we rely on one we can also rely on the other).

@ZJY0516
Copy link
Contributor Author

ZJY0516 commented Sep 15, 2025

@ProExpertProg I am glad to help. Should I fix it based on this PR or make a new one? Where can I find related issue about this?

@ProExpertProg
Copy link
Collaborator

@ZJY0516 I don't remember where the issue was and I couldn't find it, sorry!

But basically, this slice will get (incorrectly) eliminated:

x = torch.empty(16, 16)
x2 = x[0:-1,...]

Signed-off-by: zjy0516 <[email protected]>
@pytorch-bot pytorch-bot bot removed the ci/build label Sep 15, 2025
@mergify mergify bot added the ci/build label Sep 15, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 15, 2025

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

@ZJY0516 ZJY0516 changed the title [Test] Add test for noop_elimination [Compile] Fix noop_elimination pass and add tests for noop_elimination Sep 15, 2025
@ZJY0516
Copy link
Contributor Author

ZJY0516 commented Sep 15, 2025

@ProExpertProg I think I have fixed it. PTAL

Signed-off-by: zjy0516 <[email protected]>
@ProExpertProg ProExpertProg enabled auto-merge (squash) September 15, 2025 21:47
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 15, 2025
@ProExpertProg ProExpertProg merged commit 5bcc153 into vllm-project:main Sep 15, 2025
91 checks passed
@ZJY0516 ZJY0516 deleted the noop-test branch September 16, 2025 01:21
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
QierLi pushed a commit to QierLi/vllm that referenced this pull request Oct 5, 2025
Signed-off-by: bbartels <[email protected]>

[gpt-oss] Add IncompleteDetails to ResponsesRepsonse (vllm-project#24561)

Signed-off-by: Andrew Xia <[email protected]>

[gpt-oss][1a] create_responses stream outputs BaseModel type, api server is SSE still (vllm-project#24759)

Signed-off-by: Andrew Xia <[email protected]>

[Performance] Remove redundant clone() calls in cutlass_mla (vllm-project#24891)

[Bug] Fix Cutlass Scaled MM Compilation Error (vllm-project#24887)

Signed-off-by: yewentao256 <[email protected]>

[ci] fix wheel names for arm wheels (vllm-project#24898)

Signed-off-by: simon-mo <[email protected]>

[Tests] fix initialization of kv hash in tests (vllm-project#24273)

Signed-off-by: Mickael Seznec <[email protected]>

[Compile] Fix noop_elimination pass and add tests for noop_elimination (vllm-project#24880)

Signed-off-by: zjy0516 <[email protected]>

Propagate entire tokens to connector for resumed preemptions

Signed-off-by: Qier Li <[email protected]>

Fix pre-commit

Signed-off-by: Qier Li <[email protected]>

Rename field and nullify empty lists

Signed-off-by: Qier Li <[email protected]>

Update vllm/v1/core/sched/scheduler.py

Co-authored-by: Nick Hill <[email protected]>
Signed-off-by: Qier Li <[email protected]>

Add unit test for preemption resumption

Signed-off-by: Qier Li <[email protected]>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build 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.

2 participants