Skip to content

Conversation

@joseluisbf-kpsr
Copy link

@joseluisbf-kpsr joseluisbf-kpsr commented Apr 13, 2025

Some function arguments are stored below the stack pointer, that is, in a free memory area. Any call that stores values in the SP (e.g. OS context switch) will corrupt these values after return. We didn't face this problem in Linux, but it raises an _ARMV4_Exception_data_abort_default in RTEMS.

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 13, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 9c7d4dd with merge base 3f0931b (image):
💚 Looks good so far! There are no failures yet. 💚

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 13, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: joseluisbf-kpsr / name: Jose Luis Barros Fernandez (9c7d4dd)

@pytorch-bot pytorch-bot bot added module: cpu CPU specific problem (e.g., perf, algorithm) release notes: quantization release notes category labels Apr 13, 2025
@joseluisbf-kpsr joseluisbf-kpsr force-pushed the bugfix/Fix-DWConv-in-QNNPACK-for-aarch32 branch from 330acb8 to 9c7d4dd Compare April 13, 2025 19:50
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 13, 2025
PUSH {r0, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr}
VPUSH {d8-d15}

STR r0, [sp, #-8]
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we clobbering d8, unintentionally?
This is done elsewhere too, unfortunately, do you want to take a stab at other kernels too>

Copy link
Author

Choose a reason for hiding this comment

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

Aren't we clobbering d8, unintentionally?

No, the r* registers are pushed and then the d*, all above the SP. The reading offsets for r0 and r3 are adjusted accordingly.

This is done elsewhere too, unfortunately, do you want to take a stab at other kernels too>

We didn't find additional issues in our QNNPACK version, in files such as 8x8-aarch64-neon.S and 8x8-aarch64-neon.S: contrary to STR r0, [sp, #-8] (sp is not modified), instructions such as STP d15, d14, [sp, -16] pre-modify sp. (So values are kept safe over the stack pointer.)

@joseluisbf-kpsr
Copy link
Author

joseluisbf-kpsr commented Jun 3, 2025

Dear all,
Could you please review the failure and the patch?
@digantdesai

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2025

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Aug 2, 2025
@joseluisbf-kpsr
Copy link
Author

Dear jerryzh168, salilsdesai, kimishpatel, digantdesai, and jianyuh

The described bug was confirmed, patched, and the fix was tested and passes all the CI tests.
After months of inactivity, it is now tagged as 'Stalled' and will be closed in 30 days.
I'd appreciate it if you could review and merge this small fix.

@joseluisbf-kpsr
Copy link
Author

joseluisbf-kpsr commented Aug 4, 2025

@joseluisbf-kpsr
Copy link
Author

@github-actions github-actions bot closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: cpu CPU specific problem (e.g., perf, algorithm) open source release notes: quantization release notes category Stale 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.

4 participants