-
Notifications
You must be signed in to change notification settings - Fork 336
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
LLamaSharp runtime binaries don't support Rosetta2 #752
Comments
There should be non AVX binaries (it's the ones in this folder). Try running your application with this at the start: NativeLibraryConfig
.All
.WithLogCallback((level, message) =>
{
Console.WriteLine($"[llama {level}]: {message.TrimEnd('\n')}");
}); It will log out what the binary selection process is doing, which should help diagnose why it's choosing AVX over noavx. |
Those are
|
Aha yes sorry I forgot about that. In that case yes you're right, as you can see here the MacOS+x64 binaries are compiled with AVX support. If you're interested in submitting a PR to fix this it should be fairly simple.
|
Yeah, I already hacked together a fix in my codebase – the only problem is that it's relatively convoluted to figure out "whether we're running under rosetta emulation without AVX support", because AVX works fine for regular Intel-based Macs (even though the hardware platform is increasingly rare). |
Does this not work under Rosetta? |
It's good to make changes at this place. It's better to split this class into |
Yep, I didn't think about tackling it at this angle. I'll open a PR later today. Thank you :) |
Description
Hi there,
I'm attempting to integrate LLamaSharp with a C#-based game that is stuck with Rosetta emulation on M1 Macs. Unfortunately, the regular builds are compiled with AVX (I believe?) which Rosetta can't emulate, causing a crash. I compiled with minimal support from the Llama.cpp repo and it works fine.
I'm not sure if this is something that needs to be addressed by the library itself, but felt worth noting here.
The text was updated successfully, but these errors were encountered: