CMakeLists.txt 3.3 KB
Newer Older
Y
Yan Chunwei 已提交
1
# Add TRT tests
2 3 4 5
list(
  APPEND
  CONVERT_FILES
  matmul_op.cc
6
  matmul_v2_op.cc
7
  bmm_op.cc
8 9 10 11 12 13 14 15 16 17 18
  conv2d_op.cc
  fc_op.cc
  pool2d_op.cc
  elementwise_op.cc
  batch_norm_op.cc
  activation_op.cc
  unary_op.cc
  softmax_op.cc
  concat_op.cc
  dropout_op.cc
  group_norm_op.cc
19
  pad3d_op.cc
20 21
  pad_op.cc
  split_op.cc
22
  square_op.cc
23 24 25 26 27
  prelu_op.cc
  leaky_relu_op.cc
  gelu_op.cc
  layer_norm_op.cc
  multihead_matmul_op.cc
28
  multihead_matmul_roformer_op.cc
29 30
  flash_multihead_matmul_op.cc
  cross_multihead_matmul_op.cc
31
  qk_multihead_matmul_op.cc
32
  grid_sampler_op.cc
33
  shuffle_channel_op.cc
34
  fill_any_like_op.cc
35
  where_op.cc
36
  bitwise_not_op.cc
37
  one_hot_op.cc
38
  swish_op.cc
L
LielinJiang 已提交
39
  silu_op.cc
40 41 42 43 44 45 46 47 48 49 50 51
  instance_norm_op.cc
  stack_op.cc
  transpose_op.cc
  flatten_op.cc
  flatten_contiguous_range_op.cc
  skip_layernorm.cc
  scale_op.cc
  slice_op.cc
  hard_sigmoid_op.cc
  hard_swish_op.cc
  clip_op.cc
  gather_op.cc
X
xjmxyt 已提交
52
  index_select_op.cc
53 54 55 56
  anchor_generator_op.cc
  yolo_box_op.cc
  yolo_box_head_op.cc
  arg_max_op.cc
57
  arg_min_op.cc
58 59 60 61 62 63 64 65 66 67 68 69
  roi_align_op.cc
  affine_channel_op.cc
  multiclass_nms_op.cc
  multiclass_nms3_op.cc
  nearest_interp_op.cc
  reshape_op.cc
  reduce_op.cc
  gather_nd_op.cc
  tile_op.cc
  conv3d_op.cc
  mish_op.cc
  nearest_interp_v2_op.cc
70
  bilinear_interp_v2_op.cc
71 72 73 74 75 76
  pool3d_op.cc
  deformable_conv_op.cc
  strided_slice_op.cc
  preln_skip_layernorm.cc
  roll_op.cc
  transformer_input_convert_op.cc
C
ccrrong 已提交
77
  cast_op.cc
78
  remove_padding_op.cc
C
ccrrong 已提交
79
  equal_op.cc
80
  recover_padding_op.cc
81 82
  preln_residual_bias.cc
  c_allreduce_op.cc
83
  top_k_op.cc
84
  range_op.cc
85
  squeeze2_op.cc
86
  unsqueeze2_op.cc
Z
zhoutianzi666 已提交
87 88
  rnn_op.cc
  fill_constant_batch_size_like_op.cc
89 90
  sum_op.cc
  shape_op.cc
91
  fill_constant_op.cc
W
wenbin 已提交
92
  fused_token_prune_op.cc
93
  celu_op.cc
W
weishengying 已提交
94
  layernorm_shift_partition_op.cc
W
Wang Bojun 已提交
95
  reverse_roll_op.cc
96
  tanhshrink_op.cc
97
  take_along_axis_op.cc
98
  logsigmoid_op.cc
W
wenbin 已提交
99
  preln_layernorm_shift_partition_op.cc
100
  trans_layernorm_op.cc
W
Wang Bojun 已提交
101
  merge_layernorm_op.cc
W
wenbin 已提交
102
  skip_merge_layernorm_op.cc
103
  generic_and_custom_plugin_creater.cc
104
  fused_lookup_tables_op.cc
105
  elementwiseadd_transpose_op.cc
W
wenbin 已提交
106 107
  skip_groupnorm_act_op.cc
  preln_groupnorm_act_op.cc
108 109
  expand_v2_op.cc
  temporal_shift_op.cc)
110

111
if(${TENSORRT_MAJOR_VERSION} GREATER_EQUAL 7)
112 113 114 115
  list(APPEND CONVERT_FILES emb_eltwise_layernorm.cc
       preln_emb_eltwise_layernorm.cc)
endif()

116 117 118 119
if(CUSPARSELT_FOUND AND ${TENSORRT_MAJOR_VERSION} GREATER_EQUAL 8)
  list(APPEND CONVERT_FILES sparse_fc_op.cc sparse_multihead_matmul_op.cc)
endif()

X
xjmxyt 已提交
120 121 122 123 124
if(${TENSORRT_MAJOR_VERSION} GREATER_EQUAL 8 AND ${TENSORRT_MINOR_VERSION}
                                                 GREATER_EQUAL 2)
  list(APPEND CONVERT_FILES set_value_op.cc)
endif()

125 126
nv_library(
  tensorrt_converter
127
  SRCS ${CONVERT_FILES}
W
weishengying 已提交
128 129 130 131 132 133
  DEPS tensorrt_engine
       tensorrt_plugin
       operator
       scope
       framework_proto
       tensorrt_op_teller
134
       op_registry)
135

136 137 138 139 140
nv_test(
  test_op_converter
  SRCS test_op_converter.cc
  DEPS paddle_framework ${GLOB_OPERATOR_DEPS} tensorrt_engine
       tensorrt_converter)
141

W
weishengying 已提交
142 143 144
nv_test(
  test_custom_plugin_creater
  SRCS test_custom_plugin_creater.cc
145 146
  DEPS paddle_framework tensorrt_converter op_meta_info custom_operator
       init_phi)
W
weishengying 已提交
147

148 149 150 151 152
if(WITH_ONNXRUNTIME AND WIN32)
  # Copy onnxruntime for some c++ test in Windows, since the test will
  # be build only in CI, so suppose the generator in Windows is Ninja.
  copy_onnx(test_op_converter)
endif()