-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use unaligned data types for unaligned intrinsics #632
Conversation
some fix still required |
How do I debug the Armv7 issues? I don't have the hardware to test this locally. |
You can emulate Armv7 targets via QEMU. Check https://dev.to/amarjargal/running-debian-on-an-emulated-arm-machine-2i04 and specify |
I think I found the issue. In
On 32-bit Arm, this is done using Is there an unaligned version of |
Thanks for the patch. This should fix some |
ARMv6 and Armv7 CPUs can perform unaligned accesses for most single load and store instructions up to word size. However, LDM, STM, LDRD, and STRD instructions still need to be handled separately for unaligned accesses. 64-bit variables are typically accessed using LDRD/STRD, which require 32-bit alignment. To handle unaligned 64-bit accesses, we can use a struct-based implementation, which the compiler is smart enough to handle using multiple 32-bit accesses. Reference: Memory alignment issue |
I found another way around this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check https://cbea.ms/git-commit/ and improve the Git commit message to address the benefits of unaligned memory access. You should squash the commits into a single one before amending the Git commit message.
Unaligned memory accesses are primarily useful in cases where space is a concern, and data would benefit from being packed. While unaligned accesses are known for causing non-negligible performance degradation, in situations where performance is also a primary concern, having access to unaligned SIMD instructions is monumentally beneficial. This has become particularly relevant with the growing popularity of edge and mobile machine learning.
Thank @Logikable for contributing! |
Is "Cannot decrease the alignment below the natural alignment of the type." |
That only applies to structs/struct members, and the alignment can still be decreased in that situation by also specifying |
No description provided.