Skip to content

Conversation

laithsakka
Copy link
Contributor

@laithsakka laithsakka commented Aug 11, 2025

Stack from ghstack (oldest at bottom):

get_free_symbol_uses is used to know what unbacked symbols are used by a given node.
not having correct get_free_symbol_uses defined properly leads to :

  • eliminating of some nodes due to not detection of any users. (See the added unit test)
  • Incorrect topological sort.

Fix get_free_symbol_uses , NopKernel , ConcarKernel, InputsKerenl, external kernel.
for ComputedBuffer with NonOwningLayout its interesting case.
when layout is NonOwningLayout we need to access the actual view op base layout and use
detect symbols in it. Because when we codegen the ComputedBuffer we uses those symbols.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @Lucaskabela

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Aug 11, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 6e19a3b with merge base ecea811 (image):
💚 Looks good so far! There are no failures yet. 💚

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

laithsakka added a commit that referenced this pull request Aug 11, 2025
laithsakka added a commit that referenced this pull request Aug 11, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 11, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 11, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 11, 2025
@laithsakka laithsakka requested review from kundaMwiza and removed request for kundaMwiza August 11, 2025 12:48
laithsakka added a commit that referenced this pull request Aug 11, 2025
Comment on lines 5369 to 5372
def get_free_symbol_uses(
self, unbacked_only: bool = False
) -> OrderedSet[sympy.Symbol]:
return NopKernel.get_free_symbol_uses(self, unbacked_only)
Copy link
Contributor

Choose a reason for hiding this comment

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

Indented incorrectly ? Also This is dead code, (should already be defined through inheritance)

laithsakka added a commit that referenced this pull request Aug 11, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 11, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 11, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 12, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 12, 2025



basic_NestedModule_eager,compile_time_instruction_count,9199000000,0.1
basic_NestedModule_eager,compile_time_instruction_count,9554000000,0.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

exisiting not from my PR.

[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 12, 2025
[ghstack-poisoned]
laithsakka added a commit that referenced this pull request Aug 13, 2025
@laithsakka
Copy link
Contributor Author

Fix the perf regression

@laithsakka
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 13, 2025
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@laithsakka
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
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

@laithsakka
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Can't merge closed PR #160314

pytorchmergebot pushed a commit that referenced this pull request Aug 14, 2025
regression introduced  by #160314
not much worried about it since it did not effect other inductor benchmarks could not repo locally

Pull Request resolved: #160537
Approved by: https://github.com/eellison
chuanhaozhuge pushed a commit that referenced this pull request Aug 14, 2025
get_free_symbol_uses is used to know what unbacked symbols are used by a given node.
not having correct get_free_symbol_uses defined properly leads to :

- eliminating of some nodes due to not detection of any users. (See the added unit test)
- Incorrect topological sort.

Fix get_free_symbol_uses , NopKernel , ConcarKernel, InputsKerenl, external kernel.
for ComputedBuffer with NonOwningLayout its interesting case.
when layout is NonOwningLayout we need to access the actual view op base layout and use
detect symbols in it. Because when we codegen the ComputedBuffer we uses those symbols.

Pull Request resolved: #160314
Approved by: https://github.com/eellison
chuanhaozhuge pushed a commit that referenced this pull request Aug 14, 2025
regression introduced  by #160314
not much worried about it since it did not effect other inductor benchmarks could not repo locally

Pull Request resolved: #160537
Approved by: https://github.com/eellison
chuanhaozhuge pushed a commit that referenced this pull request Aug 18, 2025
get_free_symbol_uses is used to know what unbacked symbols are used by a given node.
not having correct get_free_symbol_uses defined properly leads to :

- eliminating of some nodes due to not detection of any users. (See the added unit test)
- Incorrect topological sort.

Fix get_free_symbol_uses , NopKernel , ConcarKernel, InputsKerenl, external kernel.
for ComputedBuffer with NonOwningLayout its interesting case.
when layout is NonOwningLayout we need to access the actual view op base layout and use
detect symbols in it. Because when we codegen the ComputedBuffer we uses those symbols.

Pull Request resolved: #160314
Approved by: https://github.com/eellison
chuanhaozhuge pushed a commit that referenced this pull request Aug 18, 2025
regression introduced  by #160314
not much worried about it since it did not effect other inductor benchmarks could not repo locally

Pull Request resolved: #160537
Approved by: https://github.com/eellison
can-gaa-hou pushed a commit to can-gaa-hou/pytorch that referenced this pull request Aug 22, 2025
get_free_symbol_uses is used to know what unbacked symbols are used by a given node.
not having correct get_free_symbol_uses defined properly leads to :

- eliminating of some nodes due to not detection of any users. (See the added unit test)
- Incorrect topological sort.

Fix get_free_symbol_uses , NopKernel , ConcarKernel, InputsKerenl, external kernel.
for ComputedBuffer with NonOwningLayout its interesting case.
when layout is NonOwningLayout we need to access the actual view op base layout and use
detect symbols in it. Because when we codegen the ComputedBuffer we uses those symbols.

Pull Request resolved: pytorch#160314
Approved by: https://github.com/eellison
can-gaa-hou pushed a commit to can-gaa-hou/pytorch that referenced this pull request Aug 22, 2025
regression introduced  by pytorch#160314
not much worried about it since it did not effect other inductor benchmarks could not repo locally

Pull Request resolved: pytorch#160537
Approved by: https://github.com/eellison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants