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

Illegal Instruction when AVX is not available on the Host #110

Open
piotr-k-k opened this issue Sep 15, 2023 · 9 comments
Open

Illegal Instruction when AVX is not available on the Host #110

piotr-k-k opened this issue Sep 15, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@piotr-k-k
Copy link

Hi, unfortunatelly I get unhandled exception trying run Whisper.net.Demo and I can't deal with it.
Unhandled exception at 0x00007FFB6C6B3441 (whisper.dll) in Whisper.net.Demo.exe: 0xC000001D: Illegal Instruction.
at line
NativeMethods.whisper_full_with_state(currentWhisperContext, state, whisperParams, (IntPtr)pData, samples.Length);
VS2022, .NET 7, Whisper 1.4.7
Any suggestions?
Thanks

@sandrohanea
Copy link
Owner

Hello @piotr-k-k ,
Do you have any changes to Whisper.net.Demo?

Are you using some specific wav file that you can share in order to reproduce the issue?

Also, can you, please, try some examples from the "Examples" folder?
e.g. https://github.com/sandrohanea/whisper.net/tree/main/examples/Simple

@piotr-k-k
Copy link
Author

Hello @sandrohanea, thank you for reply, no I didn't change anything and I used default kennedy.wav. I tested example Simple as well as my own test application, all with the same result.

@sandrohanea
Copy link
Owner

I still couldn't manage to reproduce the error. Can you, please, clarify the OS version and architecture(e.g. x64, arm64, x86) that you're using?

@piotr-k-k
Copy link
Author

I used Windows 10 x64, today later or tomorrow maybe I will try other system and hardware.

@sandrohanea
Copy link
Owner

that is one of the systems that I'm using, and can confirm that it should work (just tested it).
Can you maybe try to re-install https://aka.ms/vs/17/release/vc_redist.x64.exe
Maybe for some reason you have some corrupted vc redistributable?

@sandrohanea
Copy link
Owner

Another possible issue might be similar with: https://stackoverflow.com/questions/59584105/illegal-instruction-from-vs-c-on-windows

Which CPU are you using?

@piotr-k-k
Copy link
Author

piotr-k-k commented Sep 17, 2023

Now I don't know what exactly CPU I use, I think it's some Intel Xeon, will check tomorrow. Thanks for tips, tomorrow I will continue deal with it.

@piotr-k-k
Copy link
Author

I dealt with this problem by rebuilding whisper.cpp with disabled AVX2, so with set WHISPER_NO_AVX2 variable.

@sandrohanea
Copy link
Owner

Thanks for confirming @piotr-k-k ,
This might be address with a future runtime (e.g. Whisper.net.Runtime.NoAVX) which will disable AVX statically. However, the best way would be I think to do it similarly with ffmpeg (to use it only if it is available and to have runtime fallback => but that will require changes in whisper.cpp)

@sandrohanea sandrohanea added the enhancement New feature or request label Oct 10, 2023
@sandrohanea sandrohanea changed the title Illegal Instruction Illegal Instruction when AVX is not available on the Host Oct 10, 2023
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

No branches or pull requests

2 participants