未验证 提交 bc93452d 编写于 作者: L Leo Chen 提交者: GitHub

fix cinn compilation with py38 (#49883)

上级 f6b23d6d
...@@ -22,6 +22,10 @@ if(WITH_ROCM) ...@@ -22,6 +22,10 @@ if(WITH_ROCM)
target_link_libraries(eager_generator ${ROCM_HIPRTC_LIB}) target_link_libraries(eager_generator ${ROCM_HIPRTC_LIB})
endif() endif()
if(WITH_CINN)
target_link_libraries(eager_generator ${PYTHON_LIBRARIES})
endif()
# Prepare file structure # Prepare file structure
message( message(
"Generate dygraph file structure at path: ${PADDLE_SOURCE_DIR}/paddle/fluid/eager/generated" "Generate dygraph file structure at path: ${PADDLE_SOURCE_DIR}/paddle/fluid/eager/generated"
......
...@@ -60,6 +60,7 @@ if(WITH_TESTING) ...@@ -60,6 +60,7 @@ if(WITH_TESTING)
elementwise_add_op elementwise_add_op
generated_op) generated_op)
set_tests_properties(build_cinn_pass_test PROPERTIES LABELS "RUN_TYPE=CINN") set_tests_properties(build_cinn_pass_test PROPERTIES LABELS "RUN_TYPE=CINN")
target_link_libraries(build_cinn_pass_test ${PYTHON_LIBRARIES})
cc_test_old(transform_desc_test SRCS transform_desc_test.cc DEPS cc_test_old(transform_desc_test SRCS transform_desc_test.cc DEPS
transform_desc) transform_desc)
......
...@@ -44,6 +44,7 @@ if(WITH_TESTING) ...@@ -44,6 +44,7 @@ if(WITH_TESTING)
cinn_launch_context cinn_launch_context
cinn_instruction_run_op cinn_instruction_run_op
cinn) cinn)
target_link_libraries(cinn_launch_context_test ${PYTHON_LIBRARIES})
set_tests_properties(cinn_launch_context_test PROPERTIES LABELS set_tests_properties(cinn_launch_context_test PROPERTIES LABELS
"RUN_TYPE=CINN") "RUN_TYPE=CINN")
...@@ -73,6 +74,7 @@ if(WITH_TESTING) ...@@ -73,6 +74,7 @@ if(WITH_TESTING)
cinn_launch_op cinn_launch_op
cinn_instruction_run_op cinn_instruction_run_op
elementwise_add_op) elementwise_add_op)
target_link_libraries(cinn_instruction_run_op_test ${PYTHON_LIBRARIES})
set_tests_properties( set_tests_properties(
cinn_instruction_run_op_test PROPERTIES LABELS "RUN_TYPE=CINN" ENVIRONMENT cinn_instruction_run_op_test PROPERTIES LABELS "RUN_TYPE=CINN" ENVIRONMENT
"${CINN_RUN_ENVIRONMENT}") "${CINN_RUN_ENVIRONMENT}")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册