forked from libxsmm/parlooper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (34 loc) · 2.02 KB
/
Makefile
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
39
40
41
42
43
44
45
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the LIBXSMM library. #
# #
# For information on the license, see the LICENSE file. #
# Further information: https://github.com/libxsmm/libxsmm/ #
# SPDX-License-Identifier: BSD-3-Clause #
###############################################################################
LIBXSMM_ROOT := $(if $(LIBXSMM_ROOT),$(LIBXSMM_ROOT),./)
CXXFLAGS = -fopenmp -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -O2
LDFLAGS = -ldl -lxsmm -lxsmmnoblas
IFLAGS = -I$(LIBXSMM_ROOT)/include -I$(LIBXSMM_ROOT)/samples/deeplearning/libxsmm_dnn/include/
LFLAGS = -L$(LIBXSMM_ROOT)/lib/
SRCFILES = common_loops.cpp par_loop_cost_estimator.cpp par_loop_generator.cpp jit_compile.cpp
XFILES := $(OUTDIR)/conv_bwd $(OUTDIR)/conv_upd $(OUTDIR)/gemm $(OUTDIR)/gemm_bwd $(OUTDIR)/gemm_upd $(OUTDIR)/loop_permute_generator $(OUTDIR)/conv_fwd
.PHONY: all
all: $(XFILES)
$(OUTDIR)/gemm_upd:
g++ gemm_model_upd.cpp $(SRCFILES) $(CXXFLAGS) $(IFLAGS) $(LFLAGS) $(LDFLAGS) -o gemm_upd
$(OUTDIR)/gemm_bwd:
g++ gemm_model_bwd.cpp $(SRCFILES) $(CXXFLAGS) $(IFLAGS) $(LFLAGS) $(LDFLAGS) -o gemm_bwd
$(OUTDIR)/gemm:
g++ gemm_model_fwd.cpp $(SRCFILES) $(CXXFLAGS) $(IFLAGS) $(LFLAGS) $(LDFLAGS) -o gemm
$(OUTDIR)/conv_fwd:
g++ conv_model_fwd.cpp $(SRCFILES) $(CXXFLAGS) $(IFLAGS) $(LFLAGS) $(LDFLAGS) -o conv_fwd
$(OUTDIR)/conv_bwd:
g++ conv_model_bwd.cpp $(SRCFILES) $(CXXFLAGS) $(IFLAGS) $(LFLAGS) $(LDFLAGS) -o conv_bwd
$(OUTDIR)/conv_upd:
g++ conv_model_upd.cpp $(SRCFILES) $(CXXFLAGS) $(IFLAGS) $(LFLAGS) $(LDFLAGS) -o conv_upd
$(OUTDIR)/loop_permute_generator:
g++ $(CXXFLAGS) spec_loop_generator.cpp -o loop_permute_generator
.PHONY: clean
clean:
rm -rf gemm gemm_bwd gemm_upd loop_permute_generator conv_fwd conv_bwd conv_upd