Skip to content
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

Make vector allocation aligned to 64-bytes #1909

Merged
merged 8 commits into from
Aug 31, 2023

Conversation

sfantao
Copy link
Contributor

@sfantao sfantao commented Aug 24, 2023

Summary

Make vector allocation aligned to 64-bytes as that is the same alignment requirement used by QubitVector data.

Details and comments

AER::Vector is in some cases used to initialize QubitVector data and the code assumes that that storage is at least 32-byte aligned so that mm256 instructions can be used. This PR makes AER::Vector storage have the same alignment requirements (64-byte) as QubitVector so that one doesn't get into segfaults when trying to access this storage with vector intrinsics.

This fixes #1908.

@doichanj doichanj self-requested a review August 24, 2023 02:46
@doichanj doichanj added stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable Changelog: Bugfix Include in the Fixed section of the changelog labels Aug 24, 2023
@doichanj doichanj self-requested a review August 25, 2023 03:45
Copy link
Collaborator

@doichanj doichanj left a comment

Choose a reason for hiding this comment

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

Please add release note for this fix

@sfantao
Copy link
Contributor Author

sfantao commented Aug 30, 2023

Added release note for the fix.

@sfantao
Copy link
Contributor Author

sfantao commented Aug 30, 2023

@doichanj , can you help understand how this PR is breaking the Windows builds? It shouldn't change anything there. I only see the compiler running out of memory.

@doichanj
Copy link
Collaborator

Windows build sometimes fails because of heap memory shortage. Only we can do is to rerun until it will not fail

@doichanj doichanj added this to the Aer 0.13.0 milestone Aug 31, 2023
@doichanj doichanj merged commit 0cca1e3 into Qiskit:main Aug 31, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the Fixed section of the changelog stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random segfault on existing tests due to data alignment.
2 participants