-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.mak
122 lines (101 loc) · 2.7 KB
/
config.mak
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
include config_options_load.mak
INTELARCH = SSE4.2
CUDAVERSION = 35 61
CUDAREGS = 255
ARCHBITS = 64
HIDEECHO = @
CC_x86_64-pc-linux-gnu = GCC
CC_i686-pc-cygwin = ICC
TARGET = dgemm_bench
LIBS =
LIBPATHS =
LIBS =
EXTRAOBJFILES =
CONFIG_STATIC = 0
ifeq ($(CONFIG_LTO), 1)
EXTRAFLAGSGCC = -flto
EXTRAFLAGSLINK = -flto
endif
CPPFILES = caldgemm.cpp benchmark.cpp cmodules/timer.cpp cmodules/qmalloc.cpp caldgemm_cpu.cpp cmodules/affinity.cpp cmodules/threadserver.cpp cmodules/qsem.cpp caldgemm_adl.cpp
CXXFILES =
ASMFILES =
CUFILES =
COMPILER_FLAGS = OPT
ifeq ($(AMDAPPSDKROOT), )
ifeq ($(INCLUDE_CAL), 1)
warning CAL not found, disabling INCLUDE_CAL
endif
INCLUDE_CAL = 0
endif
ifeq ("$(CUDA_PATH)", "")
ifeq ($(INCLUDE_CUDA), 1)
warning CUDA not found, disabling INCLUDE_CUDA
endif
INCLUDE_CUDA = 0
INCLUDE_CUBLAS = 0
endif
ifeq ($(CONFIGURED), 1)
ifeq ($(INCLUDE_CUDA), 1)
CONFIG_CUDA = 1
CUFILES += caldgemm_cuda.cu
DEFINES += CALDGEMM_CUDA
ifeq ($(INCLUDE_CUBLAS), 1)
CONFIG_CUBLAS = 1
DEFINES += CALDGEMM_CUDA_CUBLAS
endif
endif
ifeq ($(INCLUDE_OPENCL), 1)
CONFIG_OPENCL = 1
CPPFILES += caldgemm_opencl.cpp
DEFINES += CALDGEMM_OPENCL
endif
ifeq ($(INCLUDE_CAL), 1)
CONFIG_CAL = 1
CPPFILES += caldgemm_cal.cpp
DEFINES += CALDGEMM_CAL
endif
ifeq ($(BLAS_BACKEND), GOTOBLAS)
INCLUDEPATHS += $(GOTOBLAS_PATH)
DEFINES += USE_GOTO_BLAS
ifeq ($(ARCH), i686-pc-cygwin)
EXTRAOBJFILES += $(GOTOBLAS_PATH)/libgoto2.lib
else
#LIBS += gfortran
EXTRAOBJFILES += $(GOTOBLAS_PATH)/libgoto2.a
endif
else
ifeq ($(BLAS_BACKEND), MKL)
INCLUDEPATHS += $(MKL_PATH)/include
LIBS += iomp5 mkl_intel_lp64 mkl_core mkl_intel_thread
LIBPATHS += $(MKL_PATH)/lib/intel64/
ifneq ($(ICC_PATH), )
LIBPATHS += $(ICC_PATH)/lib/intel64/
endif
DEFINES += USE_MKL
CONFIG_OPENMP = 1
else
ifeq ($(BLAS_BACKEND), ACML)
INCLUDEPATHS += $(CBLAS_PATH)/include
LIBPATHS += $(ACML_PATH)/lib $(CBLAS_PATH)/include
LIBS += acml_mp
EXTRAOBJFILES += $(CBLAS_PATH)/lib/cblas_LINUX.a
CONFIG_OPENMP = 1
LIBS += gfortran
else
$(error No valid BLAS_BACKEND selected)
endif
endif
endif
INCLUDEPATHS += $(OPENMPI_PATH)/include/vampirtrace
else
$(error Not configured yet, adapt config_options.mak!)
endif
caldgemm_config.h:
cp caldgemm_config.sample caldgemm_config.h
ALLDEP += caldgemm_config.h config_options.mak
config_options.mak:
cp config_options.sample config_options.mak
FILEFLAGSbenchmark.cpp = -Wno-strict-aliasing
FILEFLAGScaldgemm.cpp = -Wno-strict-aliasing
FILEFLAGScaldgemm_cal.cpp = -Wno-strict-aliasing
FILEFLAGScaldgemm_opencl.cpp = -Wno-strict-aliasing