Skip to content

improve noop elimination for slice and slice_scatter#151175

Closed
BoyuanFeng wants to merge 6 commits intomainfrom
bf/noop-slice
Closed

improve noop elimination for slice and slice_scatter#151175
BoyuanFeng wants to merge 6 commits intomainfrom
bf/noop-slice

Conversation

@BoyuanFeng
Copy link
Copy Markdown
Contributor

@BoyuanFeng BoyuanFeng commented Apr 12, 2025

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 12, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151175

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 55762e0 with merge base 184ac8c (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@BoyuanFeng BoyuanFeng changed the title improve noop slice improve noop elimination for slice and slice_scatter Apr 13, 2025
statically_known_true(sym_eq(start, 0))
and statically_known_true(end >= 2**63 - 1)
and (
statically_known_true(end >= 2**63 - 1)
Copy link
Copy Markdown
Contributor Author

@BoyuanFeng BoyuanFeng Apr 14, 2025

Choose a reason for hiding this comment

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

statically_known_true(end >= slice_dim_size) is unelated to statically_known_true(end >= 2**63 - 1) for dynamic shape cases. So we still keep statically_known_true(end >= 2**63 - 1). See test/inductor/test_gpu_cpp_wrapper.py::DynamicShapesGpuWrapperGpuTests.test_cat_slice_cat_cuda_dynamic_shapes_gpu_wrapper

@BoyuanFeng BoyuanFeng marked this pull request as ready for review April 14, 2025 20:28
@BoyuanFeng BoyuanFeng requested review from eellison and zou3519 April 14, 2025 20:28
@BoyuanFeng
Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

timocafe pushed a commit to timocafe/pytorch that referenced this pull request Apr 16, 2025
Improves noop elimination for `slice` and `slice_scatter`.

Pull Request resolved: pytorch#151175
Approved by: https://github.com/zou3519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants