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

fix xpu kp compilation (#43496)

* fix xpu kp compilation

* add depends
上级 238f82e6
......@@ -133,8 +133,16 @@ endif()
if(WITH_XPU)
if(WITH_XPU_KP)
file(GLOB kernel_xpu_kps "kps/*.cu")
xpu_add_library(phi_xpu STATIC ${kernel_xpu} ${kernel_xpu_kps})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/kps/
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/kps/)
file(GLOB kernel_xpu_kps "${CMAKE_CURRENT_BINARY_DIR}/kps/*.cu")
foreach(kernel ${kernel_xpu_kps})
get_filename_component(name ${kernel} NAME_WE)
file(RENAME ${kernel} "${CMAKE_CURRENT_BINARY_DIR}/kps/${name}.kps")
endforeach()
file(GLOB kernel_xpu_kps "${CMAKE_CURRENT_BINARY_DIR}/kps/*.kps")
xpu_add_library(phi_xpu STATIC ${kernel_xpu} ${kernel_xpu_kps} DEPENDS
${COMMON_KERNEL_DEPS})
else()
add_library(phi_xpu ${kernel_xpu})
endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册