Skip to content

Commit 3355ec8

Browse files
authored
【NPU】fix npu profile build (#1400)
1 parent 236accc commit 3355ec8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

backends/npu/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ add_custom_command(
158158
${CMAKE_CURRENT_BINARY_DIR}/python/paddle_custom_device/npu/passes
159159
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/passes/*
160160
${CMAKE_CURRENT_BINARY_DIR}/python/paddle_custom_device/npu/passes
161+
COMMAND ${CMAKE_COMMAND} -E make_directory
162+
${CMAKE_CURRENT_BINARY_DIR}/python/paddle_custom_device/npu/profile
163+
COMMAND ${CMAKE_COMMAND} -E remove -f
164+
${CMAKE_CURRENT_BINARY_DIR}/python/paddle_custom_device/npu/profile
165+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/profile/*
166+
${CMAKE_CURRENT_BINARY_DIR}/python/paddle_custom_device/npu/profile
161167
COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py bdist_wheel
162168
DEPENDS ${CUSTOM_NPU_NAME}
163169
COMMENT "Packing whl packages------>>>")

backends/npu/setup.py.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ def main():
114114
packages= [
115115
'paddle_custom_device',
116116
'paddle_custom_device.npu',
117-
'paddle_custom_device.npu.passes'
117+
'paddle_custom_device.npu.passes',
118+
'paddle_custom_device.npu.profile'
118119
],
119120
include_package_data=True,
120121
package_data = {

0 commit comments

Comments
 (0)