-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
222 lines (202 loc) · 5.44 KB
/
CMakeLists.txt
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# if (MAGMADNN_ENABLE_CUDA)
# cuda_add_library(magmadnn "")
# else()
if (MAGMADNN_BUILD_SHARED_LIBS)
add_library(magmadnn SHARED "")
else()
add_library(magmadnn STATIC "")
endif()
# endif()
target_sources(magmadnn
PRIVATE
init_finalize.cpp
exception.cpp
utilities_internal.cpp)
# compute
target_sources(magmadnn
PRIVATE
compute/add/addop.cpp
compute/add/geadd_internal.cpp
compute/batchnorm/batchnormop.cpp
compute/crossentropy/crossentropy_internal.cpp
compute/conv2dforward/conv2dforwardop.cpp
compute/crossentropy/crossentropy_internal.cpp
compute/crossentropy/crossentropyop.cpp
compute/div/div_internal.cpp
compute/div/divop.cpp
compute/dot/dotop.cpp
compute/dropout/dropoutop.cpp
compute/flatten/flattenop.cpp
compute/gradients.cpp
compute/gradtable.cpp
compute/linearforward/linearforwardop.cpp
compute/log/log_internal.cpp
compute/log/logop.cpp
compute/matmul/gemm_internal.cpp
compute/matmul/matmulop.cpp
compute/meansquarederror/meansquarederror.cpp
compute/negative/negative_internal.cpp
compute/negative/negativeop.cpp
compute/op_utilities.cpp
compute/pooling/poolingop.cpp
compute/pow/pow_internal.cpp
compute/pow/powop.cpp
compute/product/product_internal.cpp
compute/product/productop.cpp
compute/reducesum/reducesum_internal.cpp
compute/reducesum/reducesumop.cpp
compute/relu/relu_internal.cpp
compute/relu/reluop.cpp
compute/scalarproduct/scalarproduct_internal.cpp
compute/scalarproduct/scalarproductop.cpp
compute/sigmoid/sigmoid_internal.cpp
compute/sigmoid/sigmoid_op.cpp
compute/softmax/softmaxop.cpp
compute/sum/sum_internal.cpp
compute/sum/sumop.cpp
compute/tanh/tanh_internal.cpp
compute/tanh/tanhop.cpp
compute/transpose/transpose_internal.cpp
compute/transpose/transposeop.cpp
compute/variable.cpp)
if (MAGMADNN_ENABLE_MKLDNN)
target_sources(magmadnn
PRIVATE
compute/onednn/conv2dforwardop.cpp)
endif()
if (MAGMADNN_ENABLE_CUDA)
target_sources(magmadnn
PRIVATE
compute/add/geadd_internal_device.cu
compute/crossentropy/crossentropy_internal_device.cu
compute/cuda/conv2dforwardop.cpp
compute/div/div_internal_device.cu
compute/log/log_internal_device.cu
compute/negative/negative_internal_device.cu
compute/pow/pow_internal_device.cu
compute/product/product_internal_device.cu
compute/reducesum/reducesum_internal_device.cu
compute/relu/relu_internal_device.cu
compute/scalarproduct/scalarproduct_internal_device.cu
compute/sigmoid/sigmoid_internal_device.cu
compute/sum/sum_internal_device.cu
compute/tanh/tanh_internal_device.cu
compute/transpose/transpose_internal_device.cu
)
endif()
# data
target_sources(magmadnn
PRIVATE
data/utils.cpp
data/MNIST.cpp
data/CIFAR10.cpp
data/CIFAR100.cpp)
# dataloader
target_sources(magmadnn
PRIVATE
dataloader/linear/linearloader.cpp)
# layer
target_sources(magmadnn
PRIVATE
layer/activation/activationlayer.cpp
layer/batchnorm/batchnormlayer.cpp
layer/conv2d/conv2dlayer.cpp
layer/dropout/dropoutlayer.cpp
layer/flatten/flattenlayer.cpp
layer/fullyconnected/fullyconnectedlayer.cpp
layer/input/inputlayer.cpp
layer/layer_utilities.cpp
layer/output/outputlayer.cpp
layer/pooling/poolinglayer.cpp
layer/wrapper.cpp)
# math
target_sources(magmadnn
PRIVATE
math/add.cpp
math/argmax.cpp
math/batchnorm.cpp
math/bias_add.cpp
math/concat.cpp
math/conv2d.cpp
math/crossentropy.cpp
math/dot.cpp
math/dropout.cpp
math/matmul.cpp
math/negate.cpp
math/optimizer_math/adagrad.cpp
math/optimizer_math/adam.cpp
math/optimizer_math/rmsprop.cpp
math/optimizer_math/sgd_momentum.cpp
math/pooling.cpp
math/pow.cpp
math/product.cpp
math/reduce_sum.cpp
math/relu.cpp
math/scalar_tensor_product.cpp
math/softmax.cpp
math/sum.cpp
math/tile.cpp
math/wrappers.cpp)
if (MAGMADNN_ENABLE_CUDA)
target_sources(magmadnn
PRIVATE
math/bias_add_device.cu
math/crossentropy_device.cu
math/optimizer_math/adagrad_device.cu
math/optimizer_math/adam_device.cu
math/optimizer_math/rmsprop_device.cu
math/optimizer_math/sgd_momentum_device.cu
math/pow_device.cu
math/scalar_tensor_product_device.cu
math/sum_device.cu)
endif ()
# memory
target_sources(magmadnn
PRIVATE
memory/memorymanager.cpp
)
if (MAGMADNN_ENABLE_CUDA)
target_sources(magmadnn
PRIVATE
memory/memory_internal_device.cu)
endif ()
# model
target_sources(magmadnn
PRIVATE
model/neuralnetwork/neuralnetwork.cpp
model/neuralnetwork/neuralnetwork_utilities.cpp
)
# optimizer
target_sources(magmadnn
PRIVATE
optimizer/adagrad/adagrad.cpp
optimizer/adam/adam.cpp
optimizer/distributed_momentum_sgd.cpp
optimizer/gradientdescent/gradientdescent.cpp
optimizer/gradientdescent/gradientdescent_internal.cpp
optimizer/rmsprop/rmsprop.cpp)
if (MAGMADNN_ENABLE_CUDA)
target_sources(magmadnn
PRIVATE
optimizer/gradientdescent/gradientdescent_internal_device.cu)
endif ()
# tensor
target_sources(magmadnn
PRIVATE
tensor/fill_internal_host.cpp
tensor/tensor.cpp
tensor/tensor_internal.cpp
tensor/tensor_io.cpp)
if (MAGMADNN_ENABLE_CUDA)
target_sources(magmadnn
PRIVATE
tensor/fill_internal_device.cu)
endif ()
magmadnn_compile_features(magmadnn)
magmadnn_default_includes(magmadnn)
magmadnn_install_library(magmadnn)
# if (MAGMADNN_ENABLE_CUDA)
# magmadnn_compile_features(magmadnn_cuda)
# magmadnn_default_includes(magmadnn_cuda)
# magmadnn_install_library(magmadnn_cuda)
# endif ()