op.cmake 15.8 KB
Newer Older
H
hanbuhe 已提交
1
set(FOUND_MATCH OFF)
2 3 4 5 6 7
set(CON -1)

message(STATUS "nets :${NET}")

list(FIND NET "googlenet" CON)
if (CON GREATER -1)
H
hanbuhe 已提交
8
  message("googlenet enabled")
D
dolphin8 已提交
9 10 11 12 13 14 15 16 17
  set(CONCAT_OP ON)
  set(CONV_OP ON)
  set(LRN_OP ON)
  set(MUL_OP ON)
  set(ELEMENTWISEADD_OP ON)
  set(FUSION_FC_OP ON)
  set(POOL_OP ON)
  set(RELU_OP ON)
  set(FUSION_CONVADD_OP ON)
Z
zhangyang 已提交
18
  set(FUSION_CONVADDRELU_OP ON)
H
hanbuhe 已提交
19 20 21 22

  set(FOUND_MATCH ON)
endif()

23 24
list(FIND NET "mobilenet" CON)
if (CON GREATER -1)
H
hanbuhe 已提交
25
  message("mobilenet enabled")
D
dolphin8 已提交
26 27 28 29
  set(CONV_OP ON)
  set(ELEMENTWISEADD_OP ON)
  set(RELU_OP ON)
  set(SOFTMAX_OP ON)
30
  set(MUL_OP ON)
D
dolphin8 已提交
31 32 33 34
  set(DEPTHWISECONV_OP ON)
  set(BATCHNORM_OP ON)
  set(POOL_OP ON)
  set(RESHAPE_OP ON)
W
wangliu 已提交
35
  set(FUSION_CONVADDBNRELU_OP ON)
36
  set(FUSION_CONVADDRELU_OP ON)
W
wangliu 已提交
37
  set(FUSION_CONVADD_OP ON)
H
hanbuhe 已提交
38 39 40 41 42

  set(FOUND_MATCH ON)
endif()


43 44
list(FIND NET "mobilenetssd" CON)
if (CON GREATER -1)
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
  message("mobilenetssd enabled")
  set(FUSION_CONVBNRELU_OP ON)
  set(FUSION_CONVBNRELU_OP ON)
  set(FUSION_DWCONVBNRELU_OP ON)
  set(FUSION_CONVADD_OP ON)
  set(MULTICLASSNMS_OP ON)
  set(SOFTMAX_OP ON)
  set(TRANSPOSE_OP ON)
    #feed
  set(PRIORBOX_OP ON)
  set(CONCAT_OP ON)
  set(BOXCODER_OP ON)
  set(RESHAPE_OP ON)
#fetch
  #total

  set(FOUND_MATCH ON)

endif()


66 67
list(FIND NET "yolo" CON)
if (CON GREATER -1)
H
hanbuhe 已提交
68
  message("yolo enabled")
D
dolphin8 已提交
69 70 71 72
  set(BATCHNORM_OP ON)
  set(CONV_OP ON)
  set(RELU_OP ON)
  set(ELEMENTWISEADD_OP ON)
H
hanbuhe 已提交
73 74 75 76

  set(FOUND_MATCH ON)
endif()

77 78
list(FIND NET "squeezenet" CON)
if (CON GREATER -1)
H
hanbuhe 已提交
79
  message("squeezenet enabled")
D
dolphin8 已提交
80 81 82 83 84 85 86
  set(CONCAT_OP ON)
  set(CONV_OP ON)
  set(RELU_OP ON)
  set(ELEMENTWISEADD_OP ON)
  set(POOL_OP ON)
  set(RESHAPE_OP ON)
  set(SOFTMAX_OP ON)
H
hanbuhe 已提交
87 88 89 90 91

  set(FOUND_MATCH ON)
endif()


92 93
list(FIND NET "resnet" CON)
if (CON GREATER -1)
H
hanbuhe 已提交
94 95
  message("resnet enabled")
  set(CONCAT_OP ON)
D
dolphin8 已提交
96
  set(CONV_OP ON)
H
hanbuhe 已提交
97
  set(RELU_OP ON)
D
dolphin8 已提交
98 99
  set(ELEMENTWISEADD_OP ON)
  set(POOL_OP ON)
qnqinan's avatar
qnqinan 已提交
100
  set(BATCHNORM_OP ON)
101
  set(FUSION_CONVBNADDRELU_OP ON)
qnqinan's avatar
qnqinan 已提交
102
  set(MUL_OP ON)
H
hanbuhe 已提交
103 104 105 106 107
  set(RESHAPE_OP ON)
  set(SOFTMAX_OP ON)
  set(FOUND_MATCH ON)
endif()

qnqinan's avatar
qnqinan 已提交
108
list(FIND NET "FPGA_NET_V1" CON)
109
if (CON GREATER -1)
qnqinan's avatar
qnqinan 已提交
110
  message("FPGA_NET_V1 enabled")
Z
zhangyang 已提交
111
  set(FUSION_CONVADDRELU_OP ON)
Z
zhangyang 已提交
112
  set(FUSION_ELEMENTWISEADDRELU_OP ON)
Z
zhangyang 已提交
113
  set(FUSION_FC_OP ON)
Z
zhangyang 已提交
114
  set(POOL_OP ON)
H
hanbuhe 已提交
115
  set(SOFTMAX_OP ON)
Z
zhangyang 已提交
116 117
  set(FUSION_CONVBNRELU_OP ON)
  set(FUSION_CONVBN_OP ON)
Z
zhangyang 已提交
118 119 120 121 122 123 124
  set(TANH_OP ON)
  set(ELEMENTWISEADD_OP ON)
  set(TRANSPOSE2_OP ON)
  set(FUSION_CONVADD_OP ON)
  set(SPLIT_OP ON)
  set(FUSION_DECONVADD_OP ON)
  set(FUSION_DECONVADDRELU_OP ON)
125 126 127 128

  set(RESHAPE_OP ON)
  set(FUSION_CONVADDBNRELU_OP ON)
  set(FUSION_CONVADDBN_OP ON)
Z
zhangyang0701 已提交
129 130
  set(RESHAPE2_OP ON)
  set(PSROI_POOL_OP ON)
131
  set(ROIALIGN_POOL_OP ON)
Z
zhangyang0701 已提交
132 133 134
  set(PROPOSAL_OP ON)
  set(ANCHOR_GENERATOR_OP ON)
  set(SLICE_OP ON)
135 136 137 138 139 140
  set(SIGMOID_OP ON)
  set(CONCAT_OP ON)
  set(PAD2D_OP ON)
  set(CONV_TRANSPOSE_OP ON)
  set(FUSION_DECONVADDBNRELU_OP ON)
  set(FUSION_DECONVADDBN_OP ON)
141 142
  set(FUSION_DECONVBNRELU_OP ON)
  set(CONV_OP ON)
qnqinan's avatar
qnqinan 已提交
143 144 145
  set(ELEMENTWISEMUL_OP ON)
  set(FUSION_FCRELU_OP ON)
  set(RELU_OP ON)
xiebaiyuan's avatar
xiebaiyuan 已提交
146
  set(FOUND_MATCH ON)
H
hanbuhe 已提交
147 148
endif()

qnqinan's avatar
qnqinan 已提交
149 150 151
list(FIND NET "FPGA_NET_V2" CON)
if (CON GREATER -1)
  message("FPGA_NET_V2 enabled")
qnqinan's avatar
qnqinan 已提交
152
  set(FUSION_CONVADDRELU_OP ON)
qnqinan's avatar
qnqinan 已提交
153 154 155 156 157 158
  set(FUSION_ELEMENTWISEADDRELU_OP ON)
  set(FUSION_FC_OP ON)
  set(POOL_OP ON)
  set(SOFTMAX_OP ON)
  set(FUSION_CONVBNRELU_OP ON)
  set(FUSION_CONVBN_OP ON)
Z
zhangyang 已提交
159 160
  set(TANH_OP ON)
  set(ELEMENTWISEADD_OP ON)
qnqinan's avatar
qnqinan 已提交
161 162 163 164 165
  set(TRANSPOSE2_OP ON)
  set(FUSION_CONVADD_OP ON)
  set(SPLIT_OP ON)
  set(FUSION_DECONVADD_OP ON)
  set(FUSION_DECONVADDRELU_OP ON)
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185

  set(RESHAPE_OP ON)
  set(FUSION_CONVADDBNRELU_OP ON)
  set(FUSION_CONVADDBN_OP ON)
  set(RESHAPE2_OP ON)
  set(PSROI_POOL_OP ON)
  set(ROIALIGN_POOL_OP ON)
  set(PROPOSAL_OP ON)
  set(ANCHOR_GENERATOR_OP ON)
  set(SLICE_OP ON)
  set(SIGMOID_OP ON)
  set(CONCAT_OP ON)
  set(CONV_TRANSPOSE_OP ON)
  set(FUSION_DECONVADDBNRELU_OP ON)
  set(FUSION_DECONVADDBN_OP ON)
  set(FUSION_DECONVBNRELU_OP ON)
  set(CONV_OP ON)
  set(ELEMENTWISEMUL_OP ON)
  set(FUSION_FCRELU_OP ON)
  set(RELU_OP ON)
qnqinan's avatar
qnqinan 已提交
186 187 188
  set(FOUND_MATCH ON)
endif()

C
Chon 已提交
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
list(FIND NET "FPGA_OPS_KD" CON)
if (CON GREATER -1)
  message("FPGA_OPS_KD enabled")
  set(CONV_OP ON)
  set(FUSION_CONVADDRELU_OP ON)
  set(FUSION_ELEMENTWISEADDRELU_OP ON)
  set(FUSION_FC_OP ON)
  set(POOL_OP ON)
  set(SOFTMAX_OP ON)
  set(FUSION_CONVBNRELU_OP ON)
  set(FUSION_CONVBN_OP ON)
  set(TANH_OP ON)
  set(ELEMENTWISEADD_OP ON)
  set(TRANSPOSE2_OP ON)
  set(FUSION_CONVADD_OP ON)
  set(SPLIT_OP ON)
  set(FUSION_DECONVADD_OP ON)
  set(FUSION_DECONVADDRELU_OP ON)
  set(FOUND_MATCH ON)
endif()

210 211
list(FIND NET "nlp" CON)
if (CON GREATER -1)
212 213 214 215 216 217 218 219 220 221 222 223
  message("nlp enabled")
  set(FUSION_FC_OP ON)
  set(LOOKUP_OP ON)
  set(GRU_OP ON)
  set(CRF_OP ON)
  set(CONCAT_OP ON)
  set(ELEMENTWISEADD_OP ON)


  set(FOUND_MATCH ON)
endif()

224 225
list(FIND NET "mobilenetfssd" CON)
if (CON GREATER -1)
xiebaiyuan's avatar
xiebaiyuan 已提交
226 227 228 229 230 231 232 233 234 235 236 237 238 239
  message("mobilenetfssd enabled")
  set(FUSION_CONVADDRELU_OP ON)
  set(FUSION_CONVADDBNRELU_OP ON)
  set(FUSION_CONVADD_OP ON)
  set(SOFTMAX_OP ON)
  set(RESHAPE_OP ON)
  set(BILINEAR_INTERP_OP ON)
  set(TRANSPOSE_OP ON)
  set(CONCAT_OP ON)
  set(PRIORBOX_OP ON)
  set(BATCHNORM_OP ON)
  set(BOXCODER_OP ON)
  set(MULTICLASSNMS_OP ON)
  set(FLATTEN_OP ON)
240
  set(FLATTEN2_OP ON)
xiebaiyuan's avatar
xiebaiyuan 已提交
241 242 243 244 245 246
  set(SPLIT_OP ON)
  set(SHAPE_OP ON)

  set(FOUND_MATCH ON)
endif()

247 248
list(FIND NET "genet" CON)
if (CON GREATER -1)
xiebaiyuan's avatar
xiebaiyuan 已提交
249 250 251 252 253 254 255 256 257 258 259 260 261
  message("genet enabled")
  set(FUSION_CONVADDPRELU_OP ON)
  set(FUSION_CONVADDADDPRELU_OP ON)
  set(FUSION_CONVADD_OP ON)
  set(CONV_TRANSPOSE_OP ON)
  set(FUSION_CONVADDRELU_OP ON)
  set(ELEMENTWISEADD_OP ON)
  set(PRELU_OP ON)
  set(POOL_OP ON)
  set(CONCAT_OP ON)

  set(FOUND_MATCH ON)
endif()
H
hanbuhe 已提交
262

263 264 265 266 267 268 269 270 271 272
list(FIND NET "super" CON)
if (CON GREATER -1)
  message("super enabled")
  set(FUSION_CONVADD_OP ON)
  set(FUSION_CONVADDRELU_OP ON)
  set(ELEMENTWISEADD_OP ON)

  set(FOUND_MATCH ON)
endif()

273 274 275 276
list(FIND NET "op" CON)
if (CON GREATER -1)
  message("op enabled")
  set(SIGMOID_OP ON)
277
  set(LEAKY_RELU_OP ON)
278 279
  set(FOUND_MATCH ON)
endif()
280

H
hanbuhe 已提交
281 282
if(NOT FOUND_MATCH)
  message("--default--")
Z
zhaojiaying01 已提交
283
  set(NORM_OP ON)
D
dolphin8 已提交
284
  set(BATCHNORM_OP ON)
285
  set(INSTANCENORM_OP ON)
L
liuruilong 已提交
286
  set(CONV_TRANSPOSE_OP ON)
D
dolphin8 已提交
287 288 289 290 291
  set(BOXCODER_OP ON)
  set(CONCAT_OP ON)
  set(CONV_OP ON)
  set(DEPTHWISECONV_OP ON)
  set(ELEMENTWISEADD_OP ON)
292 293
  set(ELEMENTWISESUB_OP ON)
  set(IM2SEQUENCE_OP ON)
L
lijiancheng0614 已提交
294
  set(FILL_CONSTANT_OP ON)
Z
zp7 已提交
295
  set(DENSITY_PRIORBOX_OP ON)
D
dolphin8 已提交
296
  set(FUSION_CONVADD_OP ON)
297
  set(FUSION_CONVADDPRELU_OP ON)
H
Huie 已提交
298
  set(EXP_OP ON)
Z
zhangyang 已提交
299
  set(FUSION_CONVADDRELU_OP ON)
D
dolphin8 已提交
300 301 302 303
  set(FUSION_FC_OP ON)
  set(LRN_OP ON)
  set(MUL_OP ON)
  set(MULTICLASSNMS_OP ON)
L
lijiancheng0614 已提交
304
  set(POLYGONBOXTRANSFORM_OP ON)
D
dolphin8 已提交
305 306 307 308
  set(POOL_OP ON)
  set(PRIORBOX_OP ON)
  set(RELU_OP ON)
  set(RESHAPE_OP ON)
L
lijiancheng0614 已提交
309
  set(RESHAPE2_OP ON)
D
dolphin8 已提交
310 311 312
  set(SIGMOID_OP ON)
  set(SOFTMAX_OP ON)
  set(TRANSPOSE_OP ON)
L
lijiancheng0614 已提交
313
  set(TRANSPOSE2_OP ON)
E
eclipsess 已提交
314
  set(FUSION_CONVADDBNRELU_OP ON)
315
  set(FUSION_CONVADDADDPRELU_OP ON)
E
eclipsess 已提交
316
  set(FUSION_DWCONVBNRELU_OP ON)
317
  set(FUSION_CONVBNRELU_OP ON)
318
  set(FUSION_CONVRELU_OP ON)
319
  set(FUSION_CONVBNADDRELU_OP ON)
T
Tian 已提交
320 321 322 323
  set(PRELU_OP ON)
  set(RESIZE_OP ON)
  set(SCALE_OP ON)
  set(SLICE_OP ON)
Y
Yao,kun 已提交
324 325
  set(DROPOUT_OP ON)
  set(IM2SEQUENCE_OP ON)
xiebaiyuan's avatar
xiebaiyuan 已提交
326 327
  set(LOOKUP_OP ON)
  set(GRU_OP ON)
Z
zhaojiaying01 已提交
328
  set(GRU_UNIT_OP ON)
xiebaiyuan's avatar
xiebaiyuan 已提交
329
  set(CRF_OP ON)
330 331 332
  set(BILINEAR_INTERP_OP ON)
  set(SPLIT_OP ON)
  set(FLATTEN_OP ON)
333
  set(FLATTEN2_OP ON)
334
  set(SHAPE_OP ON)
E
debug  
eclipsess 已提交
335 336
  set(ELEMENTWISEMUL_OP ON)
  set(SUM_OP ON)
H
hjchen2 已提交
337 338
  set(TOP_K_OP ON)
  set(CAST_OP ON)
339 340
  set(QUANT_OP ON)
  set(DEQUANT_OP ON)
341
  set(FUSION_DEQUANT_BN_OP ON)
342 343 344
  set(FUSION_DEQUANT_ADD_BN_OP ON)
  set(FUSION_DEQUANT_BN_RELU_OP ON)
  set(FUSION_DEQUANT_ADD_BN_RELU_OP ON)
345 346
  set(FUSION_DEQUANT_ADD_BN_QUANT_OP ON)
  set(FUSION_DEQUANT_ADD_BN_RELU_QUANT_OP ON)
347 348
  set(SEQUENCE_EXPAND_OP ON)
  set(SEQUENCE_POOL_OP ON)
H
hjchen2 已提交
349
  set(SEQUENCE_SOFTMAX_OP ON)
350 351
  set(LOG_OP ON)
  set(TANH_OP ON)
352 353
  set(LOD_RESET_OP ON)
  set(LESS_THAN_OP ON)
354 355 356 357
  set(LOGICAL_AND_OP ON)
  set(LOGICAL_OR_OP ON)
  set(LOGICAL_NOT_OP ON)
  set(LOGICAL_XOR_OP ON)
358 359 360
  set(WHILE_OP ON)
  set(WRITE_TO_ARRAY_OP ON)
  set(READ_FROM_ARRAY_OP ON)
Z
zhaojiaying01 已提交
361 362
  set(IS_EMPTY_OP ON)
  set(INCREMENT_OP ON)
363 364 365
  set(ANCHOR_GENERATOR_OP ON)
  set(PROPOSAL_OP ON)
  set(PSROI_POOL_OP ON)
H
hjchen2 已提交
366
  set(ROI_PERSPECTIVE_OP ON)
367
  set(BEAM_SEARCH_OP ON)
H
update  
hjchen2 已提交
368
  set(BEAM_SEARCH_DECODE_OP ON)
H
hjchen2 已提交
369
  set(PAD2D_OP ON)
370
  set(ONE_HOT_OP ON)
371
  set(ASSIGN_VALUE_OP ON)
372
  set(NEAREST_INTERP_OP ON)
373
  set(LEAKY_RELU_OP ON)
374 375 376 377 378 379
  set(ASSIGN_OP ON)
  set(CONDITIONAL_BLOCK_OP ON)
  set(EQUAL_OP ON)
  set(FILL_CONSTANT_BATCH_SIZE_LIKE_OP ON)
  set(RANGE_OP ON)
  set(REDUCE_PROD_OP ON)
H
hanbuhe 已提交
380 381
endif()

D
dolphin8 已提交
382 383 384 385 386 387
  # option(BATCHNORM_OP "" ON)
  # option(BOXCODER_OP "" ON)
  # option(CONCAT_OP "" ON)
  # option(CONV_OP "" ON)
  # option(DEPTHWISECONV_OP "" ON)
  # option(ELEMENTWISEADD_OP "" ON)
L
lijiancheng0614 已提交
388
  # option(FILL_CONSTANT_OP "" ON)
D
dolphin8 已提交
389
  # option(FUSION_CONVADD_OP "" ON)
Z
zhangyang 已提交
390
  # option(FUSION_CONVADDRELU_OP "" ON)
D
dolphin8 已提交
391 392 393 394
  # option(FUSION_FC_OP "" ON)
  # option(LRN_OP "" ON)
  # option(MUL_OP "" ON)
  # option(MULTICLASSNMS_OP "" ON)
L
lijiancheng0614 已提交
395
  # option(POLYGONBOXTRANSFORM_OP "" ON)
D
dolphin8 已提交
396 397 398 399
  # option(POOL_OP "" ON)
  # option(PRIORBOX_OP "" ON)
  # option(RELU_OP "" ON)
  # option(RESHAPE_OP "" ON)
L
lijiancheng0614 已提交
400
  # option(RESHAPE2_OP "" ON)
D
dolphin8 已提交
401 402 403
  # option(SIGMOID_OP "" ON)
  # option(SOFTMAX_OP "" ON)
  # option(TRANSPOSE_OP "" ON)
L
lijiancheng0614 已提交
404
  # option(TRANSPOSE2_OP "" ON)
H
hanbuhe 已提交
405
# endif ()
D
dolphin8 已提交
406

Z
zhaojiaying01 已提交
407 408 409
if (NORM_OP)
  add_definitions(-DNORM_OP)
endif()
D
dolphin8 已提交
410 411 412
if (BATCHNORM_OP)
  add_definitions(-DBATCHNORM_OP)
endif()
413 414 415
if (INSTANCENORM_OP)
  add_definitions(-DINSTANCENORM_OP)
endif()
D
dolphin8 已提交
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430
if (BOXCODER_OP)
  add_definitions(-DBOXCODER_OP)
endif()
if (CONCAT_OP)
  add_definitions(-DCONCAT_OP)
endif()
if (CONV_OP)
  add_definitions(-DCONV_OP)
endif()
if (DEPTHWISECONV_OP)
  add_definitions(-DDEPTHWISECONV_OP)
endif()
if (ELEMENTWISEADD_OP)
  add_definitions(-DELEMENTWISEADD_OP)
endif()
431 432 433
if (ELEMENTWISESUB_OP)
  add_definitions(-DELEMENTWISESUB_OP)
endif()
L
lijiancheng0614 已提交
434 435 436
if (FILL_CONSTANT_OP)
  add_definitions(-DFILL_CONSTANT_OP)
endif()
D
dolphin8 已提交
437 438 439
if (FUSION_CONVADD_OP)
  add_definitions(-DFUSION_CONVADD_OP)
endif()
Z
zhangyang 已提交
440 441
if (FUSION_CONVADDRELU_OP)
  add_definitions(-DFUSION_CONVADDRELU_OP)
D
dolphin8 已提交
442
endif()
443 444 445 446 447 448
if (FUSION_CONVADDPRELU_OP)
  add_definitions(-DFUSION_CONVADDPRELU_OP)
endif()
if (FUSION_CONVADDADDPRELU_OP)
  add_definitions(-DFUSION_CONVADDADDPRELU_OP)
endif()
D
dolphin8 已提交
449 450 451 452 453 454 455 456 457 458 459 460
if (FUSION_FC_OP)
  add_definitions(-DFUSION_FC_OP)
endif()
if (LRN_OP)
  add_definitions(-DLRN_OP)
endif()
if (MUL_OP)
  add_definitions(-DMUL_OP)
endif()
if (MULTICLASSNMS_OP)
  add_definitions(-DMULTICLASSNMS_OP)
endif()
L
lijiancheng0614 已提交
461 462 463
if (POLYGONBOXTRANSFORM_OP)
  add_definitions(-DPOLYGONBOXTRANSFORM_OP)
endif()
D
dolphin8 已提交
464 465 466 467 468 469 470 471 472 473 474 475
if (POOL_OP)
  add_definitions(-DPOOL_OP)
endif()
if (PRIORBOX_OP)
  add_definitions(-DPRIORBOX_OP)
endif()
if (RELU_OP)
  add_definitions(-DRELU_OP)
endif()
if (RESHAPE_OP)
  add_definitions(-DRESHAPE_OP)
endif()
L
lijiancheng0614 已提交
476 477 478
if (RESHAPE2_OP)
  add_definitions(-DRESHAPE2_OP)
endif()
D
dolphin8 已提交
479 480 481 482 483 484 485 486 487
if (SIGMOID_OP)
  add_definitions(-DSIGMOID_OP)
endif()
if (SOFTMAX_OP)
  add_definitions(-DSOFTMAX_OP)
endif()
if (TRANSPOSE_OP)
  add_definitions(-DTRANSPOSE_OP)
endif()
L
lijiancheng0614 已提交
488 489 490
if (TRANSPOSE2_OP)
  add_definitions(-DTRANSPOSE2_OP)
endif()
E
eclipsess 已提交
491 492 493
if (FUSION_CONVADDBNRELU_OP)
  add_definitions(-DFUSION_CONVADDBNRELU_OP)
endif()
E
eclipsess 已提交
494 495 496
if (FUSION_DWCONVBNRELU_OP)
  add_definitions(-DFUSION_DWCONVBNRELU_OP)
endif()
497 498 499 500 501

if (FUSION_CONVBNRELU_OP)
  add_definitions(-DFUSION_CONVBNRELU_OP)
endif()

502 503 504 505
if (FUSION_CONVRELU_OP)
  add_definitions(-DFUSION_CONVRELU_OP)
endif()

506 507 508 509
if (FUSION_CONVBNADDRELU_OP)
  add_definitions(-DFUSION_CONVBNADDRELU_OP)
endif()

T
Tian 已提交
510 511 512 513 514 515 516 517 518 519 520
if (PRELU_OP)
  add_definitions(-DPRELU_OP)
endif()
if (RESIZE_OP)
  add_definitions(-DRESIZE_OP)
endif()
if (SCALE_OP)
  add_definitions(-DSCALE_OP)
endif()
if (SLICE_OP)
  add_definitions(-DSLICE_OP)
L
liuruilong 已提交
521
endif()
Y
Yao,kun 已提交
522 523 524
if (DROPOUT_OP)
  add_definitions(-DDROPOUT_OP)
endif()
Y
bugfix  
Yao,kun 已提交
525 526
if (IM2SEQUENCE_OP)
  add_definitions(-DIM2SEQUENCE_OP)
T
Tian 已提交
527
endif()
Z
zhangyang 已提交
528

Z
zhangyang 已提交
529 530
if (FUSION_CONVADDBN_OP)
  add_definitions(-DFUSION_CONVADDBN_OP)
Z
zhangyang 已提交
531
endif()
Z
zhangyang 已提交
532 533
if (FUSION_FCRELU_OP)
  add_definitions(-DFUSION_FCRELU_OP)
Z
zhangyang 已提交
534 535 536 537 538 539 540
endif()
if (FUSION_POOLBN_OP)
  add_definitions(-DFUSION_POOLBN_OP)
endif()
if (FUSION_ELEMENTWISEADDRELU_OP)
  add_definitions(-DFUSION_ELEMENTWISEADDRELU_OP)
endif()
Z
zhangyang 已提交
541 542
if (FUSION_CONVBN_OP)
  add_definitions(-DFUSION_CONVBN_OP)
Z
zhangyang 已提交
543 544
endif()

L
liuruilong 已提交
545
if (CONV_TRANSPOSE_OP)
H
hjchen2 已提交
546
  add_definitions(-DCONV_TRANSPOSE_OP)
L
liuruilong 已提交
547
endif()
xiebaiyuan's avatar
xiebaiyuan 已提交
548 549 550 551 552 553 554 555 556

if (LOOKUP_OP)
  add_definitions(-DLOOKUP_OP)
endif()

if (GRU_OP)
  add_definitions(-DGRU_OP)
endif()

Z
zhaojiaying01 已提交
557 558 559 560
if (GRU_UNIT_OP)
  add_definitions(-DGRU_UNIT_OP)
endif()

xiebaiyuan's avatar
xiebaiyuan 已提交
561 562 563
if (CRF_OP)
  add_definitions(-DCRF_OP)
endif()
564 565 566 567 568 569


if (FLATTEN_OP)
  add_definitions(-DFLATTEN_OP)
endif()

570 571 572 573
if (FLATTEN2_OP)
  add_definitions(-DFLATTEN2_OP)
endif()

574 575 576 577 578 579 580 581 582 583
if (SPLIT_OP)
  add_definitions(-DSPLIT_OP)
endif()

if (BILINEAR_INTERP_OP)
  add_definitions(-DBILINEAR_INTERP_OP)
endif()

if (SHAPE_OP)
  add_definitions(-DSHAPE_OP)
H
hjchen2 已提交
584
endif()
E
debug  
eclipsess 已提交
585 586 587 588 589 590 591

if (ELEMENTWISEMUL_OP)
  add_definitions(-DELEMENTWISEMUL_OP)
endif()
if (SUM_OP)
  add_definitions(-DSUM_OP)
endif()
H
hjchen2 已提交
592 593 594 595 596 597
if (TOP_K_OP)
  add_definitions(-DTOP_K_OP)
endif()
if (CAST_OP)
  add_definitions(-DCAST_OP)
endif()
598 599 600 601 602 603
if (QUANT_OP)
  add_definitions(-DQUANT_OP)
endif()
if (DEQUANT_OP)
  add_definitions(-DDEQUANT_OP)
endif()
604 605 606
if (FUSION_DEQUANT_BN_OP)
  add_definitions(-DFUSION_DEQUANT_BN_OP)
endif()
607 608 609 610 611 612 613
if (FUSION_DEQUANT_ADD_BN_OP)
  add_definitions(-DFUSION_DEQUANT_ADD_BN_OP)
endif()
if (FUSION_DEQUANT_BN_RELU_OP)
  add_definitions(-DFUSION_DEQUANT_BN_RELU_OP)
endif()
if (FUSION_DEQUANT_ADD_BN_RELU_OP)
H
hjchen2 已提交
614 615
  add_definitions(-DFUSION_DEQUANT_ADD_BN_RELU_OP)
endif()
616 617 618 619 620 621
if (FUSION_DEQUANT_ADD_BN_QUANT_OP)
#  add_definitions(-DFUSION_DEQUANT_ADD_BN_QUANT_OP)
endif()
if (FUSION_DEQUANT_ADD_BN_RELU_QUANT_OP)
#  add_definitions(-DFUSION_DEQUANT_ADD_BN_RELU_QUANT_OP)
endif()
622 623 624 625 626 627
if (SEQUENCE_EXPAND_OP)
  add_definitions(-DSEQUENCE_EXPAND_OP)
endif()
if (SEQUENCE_POOL_OP)
  add_definitions(-DSEQUENCE_POOL_OP)
endif()
H
hjchen2 已提交
628 629 630
if (SEQUENCE_SOFTMAX_OP)
  add_definitions(-DSEQUENCE_SOFTMAX_OP)
endif()
631 632 633
if (LOG_OP)
  add_definitions(-DLOG_OP)
endif()
634 635 636 637 638 639
if (LOD_RESET_OP)
  add_definitions(-DLOD_RESET_OP)
endif()
if (LESS_THAN_OP)
  add_definitions(-DLESS_THAN_OP)
endif()
640 641 642 643 644 645 646 647 648 649 650 651
if (LOGICAL_AND_OP)
  add_definitions(-DLOGICAL_AND_OP)
endif()
if (LOGICAL_OR_OP)
  add_definitions(-DLOGICAL_OR_OP)
endif()
if (LOGICAL_NOT_OP)
  add_definitions(-DLOGICAL_NOT_OP)
endif()
if (LOGICAL_XOR_OP)
  add_definitions(-DLOGICAL_XOR_OP)
endif()
652

Z
zhangyang 已提交
653 654 655 656 657
if (TANH_OP)
  add_definitions(-DTANH_OP)
endif()
if (FUSION_DECONVRELU_OP)
  add_definitions(-DFUSION_DECONVRELU_OP)
qnqinan's avatar
qnqinan 已提交
658 659 660 661 662 663
endif()
if (FUSION_DECONVADD_OP)
  add_definitions(-DFUSION_DECONVADD_OP)
endif()
if (FUSION_DECONVADDRELU_OP)
  add_definitions(-DFUSION_DECONVADDRELU_OP)
H
hjchen2 已提交
664
endif()
665 666 667 668 669 670 671 672 673
if (WHILE_OP)
  add_definitions(-DWHILE_OP)
endif()
if (WRITE_TO_ARRAY_OP)
  add_definitions(-DWRITE_TO_ARRAY_OP)
endif()
if (READ_FROM_ARRAY_OP)
  add_definitions(-DREAD_FROM_ARRAY_OP)
endif()
Z
zhaojiaying01 已提交
674 675 676 677 678
if (IS_EMPTY_OP)
  add_definitions(-DIS_EMPTY_OP)
endif()
if (INCREMENT_OP)
  add_definitions(-DINCREMENT_OP)
679
endif()
680 681 682 683 684 685 686 687 688 689

if (ANCHOR_GENERATOR_OP)
  add_definitions(-DANCHOR_GENERATOR_OP)
endif()
if (PROPOSAL_OP)
  add_definitions(-DPROPOSAL_OP)
endif()
if (PSROI_POOL_OP)
  add_definitions(-DPSROI_POOL_OP)
endif()
690 691 692
if (ROIALIGN_POOL_OP)
  add_definitions(-DROIALIGN_POOL_OP)
endif()
H
hjchen2 已提交
693 694 695
if (ROI_PERSPECTIVE_OP)
  add_definitions(-DROI_PERSPECTIVE_OP)
endif()
696 697 698
if (BEAM_SEARCH_OP)
  add_definitions(-DBEAM_SEARCH_OP)
endif()
H
update  
hjchen2 已提交
699 700
if (BEAM_SEARCH_DECODE_OP)
  add_definitions(-DBEAM_SEARCH_DECODE_OP)
H
update  
hjchen2 已提交
701
endif()
702 703 704
if (FUSION_DECONVADDBNRELU_OP)
  add_definitions(-DFUSION_DECONVADDBNRELU_OP)
endif()
705 706 707
if (FUSION_DECONVBNRELU_OP)
  add_definitions(-DFUSION_DECONVBNRELU_OP)
endif()
708 709
if (FUSION_DECONVADDBN_OP)
  add_definitions(-DFUSION_DECONVADDBN_OP)
H
update  
hjchen2 已提交
710
endif()
H
hjchen2 已提交
711 712 713
if (PAD2D_OP)
  add_definitions(-DPAD2D_OP)
endif()
714 715 716
if (ONE_HOT_OP)
  add_definitions(-DONE_HOT_OP)
endif()
717 718 719
if (ASSIGN_VALUE_OP)
  add_definitions(-DASSIGN_VALUE_OP)
endif()
720 721
if (LEAKY_RELU_OP)
  add_definitions(-DLEAKY_RELU_OP)
722 723 724 725
endif()
if (NEAREST_INTERP_OP)
  add_definitions(-DNEAREST_INTERP_OP)
endif()
Z
zp7 已提交
726 727 728
if (DENSITY_PRIORBOX_OP)
  add_definitions(-DDENSITY_PRIORBOX_OP)
endif()
H
Huie 已提交
729 730 731
if (EXP_OP)
  add_definitions(-DEXP_OP)
endif ()
732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749
if (ASSIGN_OP)
  add_definitions(-DASSIGN_OP)
endif()
if (CONDITIONAL_BLOCK_OP)
  add_definitions(-DCONDITIONAL_BLOCK_OP)
endif()
if (EQUAL_OP)
  add_definitions(-DEQUAL_OP)
endif()
if (FILL_CONSTANT_BATCH_SIZE_LIKE_OP)
  add_definitions(-DFILL_CONSTANT_BATCH_SIZE_LIKE_OP)
endif()
if (RANGE_OP)
  add_definitions(-DRANGE_OP)
endif()
if (REDUCE_PROD_OP)
  add_definitions(-DREDUCE_PROD_OP)
endif()