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

[WIP] Added support for apple accelerate as BLAS/LAPACK backend. #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

HasKha
Copy link
Contributor

@HasKha HasKha commented Apr 15, 2024

Added support for apple Accelerate. This only works on apple silicon.

Build with cmake -DNASOQ_BLAS_BACKEND=Accelerate -DNASOQ_USE_CLAPACK=OFF .

Important: This is not fully functional as it is, and I could use some help

  • CMake runs fine and it compile without errors.
  • The NASOQ_Test executable runs and completes correctly
  • The NASOQ_Catch2_Tests has issues, and the outcome does not appear to be deterministic. I have seen the following:
    • nasoq::quadprog returns 0 and x/y/z do not match. This is most often but not always.
    • nasoq::quadprog returns 1 and x/y/z do not match. Rare.
    • nasoq::quadprog returns 1 and x/y/z do match. Also rare.
  • After the above, the program exits. It can crash during destruction. This also may or may not happen, it is not deterministic and it is apparently unrelated to the above issues.

Note that the above issues do not exist in the current main branch, or when building in this branch with cmake -DNASOQ_BLAS_BACKEND=OpenBLAS -DNASOQ_USE_CLAPACK=ON .

@cheshmi cheshmi self-assigned this Apr 16, 2024
@HasKha
Copy link
Contributor Author

HasKha commented Jun 3, 2024

@cheshmi did you get a chance to look into this? Thanks

@cheshmi
Copy link
Collaborator

cheshmi commented Jun 4, 2024

@cheshmi did you get a chance to look into this? Thanks

Not yet, I will work on it this week. Thanks

@cheshmi
Copy link
Collaborator

cheshmi commented Jun 7, 2024

@HasKha I can reproduce the issue. Working on it.

@cheshmi
Copy link
Collaborator

cheshmi commented Jun 7, 2024

I tested the following:

  • Updated the catch version into its latest
  • tested it in debug mode, catch test crashes (most of the time) somewhere in __pthread_kill and says "Incorrect guard value: 0". Not sure who uses pthread. NASOQ does not use pthread directly.
  • Without debugging, it says: "Unknown expression after the reported line"
  • The changes do not seem to be problematic. I thought it might be related to this but the connection is not clear.

Not resolved the issue yet, will work on it again next week. @HasKha

@HasKha
Copy link
Contributor Author

HasKha commented Jun 7, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants