Skip to content

when compiling for alderlake, 512 instructions are used #650

@Pleune

Description

@Pleune

Sorry for being breif, but I didn't really have time to dig deep into this one, as I'm really just trying to update my home immich install which happens to pull this in.

   last 25 log lines:
   >   cargo:warning=         ^
   >   cargo:warning=./src/f16.c:29:10: error: always_inline function '_mm512_fmadd_ph' requires target feature 'widekl', but would be inlined into function 'v_f16_cosine_avx512fp16' that is compiled without support for 'widekl'
   >   cargo:warning=    xx = _mm512_fmadd_ph(x, x, xx);
   >   cargo:warning=         ^
   >   cargo:warning=./src/f16.c:30:10: error: always_inline function '_mm512_fmadd_ph' requires target feature 'widekl', but would be inlined into function 'v_f16_cosine_avx512fp16' that is compiled without support for 'widekl'
   >   cargo:warning=    yy = _mm512_fmadd_ph(y, y, yy);
   >   cargo:warning=         ^
   >   cargo:warning=./src/f16.c:33:17: error: always_inline function '_mm512_reduce_add_ph' requires target feature 'widekl', but would be inlined into function 'v_f16_cosine_avx512fp16' that is compiled without support for 'widekl'
   >   cargo:warning=    float rxy = _mm512_reduce_add_ph(xy);
   >   cargo:warning=                ^
   >   cargo:warning=./src/f16.c:34:17: error: always_inline function '_mm512_reduce_add_ph' requires target feature 'widekl', but would be inlined into function 'v_f16_cosine_avx512fp16' that is compiled without support for 'widekl'
   >   cargo:warning=    float rxx = _mm512_reduce_add_ph(xx);
   >   cargo:warning=                ^
   >   cargo:warning=./src/f16.c:35:17: error: always_inline function '_mm512_reduce_add_ph' requires target feature 'widekl', but would be inlined into function 'v_f16_cosine_avx512fp16' that is compiled without support for 'widekl'
   >   cargo:warning=    float ryy = _mm512_reduce_add_ph(yy);
   >   cargo:warning=                ^
   >   cargo:warning=19 errors generated.
   >

Here I'm compiling with mtune and march set to alderlake. I must set march to x86-64-v3, or just not set it at all, and then it builds fine. It should not try to use avx512 and etc, as these are not available on my alderlake 12600k.

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