diff --git a/inferrt/src/pybind/mrt/CMakeLists.txt b/inferrt/src/pybind/mrt/CMakeLists.txt index 9750b22b960d7434ca9f4b2e4af60abc8b91094d..3eed349731487af7be454aa485a2b209ae921f5e 100644 --- a/inferrt/src/pybind/mrt/CMakeLists.txt +++ b/inferrt/src/pybind/mrt/CMakeLists.txt @@ -20,27 +20,17 @@ pybind11_add_module(_mrt_ir NO_EXTRAS pybind11_ir.cc) target_link_libraries(_mrt_ir PUBLIC inferrt) # Add collective pybind11 sub module -if(ENABLE_ASCEND) - if(DEFINED ENV{ASCEND_CUSTOM_PATH}) - set(ASCEND_PATH $ENV{ASCEND_CUSTOM_PATH}) - else() - set(ASCEND_PATH /usr/local/Ascend) - endif() - include_directories(${ASCEND_PATH}/latest/include/) - include_directories(${ASCEND_PATH}/latest/lib64/) - include_directories(${ASCEND_PATH}/latest/aarch64-linux/include/experiment) - pybind11_add_module(_mrt_collective NO_EXTRAS pybind11_collective.cc) - target_link_libraries(_mrt_collective PUBLIC inferrt hardware_ascend) - set_target_properties(_mrt_collective PROPERTIES - INSTALL_RPATH "$ORIGIN:$ORIGIN/lib" - BUILD_WITH_INSTALL_RPATH TRUE - ) - install( - TARGETS _mrt_collective - LIBRARY DESTINATION . - RUNTIME DESTINATION bin - ) -endif() +pybind11_add_module(_mrt_collective NO_EXTRAS pybind11_collective.cc) +target_link_libraries(_mrt_collective PRIVATE inferrt) +set_target_properties(_mrt_collective PROPERTIES + INSTALL_RPATH "$ORIGIN:$ORIGIN/lib" + BUILD_WITH_INSTALL_RPATH TRUE +) +install( + TARGETS _mrt_collective + LIBRARY DESTINATION . + RUNTIME DESTINATION bin +) set_target_properties(_mrt_ir PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/lib"