1 Star 0 Fork 450

sodojun/Paddle

forked from PaddlePaddle/Paddle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mpi.cmake 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
wuhuachaocoding 提交于 2022-09-21 14:49 . Mpi final dev simple (#46247)
if(NOT WITH_DISTRIBUTE OR NOT WITH_MPI)
return()
endif()
find_package(MPI)
if(NOT MPI_CXX_FOUND)
set(WITH_MPI
OFF
CACHE STRING "Disable MPI" FORCE)
message(WARNING "Not found MPI support in current system")
return()
endif()
message(STATUS "MPI compile flags: " ${MPI_CXX_COMPILE_FLAGS})
message(STATUS "MPI include path: " ${MPI_CXX_INCLUDE_PATH})
message(STATUS "MPI LINK flags path: " ${MPI_CXX_LINK_FLAGS})
message(STATUS "MPI libraries: " ${MPI_CXX_LIBRARIES})
include_directories(SYSTEM ${MPI_CXX_INCLUDE_PATH})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS}")
add_definitions("-DPADDLE_WITH_MPI")
find_program(
OMPI_INFO
NAMES ompi_info
HINTS ${MPI_CXX_LIBRARIES}/../bin)
if(OMPI_INFO)
execute_process(COMMAND ${OMPI_INFO} OUTPUT_VARIABLE output_)
if(output_ MATCHES "smcuda")
#NOTE some mpi lib support mpi cuda aware.
add_definitions("-DPADDLE_WITH_MPI_AWARE")
endif()
endif()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/sodojun/Paddle.git
[email protected]:sodojun/Paddle.git
sodojun
Paddle
Paddle
develop

搜索帮助