← All tasks
cppggml-org/whisper.cpp #1172Not a task: already works

AVX is not enabled with CMake even though supported. Plain Makefile works.

envgap__ggml-org__whisper.cpp-1172

01 / FAILURE SIGNATURE

As reported upstream

cd: no such file or directory: whisper
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
a4bb2df36aeb4e6cfb0c1ca9fbcf749ef39cc852
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

ggml-org/whisper.cpp #1172 · read the original issue
Running Arch Linux.

```

[04:34:14 PM] $ git clone https://github.com/ggerganov/whisper.cpp                 

Cloning into 'whisper.cpp'...

remote: Enumerating objects: 4099, done.

remote: Counting objects: 100% (84/84), done.

remote: Compressing objects: 100% (65/65), done.

remote: Total 4099 (delta 33), reused 54 (delta 16), pack-reused 4015

Receiving objects: 100% (4099/4099), 6.98 MiB | 14.38 MiB/s, done.

Resolving deltas: 100% (2563/2563), done.

marcin@daimon /home/marcin/build [0] 

[04:34:35 PM] $ cd whisper   

cd: no such file or directory: whisper

marcin@daimon /home/marcin/build [1] 

[04:34:37 PM] $ cd whisper.cpp    

marcin@daimon /home/marcin/build/whisper.cpp [0] git:(master|✔)

[04:34:38 PM] $ mkdir build

marcin@daimon /home/marcin/build/whisper.cpp [0] git:(master|✔)

[04:34:40 PM] $ cd build            

marcin@daimon /home/marcin/build/whisper.cpp/build [0] git:(master|✔)

[04:34:41 PM] $ cmake ..

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):

  Compatibility with CMake < 3.5 will be removed from a future version of

  CMake.



  Update the VERSION argument <min> value or use a ...<max> suffix to tell

  CMake that the project does not need compatibility with older versions.





-- The C compiler identification is GNU 13.2.1

-- The CXX compiler identification is GNU 13.2.1

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: /usr/bin/cc - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++ - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found Git: /usr/bin/git (found version "2.41.0") 

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success

-- Found Threads: TRUE  

-- CMAKE_SYSTEM_PROCESSOR: x86_64

-- x86 detected

-- Configuring done (0.9s)

-- Generating done (0.0s)

-- Build files have been written to: /home/marcin/build/whisper.cpp/build

marcin@daimon /home/marcin/build/whisper.cpp/build [0] git:(master|✔)

[04:34:44 PM] $ make VERBOSE=1

/usr/bin/cmake -S/home/marcin/build/whisper.cpp -B/home/marcin/build/whisper.cpp/build --check-build-system CMakeFiles/Makefile.cmake 0

/usr/bin/cmake -E cmake_progress_start /home/marcin/build/whisper.cpp/build/CMakeFiles /home/marcin/build/whisper.cpp/build//CMakeFiles/progress.marks

make  -f CMakeFiles/Makefile2 all

make[1]: Entering directory '/home/marcin/build/whisper.cpp/build'

make  -f CMakeFiles/whisper.dir/build.make CMakeFiles/whisper.dir/depend

make[2]: Entering directory '/home/marcin/build/whisper.cpp/build'

cd /home/marcin/build/whisper.cpp/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/marcin/build/whisper.cpp /home/marcin/build/whisper.cpp /home/marcin/build/whisper.cpp/build /home/marcin/build/whisper.cpp/build /home/marcin/build/whisper.cpp/build/CMakeFiles/whisper.dir/DependInfo.cmake "--color="

make[2]: Leaving directory '/home/marcin/build/whisper.cpp/build'

make  -f CMakeFiles/whisper.dir/build.make CMakeFiles/whisper.dir/build

make[2]: Entering directory '/home/marcin/build/whisper.cpp/build'

[  8%] Building C object CMakeFiles/whisper.dir/ggml.c.o

/usr/bin/cc -DGGML_BUILD -DGGML_SHARED -DWHISPER_BUILD -DWHISPER_SHARED -Dwhisper_EXPORTS -I/home/marcin/build/whisper.cpp/. -Wall                                       -Wextra                                     -Wpedantic                                  -Wshadow                                    -Wcast-qual                                 -Wstrict-prototypes                         -Wpointer-arith                             -Wno-unused-function                     -Werror=vla -O3 -DNDEBUG -fPIC -MD -MT CMakeFiles/whisper.dir/ggml.c.o -MF CMakeFiles/whisper.dir/ggml.c.o.d -o CMakeFiles/whisper.dir/ggml.c.o -c /home/marcin/build/whisper.cpp/ggml.c

/home/marcin/build/whisper.cpp/ggml.c: In function ‘quantize_row_q8_0’:

/home/marcin/build/whisper.cpp/ggml.c:1143:15: warning: unused variable ‘nb’ [-Wunused-variable]

 1143 |     const int nb = k / QK8_0;

      |               ^~

/home/marcin/build/whisper.cpp/ggml.c: In function ‘quantize_row_q8_1’:

/home/marcin/build/whisper.cpp/ggml.c:1338:15: warning: unused variable ‘nb’ [-Wunused-variable]

 1338 |     const int nb = k / QK8_1;

      |               ^~

...

```

No `-mavx2` option is passed to the compiler. I'm running Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz, which supports AVX and AVX2.



Then, after running the example, no AVX is used:

```

[04:39:49 PM] $ build/bin/main -f samples/jfk.wav

whisper_init_from_file_no_state: loading model from 'models/ggml-base.en.bin'

whisper_model_load: loading model

whisper_model_load: n_vocab       = 51864

whisper_model_load: n_audio_ctx   = 1500

whisper_model_load: n_audio_state = 512

whisper_model_load: n_audio_head  = 8

whisper_model_load: n_audio_layer = 6

whisper_model_load: n_text_ctx    = 448

whisper_model_load: n_text_state  = 512

whisper_model_load: n_text_head   = 8

whisper_model_load: n_text_layer  = 6

whisper_model_load: n_mels        = 80

whisper_model_load: ftype         = 1

whisper_model_load: qntvr         = 0

whisper_model_load: type          = 2

whisper_model_load: mem required  =  310.00 MB (+    6.00 MB per decoder)

whisper_model_load: adding 1607 extra tokens

whisper_model_load: model ctx     =  140.66 MB

whisper_model_load: model size    =  140.54 MB

whisper_init_state: kv self size  =    5.25 MB

whisper_init_state: kv cross size =   17.58 MB



system_info: n_threads = 4 / 8 | AVX = 0 | AVX2 = 0 | AVX512 = 0 | FMA = 0 | NEON = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 0 | VSX = 0 | COREML = 0 | OPENVINO = 0 | 

```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]