This repository was archived by the owner on Apr 25, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454 - name : Build libfastface consumer test (compile only)
5555 run : |
5656 gcc-13 -O2 -march=x86-64-v3 -mavxvnni -fopenmp -I. \
57- test_libfastface.c libfastface.a -o test_libfastface
57+ test_libfastface.c libfastface.a -o test_libfastface -lm
5858
5959 - name : Go build (compile only)
6060 working-directory : go/fastface
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ AR := ar
3131# ARM NEON port (future): override with "-march=armv8.2-a+dotprod" etc.
3232CFLAGS_ARCH ?= -march=native -mavx2 -mfma -mavxvnni
3333CFLAGS = -O3 $(CFLAGS_ARCH ) -fopenmp $(CFLAGS_EXTRA )
34+ # Link libraries: -lm is needed on Linux/POSIX for lrintf/sqrtf/etc.
35+ # MinGW on Windows links libm implicitly so this is a no-op there.
36+ LDLIBS = -lm
3437DEFS = -DFFW2_NOMAIN
3538PYTHON ?= python
3639
@@ -55,10 +58,10 @@ exes: $(BIN_MAIN) $(BIN_BATCHED)
5558lib : libfastface.a
5659
5760$(BIN_MAIN ) : arcface_forward_int8.c $(KERNEL_SRCS )
58- $(CC ) $(CFLAGS ) $(DEFS ) $^ -o $@
61+ $(CC ) $(CFLAGS ) $(DEFS ) $^ -o $@ $( LDLIBS )
5962
6063$(BIN_BATCHED ) : arcface_forward_int8_batched.c $(KERNEL_SRCS )
61- $(CC ) $(CFLAGS ) $(DEFS ) $^ -o $@
64+ $(CC ) $(CFLAGS ) $(DEFS ) $^ -o $@ $( LDLIBS )
6265
6366% .o : % .c
6467 $(CC ) $(CFLAGS ) $(DEFS ) -c $< -o $@
@@ -67,7 +70,7 @@ libfastface.a: libfastface.o $(KERNEL_OBJS)
6770 $(AR ) rcs $@ $^
6871
6972$(BIN_TESTLIB ) : test_libfastface.c libfastface.a fastface.h
70- $(CC ) -O2 -fopenmp -I. test_libfastface.c libfastface.a -o $@
73+ $(CC ) -O2 -fopenmp -I. test_libfastface.c libfastface.a -o $@ $( LDLIBS )
7174
7275test : $(BIN_MAIN ) tests/golden_input.bin tests/golden_int8_emb.bin
7376 $(PYTHON ) tests/run_regression.py
You can’t perform that action at this time.
0 commit comments