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

How to add ane into current asahi linux #4

Open
XY-cpp opened this issue Jan 9, 2024 · 6 comments
Open

How to add ane into current asahi linux #4

XY-cpp opened this issue Jan 9, 2024 · 6 comments

Comments

@XY-cpp
Copy link

XY-cpp commented Jan 9, 2024

I have successfully installed the latest asahi linux on my Mac, and I want to enable ANE on my Mac.
I tried to compile it but failed. The error message is as follow:

/home/xy/Downloads/ane/ane/./src/ane_drv.c:377:17: error :‘accel_open’ undeclared here (not in a function); did you mean ‘seq_open’?
  377 |         .open = accel_open,
      |                 ^~~~~~~~~~
      |                 seq_open

Could you please tell me how to add ane into current asahi linux?

@eiln
Copy link
Owner

eiln commented Jan 13, 2024

It's not upstream yet, but it will be very soon and, by then, it will be installed automatically. In the meantime, you are probably missing CONFIG_DRM_ACCEL (not sure if fedora enables those) and/or the kernel development headers.

@plsnotracking
Copy link

Hi, just curious if you had insight into when this will be merged into upstream? Thank you.

@eiln
Copy link
Owner

eiln commented Jan 19, 2024

Around/before the summer I think. No hard dates though

@aaronyeeio
Copy link

aaronyeeio commented Mar 28, 2024

Hi, I'm curious what's the difference between the effort of porting MPS driver and this ANE driver? I understand CoreML is built upon MPS, so is your ANE port leveraging the MPS driver here (https://rosenzweig.io/blog/first-conformant-m1-gpu-driver.html)?

And my second question is that is this possible to make a dockerized asahi linux image leveraging your ANE support and make it possible to run coreML inside a docker container on top of macOS? I feel that Docker for macOS is built upon Hypervisor framework, so all the kernel level driver that asahi implemented won't take any effect, am I correct on this?

Thank for your great work!

@XY-cpp
Copy link
Author

XY-cpp commented Apr 15, 2024

Hi, I'm curious what's the difference between the effort of porting MPS driver and this ANE driver? I understand CoreML is built upon MPS, so is your ANE port leveraging the MPS driver here (https://rosenzweig.io/blog/first-conformant-m1-gpu-driver.html)?

And my second question is that is this possible to make a dockerized asahi linux image leveraging your ANE support and make it possible to run coreML inside a docker container on top of macOS? I feel that Docker for macOS is built upon Hypervisor framework, so all the kernel level driver that asahi implemented won't take any effect, am I correct on this?

Thank for your great work!

After decades of researching, I think there is no way to run neural network on desktop level OpenGL. I tried run tflite model on OpenGL but failed.

About your second question, I think you are correct. A virtual machine can't use ANE.

@plsnotracking
Copy link

plsnotracking commented Oct 30, 2024

Hi folks, with so many LLMs (not sure if they are leveraging the ANE yet) being available. Any chance for this to be made available anytime soon? If not, any instructions on how to get this incorporated, in the existing kernel while we wait for this to be merged upstream?

I'm asking because I saw commits have stopped, or maybe it's feature complete. Thanks once again.

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

No branches or pull requests

4 participants