Skip to content

[inductor][heuristics] Update total tiling score when it is zero#176423

Closed
kundaMwiza wants to merge 1 commit intopytorch:mainfrom
kundaMwiza:mwizak/small-fix-for-tiling-scores
Closed

[inductor][heuristics] Update total tiling score when it is zero#176423
kundaMwiza wants to merge 1 commit intopytorch:mainfrom
kundaMwiza:mwizak/small-fix-for-tiling-scores

Conversation

@kundaMwiza
Copy link
Copy Markdown
Collaborator

@kundaMwiza kundaMwiza commented Mar 4, 2026

  • When the total score is zero, it should be updated otherwise there will be a division by zero error
  • Trying to create a repro proved difficult. Example state that produces this is:
size_hints = {"y": 4096, "x": 64, "r0_": 128}
inductor_meta = {
        "tiling_scores": {"y": 134217728, "x": 2097152, "r0_": 0},
        "num_load": 1,
    }
triton_meta = {
        "signature": {
            "in_ptr0": "*fp32",
            "out_ptr0": "*fp32",
            "ynumel": "i32",
            "xnumel": "i32",
            "r0_numel": "i32",
            "YBLOCK": "constexpr",
            "XBLOCK": "constexpr",
            "R0_BLOCK": "constexpr",
        }
    }
persistent_reduction=False

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

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 4, 2026

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 68df582 with merge base 14f828c (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 4, 2026

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.

@kundaMwiza
Copy link
Copy Markdown
Collaborator Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 4, 2026
@mikaylagawarecki mikaylagawarecki requested a review from jansel March 5, 2026 18:40
@mikaylagawarecki mikaylagawarecki added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 5, 2026
@jansel jansel added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 6, 2026
@jansel
Copy link
Copy Markdown
Contributor

jansel commented Mar 6, 2026

@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

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: linux-aarch64 / linux-jammy-aarch64-py3.10 / test (openreg, 1, 1, linux.arm64.m7g.4xlarge)

Details for Dev Infra team Raised by workflow job

@kundaMwiza
Copy link
Copy Markdown
Collaborator Author

Test timed out, retrying

@kundaMwiza
Copy link
Copy Markdown
Collaborator 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

@kundaMwiza
Copy link
Copy Markdown
Collaborator 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

EmanueleCoradin pushed a commit to EmanueleCoradin/pytorch that referenced this pull request Mar 30, 2026
…orch#176423)

- When the total score is zero, it should be updated otherwise there will be a division by zero error
- Trying to create a repro proved difficult. Example state that produces this is:

```python
size_hints = {"y": 4096, "x": 64, "r0_": 128}
inductor_meta = {
        "tiling_scores": {"y": 134217728, "x": 2097152, "r0_": 0},
        "num_load": 1,
    }
triton_meta = {
        "signature": {
            "in_ptr0": "*fp32",
            "out_ptr0": "*fp32",
            "ynumel": "i32",
            "xnumel": "i32",
            "r0_numel": "i32",
            "YBLOCK": "constexpr",
            "XBLOCK": "constexpr",
            "R0_BLOCK": "constexpr",
        }
    }
persistent_reduction=False
```

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

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: inductor open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants