Skip to content

Commit d388acd

Browse files
authored
[compilation opt]change_cc_test_old (#59978)
* change_re * update * update * update
1 parent 3c58567 commit d388acd

6 files changed

Lines changed: 26 additions & 25 deletions

File tree

paddle/fluid/framework/details/gather_op_handle.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
#include "paddle/fluid/framework/details/container_cast.h"
1818
#include "paddle/fluid/framework/details/variable_visitor.h"
19+
#include "paddle/fluid/platform/init_phi.h"
20+
21+
REGISTER_FILE_SYMBOLS(gather_op_handle);
1922

2023
namespace phi {
2124
class DenseTensor;

paddle/fluid/framework/op_compatible_info.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
#include "paddle/fluid/framework/op_compatible_info.h"
1616

1717
#include "paddle/fluid/platform/enforce.h"
18+
#include "paddle/fluid/platform/init_phi.h"
1819
#include "paddle/fluid/string/string_helper.h"
1920

21+
REGISTER_FILE_SYMBOLS(op_compatible_info);
2022
namespace paddle {
2123
namespace framework {
2224

paddle/fluid/pybind/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ set(PYBIND_DEPS
4747
new_profiler
4848
fluid_jit
4949
prim_utils
50+
gather_op_handle
5051
static_tensor_operants
5152
type_info
5253
auto_parallel)

paddle/fluid/pybind/pybind.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ PYBIND11_MAKE_OPAQUE(paddle::framework::FetchType);
222222

223223
DECLARE_FILE_SYMBOLS(init_phi);
224224
DECLARE_FILE_SYMBOLS(kernel_dialect);
225+
DECLARE_FILE_SYMBOLS(op_compatible_info);
226+
DECLARE_FILE_SYMBOLS(gather_op_handle);
225227
namespace paddle {
226228
namespace pybind {
227229

test/cpp/fluid/framework/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,10 @@ cc_test(
263263
SRCS dlpack_tensor_test.cc
264264
DEPS dlpack_tensor glog)
265265

266-
cc_test_old(
266+
cc_test(
267267
op_compatible_info_test
268-
SRCS
269-
op_compatible_info_test.cc
270-
DEPS
271-
op_compatible_info
272-
proto_desc
273-
string_helper
274-
glog)
268+
SRCS op_compatible_info_test.cc
269+
DEPS op_compatible_info proto_desc string_helper glog)
275270

276271
cc_test(
277272
infershape_utils_test
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
paddle_test(broadcast_op_test SRCS broadcast_op_handle_test.cc)
22

3-
cc_test_old(
3+
cc_test(
44
gather_op_test
5-
SRCS
6-
gather_op_handle_test.cc
7-
DEPS
8-
var_handle
9-
op_handle_base
10-
scope
11-
phi
12-
common
13-
memory
14-
device_context
15-
gather_op_handle)
5+
SRCS gather_op_handle_test.cc
6+
DEPS var_handle
7+
op_handle_base
8+
scope
9+
phi
10+
common
11+
memory
12+
device_context
13+
gather_op_handle)
1614

1715
paddle_test(fused_broadcast_op_test SRCS fused_broadcast_op_handle_test.cc)
1816
paddle_test(exception_holder_test SRCS exception_holder_test.cc)
@@ -23,9 +21,9 @@ cc_test(
2321
DEPS build_strategy op_registry op_proto_maker graph string_helper)
2422

2523
if(WITH_ONNXRUNTIME AND WIN32)
26-
# Copy onnxruntime for some c++ test in Windows, since the test will
27-
# be build only in CI, so suppose the generator in Windows is Ninja.
28-
copy_onnx(broadcast_op_test)
29-
copy_onnx(fused_broadcast_op_test)
30-
copy_onnx(exception_holder_test)
24+
# Copy onnxruntime for some c++ test in Windows, since the test will
25+
# be build only in CI, so suppose the generator in Windows is Ninja.
26+
copy_onnx(broadcast_op_test)
27+
copy_onnx(fused_broadcast_op_test)
28+
copy_onnx(exception_holder_test)
3129
endif()

0 commit comments

Comments
 (0)