Closed sandrohanea closed 1 day ago
The AVX options are intended to be used for cross-compiling to a specific instruction set independently of the host computer. If you don't want this behavior, you need to disable GGML_NATIVE
.
Got it, I misunderstood it and was not disabling GGML_NATIVE.
If disabling GGML_NATIVE I am able to build both AVX-Enabled Libs and Not-AVX-Enabled Libs using one single host (that have AVX).
Thank you for the answers and your time @slaren , @ggerganov (will close this now).
I want to build Whisper Runtimes for machines without AVX on an AVX-enabled host with Windows OS. This is for providing the runtimes for Whisper.net for users without AVX,
Because the checks if AVX, AVX2, etc are executed regardless of if the options are provided or not and updated it anyway, I cannot build these runtimes for Whisper.net.Runtime.NoAvx:
See: https://github.com/sandrohanea/whisper.net/issues/239
I checked the build and indeed, even if I set
-DGGML_AVX=OFF
it will still be set to true because it is available on the host machine: https://github.com/sandrohanea/whisper.net/actions/runs/11572290952/job/32211959849This PR is addressing this issue to run those checks only if the option is already true, allowing it to be overridden to false if the capability is not found on the machine.
It also changes the default for MSVC to have INS_ENB by default on (to keep the same behaviour if building on an AVX enabled host)
This configuration will allow:
building AVX-enabled library on AVX-enabled host
building NotAVX-enabled library on AVX-enabled host
building NotAVX-enabled library on NotAVX-enabled host
Building AVX-enabled library by default on AVX-Enabled Host
Building NotAVX-enabled library by default on NotAVX-Enabled Host