Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CINN] Refine cmake for pass in cinn #60683

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 13 additions & 44 deletions paddle/cinn/hlir/dialect/operator/transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,19 @@
add_subdirectory(group_merge)

if(NOT CINN_ONLY)

cinn_cc_library(
pd_to_cinn_pass
SRCS
pd_to_cinn_pass.cc
DEPS
drr
cinn_op_dialect
op_dialect_vjp)

cinn_cc_library(
add_broadcast_to_elementwise_pass
SRCS
add_broadcast_to_elementwise_pass.cc
DEPS
pir
cinn_op_dialect
op_dialect_vjp)

cinn_cc_library(
fuse_shape_ops_into_generate_shape_op_pass
SRCS
fuse_shape_ops_into_generate_shape_op_pass.cc
DEPS
pir
cinn_op_dialect
op_dialect_vjp)
file(GLOB_RECURSE cinn_transforms_srcs "*.cc")

cinn_cc_library(
fully_insert_broadcast_pass
SRCS
fully_insert_broadcast_pass.cc
DEPS
pir
cinn_op_dialect
op_dialect_vjp)
set(cinn_transforms_deps
pir
drr
op_dialect
cinn_op_dialect
op_dialect_vjp
cinn_runtime_dialect
pir_compiler)

cinn_cc_library(
split_generate_shape_into_shape_ops_pass
SRCS
split_generate_shape_into_shape_ops_pass.cc
DEPS
pir
cinn_op_dialect
op_dialect_vjp)
cc_library(
cinn_transforms
SRCS ${cinn_transforms_srcs}
DEPS ${cinn_transforms_deps})

endif()

This file was deleted.

12 changes: 2 additions & 10 deletions paddle/fluid/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,8 @@ set(PYBIND_DEPS
auto_parallel)

if(WITH_CINN)
set(PYBIND_DEPS
${PYBIND_DEPS}
pir_transforms
op_with_group_merge_pass
add_broadcast_to_elementwise_pass
pd_to_cinn_pass
sub_graph_checker
fully_insert_broadcast_pass
fuse_shape_ops_into_generate_shape_op_pass
split_generate_shape_into_shape_ops_pass)
set(PYBIND_DEPS ${PYBIND_DEPS} pir_transforms cinn_transforms
sub_graph_checker)
endif()

if(WITH_PSCORE)
Expand Down