-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 682 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (27 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
ARCH := $(shell uname -m)
ifeq ($(ARCH),aarch64)
CC := gcc
RUN :=
else
CC := aarch64-linux-gnu-gcc
RUN := qemu-aarch64
endif
# Build flags
CFLAGS := -O3 \
-march=armv8-a+simd+fp16 \
-ftree-vectorize \
-fopenmp \
LDFLAGS := -lm
# Source files
SRC := main.c tools/tools.c buffer.s padding.s indirection.s \
conv.c buffer.s winograd.c activation_function.s loader.c \
$(wildcard microkernels/*.s fused_ops/*.s modules/*.c modules/*.s ops/*.s)
TARGET := conv
IMG ?= input.jpg
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
run: $(TARGET)
$(RUN) ./$(TARGET) $(IMG)
clean:
rm -f $(TARGET)