未验证 提交 68242726 编写于 作者: H HongyuJia 提交者: GitHub

[Expose Phi Headers] Expose kernel header files of phi to site-packages (#51685)

上级 4640f4be
......@@ -695,23 +695,19 @@ def find_files(pattern, root, recursive=False):
break
headers = (
# paddle level api headers
# paddle level api headers (high level api, for both training and inference)
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle')) +
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/api')) + # phi unify api header
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/api/ext')) + # custom op api
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/api/include')) + # phi api
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/common')) + # phi common headers
# phi level api headers (low level api)
# phi level api headers (low level api, for training only)
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi')) + # phi extension header
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/include', recursive=True)) + # phi include headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/backends', recursive=True)) + # phi backends headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/core', recursive=True)) + # phi core headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/infermeta', recursive=True)) + # phi infermeta headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/kernels')) + # phi kernels headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/kernels/sparse')) + # phi sparse kernels headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/kernels/selected_rows')) + # phi selected_rows kernels headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/kernels/strings')) + # phi sparse kernels headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/kernels/primitive')) + # phi kernel primitive api headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/kernels', recursive=True)) + # phi kernels headers
# capi headers
list(find_files('*.h', '@PADDLE_SOURCE_DIR@/paddle/phi/capi', recursive=True)) + # phi capi headers
# phi profiler headers
......
......@@ -1151,7 +1151,7 @@ def get_package_data_and_package_dir():
def get_headers():
headers = (
# paddle level api headers
# paddle level api headers (high level api, for both training and inference)
list(find_files('*.h', paddle_source_dir + '/paddle'))
+ list(find_files('*.h', paddle_source_dir + '/paddle/phi/api'))
+ list( # phi unify api header
......@@ -1163,54 +1163,43 @@ def get_headers():
+ list( # phi api
find_files('*.h', paddle_source_dir + '/paddle/phi/common')
)
+ list(
find_files('*.h', paddle_source_dir + '/paddle/phi')
) # phi common headers
# phi level api headers (low level api)
# phi level api headers (low level api, for training only)
+ list( # phi extension header
find_files('*.h', paddle_source_dir + '/paddle/phi')
)
+ list( # phi include header
find_files(
'*.h', paddle_source_dir + '/paddle/phi/include', recursive=True
)
)
+ list( # phi include headers
+ list( # phi backends headers
find_files(
'*.h',
paddle_source_dir + '/paddle/phi/backends',
recursive=True,
)
)
+ list( # phi backends headers
+ list( # phi core headers
find_files(
'*.h', paddle_source_dir + '/paddle/phi/core', recursive=True
)
)
+ list( # phi core headers
+ list( # phi infermeta headers
find_files(
'*.h',
paddle_source_dir + '/paddle/phi/infermeta',
recursive=True,
)
)
+ list( # phi infermeta headers
find_files('*.h', paddle_source_dir + '/paddle/phi/kernels')
)
+ list( # phi kernels headers
find_files('*.h', paddle_source_dir + '/paddle/phi/kernels/sparse')
)
+ list( # phi sparse kernels headers
find_files(
'*.h', paddle_source_dir + '/paddle/phi/kernels/selected_rows'
)
)
+ list( # phi selected_rows kernels headers
find_files('*.h', paddle_source_dir + '/paddle/phi/kernels/strings')
)
+ list( # phi sparse kernels headers
+ list( # phi kernel headers
find_files(
'*.h', paddle_source_dir + '/paddle/phi/kernels/primitive'
'*.h',
paddle_source_dir + '/paddle/phi/kernels',
recursive=True,
)
)
+ list( # capi headers
# phi capi headers
+ list(
find_files(
'*.h', paddle_source_dir + '/paddle/phi/capi', recursive=True
)
......@@ -1234,7 +1223,7 @@ def get_headers():
recursive=True,
)
)
) # paddle utils headers
)
jit_layer_headers = [
'layer.h',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册