Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhenhai93 committed Jan 2, 2024
1 parent 6aa5a27 commit 1ca6d98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmake/inference_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,18 @@ copy(
inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/visit_type.h
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/core/)

copy(
inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/hostdevice.h
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/core/)

copy(
inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/core/distributed/auto_parallel/*.h
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/paddle/phi/core/distributed/auto_parallel/
)

copy(
inference_lib_dist
SRCS ${PADDLE_SOURCE_DIR}/paddle/fluid/platform/init_phi.h
Expand Down
5 changes: 4 additions & 1 deletion test/cpp/auto_parallel/custom_op_spmd_rule_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ TEST(CustomOp, Ctor) {
infered_dist_attrs.first[0]));
EXPECT_TRUE(paddle::holds_alternative<phi::distributed::TensorDistAttr>(
infered_dist_attrs.second[0]));
auto& inputs_infer1 = paddle::get<1>(infered_dist_attrs.first[0]);
auto& inputs_infer1 =
PADDLE_GET_CONST(std::vector<phi::distributed::TensorDistAttr>,
infered_dist_attrs.first[0]);

for (auto e : inputs_infer1) {
check_dim_mapping(e, {-1, 1, 0});
check_partial_dims(e, {});
Expand Down

0 comments on commit 1ca6d98

Please sign in to comment.