Skip to content

gcc-8: _mm_loadu_si64 missing #99

Closed
@jploski

Description

@jploski

The library does not compile using gcc<9 (e.g. on Debian 10) because of missing _mm_loadu_si64 intrinsic (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78782):

[  6%] Built target ggml_utils
[  6%] Building C object src/CMakeFiles/ggml.dir/ggml.c.o
/tmp/ggml/src/ggml.c: In function ‘bytes_from_nibbles_16’:
/tmp/ggml/src/ggml.c:476:19: warning: implicit declaration of function ‘_mm_loadu_si64’; did you mean ‘_mm_loadl_epi64’? [-Wimplicit-function-declaration]
     __m128i tmp = _mm_loadu_si64( ( const __m128i* )rsi );
                   ^~~~~~~~~~~~~~
                   _mm_loadl_epi64
/tmp/ggml/src/ggml.c:476:19: error: incompatible types when initializing type ‘__m128i’ {aka ‘__vector(2) long long int’} using type ‘int’
make[2]: *** [src/CMakeFiles/ggml.dir/build.make:63: src/CMakeFiles/ggml.dir/ggml.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: src/CMakeFiles/ggml.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Not sure if this is a bug since Debian 10 is pretty old, but if there is an easy fix and no other reasons that require gcc-9, it may be worth staying backward-compatible. Otherwise, maybe fail more gracefully (and/or mention gcc-9 in the docs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions