Skip to content

Commit

Permalink
support DCU(rocm)
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate committed Sep 29, 2024
1 parent 49ba5a5 commit f1cae59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ if(ENABLE_PADDLE)
link_directories("${PADDLE_LIB_THIRD_PARTY_PATH}gflags/lib")
link_directories("${PADDLE_LIB_THIRD_PARTY_PATH}xxhash/lib")
link_directories("${PADDLE_INFERENCE_DIR}/paddle/lib")
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
endif(ENABLE_PADDLE)

if(BUILD_TESTING)
Expand Down
4 changes: 4 additions & 0 deletions source/api_cc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ endif()
if(ENABLE_PADDLE AND NOT BUILD_PY_IF)
target_link_libraries(${libname} PUBLIC "${PADDLE_LIBRARIES}")
target_compile_definitions(${libname} PUBLIC BUILD_PADDLE)
if(DP_VARIANT STREQUAL "rocm")
target_link_libraries(${libname}
PUBLIC "${hip_LIB_INSTALL_DIR}/libgalaxyhip.so")
endif()
endif()

target_include_directories(
Expand Down

0 comments on commit f1cae59

Please sign in to comment.