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

Use same BLAS implimentation as NumPy #18

Closed
nonhermitian opened this issue Jan 2, 2019 · 5 comments
Closed

Use same BLAS implimentation as NumPy #18

nonhermitian opened this issue Jan 2, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@nonhermitian
Copy link
Contributor

What is the expected enhancement?

Currently, a BLAS implementation is needed Aer to build. However NumPy, which is a requirement, is already linked to a BLAS library. Under Anaconda, for example, this is the Intel MKL. It is possible to use this BLAS for Aer as well, a la Cython and the old qasm_simulator that used it.

@atilag
Copy link
Member

atilag commented Jan 8, 2019

There should be no problem, as long as it's faster than Apple's implementation. We should benchmark both and compare, we just haven't yet. The choice was more OpenBLAS vs Apple's. My preference was always OpenBLAS, but seems like on Mac, Apple's implementation is arguably faster, so we changed it despite of the fact that there seems to be some non-standard practices in the latter that cold lead to potential problems, or at least this is what other users of this library have been reported.

@nonhermitian
Copy link
Contributor Author

My point is that NumPy is a requirement that already is built against a specific blas implimentation. The aer installer should automatically link against that. This gives me, for example, the intel mkl for free. This allows one to test against different blas and time them quite easily by simply changing numpy, for example using the —nomkl flag in conda.

@atilag atilag added the enhancement New feature or request label Feb 11, 2019
@atilag
Copy link
Member

atilag commented Feb 11, 2019

I see that there are versions of Numpy that are linked against OpenBLAS, depending on where Numpy comes from: Pypi -> OpenBlas , Conda -> mkl.
I guess that mkl version is faster for x86 architectures, but we still need to support Power architectures.
Anyway, letting the user choose their desired implementation sounds like a good thing to me.
I'm labeling this issue as an enhancement for now.

@atilag
Copy link
Member

atilag commented Feb 7, 2020

With #543 merged, now we can chose which BAS implementation we want to build with.

@atilag atilag closed this as completed Feb 7, 2020
@mdepasca
Copy link

mdepasca commented Jan 11, 2024

It is not clear to me wether qiskit_aer depends completely on numpy (or a set of external packages) or not.
The rationale for the question is:

  • if it does, to use Intel MKL libraries on x86, for me is enough to install an numpy version depending on those libs (Intel optimised provided by Intel);
  • if it does not completely depends on numpy (or a set of external packages), then to use Intel MKL I would need to build from scratch.

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

Successfully merging a pull request may close this issue.

4 participants