Skip to content

Fix out-of-bounds write in Cadence HiFi bmm bias buffer initialization#17453

Merged
rascani merged 1 commit intopytorch:mainfrom
rascani:fix-cadence-bmm-oob-write
Feb 14, 2026
Merged

Fix out-of-bounds write in Cadence HiFi bmm bias buffer initialization#17453
rascani merged 1 commit intopytorch:mainfrom
rascani:fix-cadence-bmm-oob-write

Conversation

@rascani
Copy link
Contributor

@rascani rascani commented Feb 13, 2026

Summary

The temporary zero-bias buffer for xa_nn_matmul_f32xf32_f32 was being "initialized" by writing a single zero one element past the end of the allocation (tmp[batch_size * m * p] = {0}). Replace with memset to correctly zero the entire buffer, and use sizeof(FLOAT32) consistently.

This diff was authored with the help of Claude.

Test plan

CI

The temporary zero-bias buffer for xa_nn_matmul_f32xf32_f32 was being
"initialized" by writing a single zero one element past the end of the
allocation (`tmp[batch_size * m * p] = {0}`). Replace with memset to
correctly zero the entire buffer, and use sizeof(FLOAT32) consistently.

This diff was authored with the help of Claude.
@rascani rascani requested a review from mcremon-meta February 13, 2026 19:37
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 13, 2026

🔗 Helpful Links

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

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

❌ 3 New Failures, 3 Unrelated Failures

As of commit b567cd6 with merge base c12dc35 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present 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 Feb 13, 2026
@github-actions
Copy link

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.

Copy link
Contributor

@mcremon-meta mcremon-meta left a comment

Choose a reason for hiding this comment

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

@meta-codesync
Copy link
Contributor

meta-codesync bot commented Feb 13, 2026

@rascani has imported this pull request. If you are a Meta employee, you can view this in D93289191.

@rascani
Copy link
Contributor Author

rascani commented Feb 14, 2026

Failures unrelated.

@rascani rascani merged commit 034c3a7 into pytorch:main Feb 14, 2026
155 of 162 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