Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
02384bc6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
02384bc6
编写于
1月 16, 2023
作者:
L
Leo Chen
提交者:
GitHub
1月 16, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ninja compilation for cinn (#49838)
上级
07514139
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
8 deletion
+15
-8
cmake/external/cinn.cmake
cmake/external/cinn.cmake
+9
-5
setup.py
setup.py
+6
-3
未找到文件。
cmake/external/cinn.cmake
浏览文件 @
02384bc6
...
...
@@ -40,7 +40,12 @@ set(CINN_OPTIONAL_ARGS
-DWITH_MKLDNN=
${
WITH_MKL
}
-DPUBLISH_LIBS=ON
-DWITH_TESTING=ON
)
set
(
CINN_BUILD_COMMAND $
(
MAKE
)
cinnapi -j
)
set
(
CINN_BUILD_COMMAND
${
CMAKE_COMMAND
}
--build . --target cinnapi -j
)
set
(
CINN_BINARY_DIR
${
CINN_PREFIX_DIR
}
/src/external_cinn-build
)
set
(
CINN_LIB_NAME
"libcinnapi.so"
)
set
(
CINN_LIB_LOCATION
"
${
CINN_BINARY_DIR
}
/dist/cinn/lib"
)
set
(
CINN_LIB
"
${
CINN_LIB_LOCATION
}
/
${
CINN_LIB_NAME
}
"
)
ExternalProject_Add
(
external_cinn
${
EXTERNAL_PROJECT_LOG_ARGS
}
...
...
@@ -49,11 +54,12 @@ ExternalProject_Add(
PREFIX
${
CINN_PREFIX_DIR
}
BUILD_COMMAND
${
CINN_BUILD_COMMAND
}
INSTALL_COMMAND
""
CMAKE_ARGS
${
CINN_OPTIONAL_ARGS
}
)
CMAKE_ARGS
${
CINN_OPTIONAL_ARGS
}
CMAKE_GENERATOR
"Unix Makefiles"
BUILD_BYPRODUCTS
${
CINN_LIB
}
)
ExternalProject_Get_Property
(
external_cinn BINARY_DIR
)
ExternalProject_Get_Property
(
external_cinn SOURCE_DIR
)
set
(
CINN_BINARY_DIR
${
BINARY_DIR
}
)
set
(
CINN_SOURCE_DIR
${
SOURCE_DIR
}
)
message
(
STATUS
"CINN BINARY_DIR:
${
CINN_BINARY_DIR
}
"
)
...
...
@@ -79,8 +85,6 @@ include_directories(${LLVM_INCLUDE_DIR})
# Put external_cinn and dependencies together as a lib
######################################################
set
(
CINN_LIB_NAME
"libcinnapi.so"
)
set
(
CINN_LIB_LOCATION
"
${
CINN_BINARY_DIR
}
/dist/cinn/lib"
)
set
(
CINN_INCLUDE_DIR
"
${
CINN_BINARY_DIR
}
/dist/cinn/include"
)
add_library
(
cinn SHARED IMPORTED GLOBAL
)
...
...
setup.py
浏览文件 @
02384bc6
...
...
@@ -591,8 +591,8 @@ def options_process(args, build_options):
def
get_cmake_generator
():
if
os
.
getenv
(
"
CMAKE_
GENERATOR"
):
cmake_generator
=
os
.
getenv
(
"
CMAKE_
GENERATOR"
)
if
os
.
getenv
(
"GENERATOR"
):
cmake_generator
=
os
.
getenv
(
"GENERATOR"
)
else
:
cmake_generator
=
"Unix Makefiles"
return
cmake_generator
...
...
@@ -628,7 +628,7 @@ def cmake_run(build_path):
"XPU_SDK_ROOT"
,
"MSVC_STATIC_CRT"
,
"NEW_RELEASE_ALL"
,
"
CMAKE_
GENERATOR"
,
"GENERATOR"
,
)
}
)
...
...
@@ -647,10 +647,13 @@ def cmake_run(build_path):
elif
option_key
==
'PYTHON_INCLUDE_DIR'
:
key
=
option_key
+
':PATH'
print
(
key
)
elif
option_key
==
'GENERATOR'
:
key
=
'CMAKE_'
+
option_key
else
:
key
=
other_options
[
option_key
]
if
key
not
in
paddle_build_options
:
paddle_build_options
[
key
]
=
option_value
options_process
(
args
,
paddle_build_options
)
print
(
"args:"
,
args
)
with
cd
(
build_path
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录