Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
a9d3cef9
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
a9d3cef9
编写于
8月 10, 2023
作者:
Z
Zhenghai Zhang
提交者:
GitHub
8月 10, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cmake] add isl third_party cache (#55631)
* add isl third_party cache * fix bug * Update cinn.cmake
上级
dbd9743a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
47 addition
and
10 deletion
+47
-10
cmake/cinn.cmake
cmake/cinn.cmake
+1
-1
cmake/cinn/external/isl.cmake
cmake/cinn/external/isl.cmake
+46
-9
未找到文件。
cmake/cinn.cmake
浏览文件 @
a9d3cef9
...
@@ -331,7 +331,7 @@ set(ABSL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/dist/third_party/absl/include")
...
@@ -331,7 +331,7 @@ set(ABSL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/dist/third_party/absl/include")
include_directories
(
${
ABSL_INCLUDE_DIR
}
)
include_directories
(
${
ABSL_INCLUDE_DIR
}
)
# Add isl
# Add isl
set
(
ISL_INCLUDE_DIR
"
${
CMAKE_BINARY_DIR
}
/
dist/third_party
/isl/include"
)
set
(
ISL_INCLUDE_DIR
"
${
CMAKE_BINARY_DIR
}
/
third_party/install
/isl/include"
)
include_directories
(
${
ISL_INCLUDE_DIR
}
)
include_directories
(
${
ISL_INCLUDE_DIR
}
)
# Add LLVM
# Add LLVM
...
...
cmake/cinn/external/isl.cmake
浏览文件 @
a9d3cef9
...
@@ -7,25 +7,62 @@ include(ExternalProject)
...
@@ -7,25 +7,62 @@ include(ExternalProject)
# static build
# static build
# CPPFLAGS="-fPIC -DPIC" ./configure --with-gmp-prefix=<gmp-install-path> --with-clang-prefix=<llvm-install-path> --enable-shared=no --enable-static=yes
# CPPFLAGS="-fPIC -DPIC" ./configure --with-gmp-prefix=<gmp-install-path> --with-clang-prefix=<llvm-install-path> --enable-shared=no --enable-static=yes
set
(
ISL_FILE
"isl-6a1760fe.tar.gz"
CACHE STRING
""
FORCE
)
set
(
ISL_DOWNLOAD_URL
set
(
ISL_DOWNLOAD_URL
https://paddle-inference-dist.bj.bcebos.com/CINN/isl-6a1760fe.tar.gz
)
"https://paddle-inference-dist.bj.bcebos.com/CINN/
${
ISL_FILE
}
"
)
set
(
ISL_MD5 fff10083fb79d394b8a7b7b2089f6183
)
set
(
ISL_URL_MD5 fff10083fb79d394b8a7b7b2089f6183
)
set
(
ISL_DOWNLOAD_DIR
${
PADDLE_SOURCE_DIR
}
/third_party/isl
)
set
(
ISL_PREFIX_DIR
${
THIRD_PARTY_PATH
}
/isl
)
set
(
ISL_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/isl
)
function
(
download_isl
)
message
(
STATUS
"Downloading
${
ISL_DOWNLOAD_URL
}
to
${
ISL_DOWNLOAD_DIR
}
/
${
ISL_FILE
}
"
)
file
(
DOWNLOAD
${
ISL_DOWNLOAD_URL
}
${
ISL_DOWNLOAD_DIR
}
/
${
ISL_FILE
}
EXPECTED_MD5
${
ISL_URL_MD5
}
STATUS ERR
)
if
(
ERR EQUAL 0
)
message
(
STATUS
"Download
${
ISL_FILE
}
success"
)
else
()
message
(
FATAL_ERROR
"Download failed, error:
${
ERR
}
\n
You can try downloading
${
ISL_FILE
}
again"
)
endif
()
endfunction
()
# Download and check isl.
if
(
EXISTS
${
ISL_DOWNLOAD_DIR
}
/
${
ISL_FILE
}
)
file
(
MD5
${
ISL_DOWNLOAD_DIR
}
/
${
ISL_FILE
}
ISL_MD5
)
if
(
NOT ISL_MD5 STREQUAL ISL_URL_MD5
)
# clean build file
file
(
REMOVE_RECURSE
${
ISL_PREFIX_DIR
}
)
file
(
REMOVE_RECURSE
${
ISL_INSTALL_DIR
}
)
download_isl
()
endif
()
else
()
download_isl
()
endif
()
ExternalProject_Add
(
ExternalProject_Add
(
external_isl
external_isl
${
EXTERNAL_PROJECT_LOG_ARGS
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
URL
${
ISL_DOWNLOAD_URL
}
URL
${
ISL_DOWNLOAD_DIR
}
/
${
ISL_FILE
}
URL_MD5
${
ISL_MD5
}
URL_MD5
${
ISL_URL_MD5
}
PREFIX
${
THIRD_PARTY_PATH
}
/isl
DOWNLOAD_DIR
${
ISL_DOWNLOAD_DIR
}
SOURCE_DIR
${
THIRD_PARTY_PATH
}
/install/isl
PREFIX
${
ISL_PREFIX_DIR
}
SOURCE_DIR
${
ISL_INSTALL_DIR
}
CONFIGURE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
BUILD_COMMAND
""
UPDATE_COMMAND
""
UPDATE_COMMAND
""
INSTALL_COMMAND
""
INSTALL_COMMAND
""
BUILD_BYPRODUCTS
${
THIRD_PARTY_PATH
}
/install/isl
/lib/libisl.a
)
BUILD_BYPRODUCTS
${
ISL_INSTALL_DIR
}
/lib/libisl.a
)
add_library
(
isl STATIC IMPORTED GLOBAL
)
add_library
(
isl STATIC IMPORTED GLOBAL
)
set_property
(
TARGET isl PROPERTY IMPORTED_LOCATION
set_property
(
TARGET isl PROPERTY IMPORTED_LOCATION
${
THIRD_PARTY_PATH
}
/install/isl
/lib/libisl.a
)
${
ISL_INSTALL_DIR
}
/lib/libisl.a
)
add_dependencies
(
isl external_isl
)
add_dependencies
(
isl external_isl
)
include_directories
(
${
THIRD_PARTY_PATH
}
/install/isl
/include
)
include_directories
(
${
ISL_INSTALL_DIR
}
/include
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录