-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Remove strict requirement of MKL so that M1 chips are supported natively #4715
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
Comments
pymc3 3.11 still uses theano-pymc, not sure if it helps, but Aesara will be used from 4.0 onwards only. |
@OriolAbril I don't think that will help, aesara still is much faster with mkl. @elbamos Isn't there a compatibility mode? @fonnesbeck talks about it working well. |
Currently, you won't be able to run this natively. It will have to be under Rosetta2. |
@twiecki It can run under Rosetta2, although if you're also running native python, its a real chore. Pymc is the last tool in my toolbox that still needs to run under compatibility mode. I had hoped this was a conda dependencies issue that could be resolved to permit native operation, but I suppose the answer is that it is not. |
Actually, I take that back. I was able to get the current version of pymc3 (installed from git, reporting v3.11.1) running natively on M1, simply by changing two references to I'm guessing the naming issue is really that what's currently up on the git references a different version of aesana than what's found on conda-forge. Am I missing something? It really seems that If someone proposes a benchmark to show the performance implication, I'm happy to run it. |
If anyone wants to try it (@fonnesbeck ?), I've pushed to branch This works with the version of aesana available on conda-forge. |
Revisiting this issue. It seems like indeed we should remove the strict MKL requirement now that M1 exists. Ideally we'd find a way to tell conda to use MKL if it's available but fall back to OpenBLAS if it doesn't. |
@elbamos Want to do a PR? |
Digging a bit deeper: Moreover, we prohibit the use of other The reason we did is that by default |
@twiecki I think you’re exactly right. My recollection of when I tried to do this to support a pr (which is now way out of date behind master) is that the only required change was dropping mkl-service from the requirements and an install script. |
… does not compile anything, it should not have these dependencies. Instead, it is aesaras job to specify its compile-chain dependencies. Closes #4715.
@twiecki Hey it looks like you've had pr's open for a couple of weeks. Is there anything I can do to help you get this merged? |
@elbamos Yeah this is a bit stuck because of needing to coordinate this with aesara. That's fine but we don't yet have a PyMC3 release that depends on aesara. Once we have that we can move ahead here. Or maybe there's another way that I'm not seeing. |
This is the PR updating aesara: conda-forge/aesara-feedstock#29 |
@twiecki It looks like there are two different things going on. One is to remove mkl-service as a pymc3 dependency. When I tried this, that alone was sufficient to enable pymc3-head and aesara to install and work together properly. I just checked, and mkl-service is not an aesara dependency. I can install aesara through conda on my m1 laptop and the proper arm64 toolchain is pulled-in. The other thing going on has to do with removing various toolchain dependencies from aesara. This does not, to me, appear necessary for the goal of m1 compatibility. So my suggestion is to de-link the two projects. |
@elbamos Yes, |
@twiecki Let me try to separate some issues... It looks to me that:
Please let me know if there's some way I can be helpful with some of this. |
@elbamos All of those are correct, except the last one, where is that info from? |
@twiecki That refers to issues reported in #4932 by sreedat. I observed similar issues when I looked at this a few months ago. Maybe I'm wrong about it. Either way, if the rest of my description is right, then it would seem that the thing to do to close this issue, would be to get your pr removing mkl from pymc3 accepted. |
… does not compile anything, it should not have these dependencies. Instead, it is aesaras job to specify its compile-chain dependencies. Closes #4715.
… does not compile anything, it should not have these dependencies. Instead, it is aesaras job to specify its compile-chain dependencies. Closes #4715. Add custom envs for testing. Remove patsy dependency.
… does not compile anything, it should not have these dependencies. Instead, it is aesaras job to specify its compile-chain dependencies. Closes #4715. Add custom envs for testing. Remove patsy dependency.
* Remove libblas, mkl and m2w64-toolchain dependencies. As PyMC3 itself does not compile anything, it should not have these dependencies. Instead, it is aesaras job to specify its compile-chain dependencies. Closes #4715. Add custom envs for testing. Remove patsy dependency. * Regenerate rerquirements.
I'm still getting this error when trying to import pymc3
And I can't find any issues that have been resolved. |
@seamus0215 pymc3 is still using theano where this fix isn't applied. You can upgrade to 4.0.0beta5 and it should be fixed, or wait a week until 4.0 final is released. |
If you have questions about a specific use case, or you are not sure whether this is a bug or not, please post it to our discourse channel: https://discourse.pymc.io
Description of your problem
Note that earlier versions of pymc3 fail to install because they depend on theano or theano-pymc, which aren't available in M1 builds, rather than aesara.
It appears from here: 2edbe6c that mkl-service was added to quash a theano warning. Is mkl-service still really necessary with aesara?
The text was updated successfully, but these errors were encountered: