Skip to content

Conversation

@psiddh
Copy link
Contributor

@psiddh psiddh commented Jan 5, 2026

Add zero check for reduction_size before dividing to calculate grain_size,
preventing crash when fuzzer triggers edge case with empty reduction dimension.

Test plan

[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.

Github Executorch and others added 3 commits December 23, 2025 12:44
Changed cortex_m_pass_manager.py to use relative imports (from .activation_fusion_pass)
instead of absolute imports (from executorch.backends.cortex_m.passes) for
intra-package references. This breaks the circular import chain:
__init__.py → cortex_m_pass_manager.py → __init__.py

Resolves: ImportError: cannot import name 'ActivationFusionPass' from
partially initialized module 'executorch.backends.cortex_m.passes'
Add zero check for reduction_size before dividing to calculate grain_size,
preventing crash when fuzzer triggers edge case with empty reduction dimension.
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 5, 2026

🔗 Helpful Links

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

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 8186e26 with merge base 4bf3869 (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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 5, 2026
@psiddh psiddh marked this pull request as ready for review January 5, 2026 22:29
@psiddh psiddh requested a review from manuelcandales as a code owner January 5, 2026 22:29
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

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

@psiddh psiddh changed the title Fuzz fix Fix division by zero in reduce_util.h grain size calculation Jan 5, 2026
@psiddh psiddh merged commit d7be289 into pytorch:main Jan 6, 2026
139 of 141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants