Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
6913feb0
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看板
未验证
提交
6913feb0
编写于
4月 10, 2023
作者:
J
jjyaoao
提交者:
GitHub
4月 10, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove infrt V1.1 (#52672)
上级
61fe2198
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
179 addition
and
402 deletion
+179
-402
.gitignore
.gitignore
+0
-9
CMakeLists.txt
CMakeLists.txt
+0
-1
cmake/external/llvm.cmake
cmake/external/llvm.cmake
+0
-132
cmake/infrt_lib.cmake
cmake/infrt_lib.cmake
+0
-85
cmake/third_party.cmake
cmake/third_party.cmake
+0
-5
paddle/phi/README.md
paddle/phi/README.md
+178
-167
tools/get_pr_ut.py
tools/get_pr_ut.py
+1
-3
未找到文件。
.gitignore
浏览文件 @
6913feb0
...
...
@@ -73,16 +73,7 @@ tools/nvcc_lazy
# This file is automatically generated.
# TODO(zhiqiang) Move this file to build directory.
paddle/infrt/dialect/pd/ir/pd_ops.td
paddle/infrt/dialect/phi/ir/phi_cpu_kernels.td
paddle/infrt/dialect/phi/ir/phi_gpu_kernels.td
tools/infrt/kernels.json
tools/infrt/kernel_signature.json
paddle/infrt/dialect/pd/common/pd_ops_info.h
.lit_test_times.txt
paddle/infrt/tests/dialect/Output
paddle/infrt/tests/lit.cfg.py
paddle/infrt/kernel/phi/infershaped/infershaped_kernel_launchers.cc
paddle/fluid/pybind/eager_op_function.cc
tools/nvcc_lazy
...
...
CMakeLists.txt
浏览文件 @
6913feb0
...
...
@@ -269,7 +269,6 @@ option(
OFF
)
option
(
WITH_LITE
"Compile Paddle Fluid with Lite Engine"
OFF
)
option
(
WITH_CINN
"Compile PaddlePaddle with CINN"
OFF
)
option
(
WITH_INFRT
"Compile PaddlePaddle with INFRT"
OFF
)
option
(
WITH_NCCL
"Compile PaddlePaddle with NCCL support"
ON
)
option
(
WITH_RCCL
"Compile PaddlePaddle with RCCL support"
ON
)
option
(
WITH_XPU_BKCL
"Compile PaddlePaddle with BAIDU KUNLUN XPU BKCL"
OFF
)
...
...
cmake/external/llvm.cmake
已删除
100644 → 0
浏览文件 @
61fe2198
include
(
FetchContent
)
set
(
LLVM_DOWNLOAD_URL
https://paddle-inference-dist.bj.bcebos.com/infrt/llvm_b5149f4e66a49a98b67e8e2de4e24a4af8e2781b.tar.gz
)
set
(
LLVM_MD5 022819bb5760817013cf4b8a37e97d5e
)
set
(
FETCHCONTENT_BASE_DIR
${
THIRD_PARTY_PATH
}
/llvm
)
set
(
FETCHCONTENT_QUIET OFF
)
FetchContent_Declare
(
external_llvm
URL
${
LLVM_DOWNLOAD_URL
}
URL_MD5
${
LLVM_MD5
}
PREFIX
${
THIRD_PARTY_PATH
}
/llvm SOURCE_DIR
${
THIRD_PARTY_PATH
}
/install/llvm
)
if
(
NOT LLVM_PATH
)
FetchContent_GetProperties
(
external_llvm
)
if
(
NOT external_llvm_POPULATED
)
FetchContent_Populate
(
external_llvm
)
endif
()
set
(
LLVM_PATH
${
THIRD_PARTY_PATH
}
/install/llvm
)
set
(
LLVM_DIR
${
THIRD_PARTY_PATH
}
/install/llvm/lib/cmake/llvm
)
set
(
MLIR_DIR
${
THIRD_PARTY_PATH
}
/install/llvm/lib/cmake/mlir
)
else
()
set
(
LLVM_DIR
${
LLVM_PATH
}
/lib/cmake/llvm
)
set
(
MLIR_DIR
${
LLVM_PATH
}
/lib/cmake/mlir
)
endif
()
if
(
${
CMAKE_CXX_COMPILER
}
STREQUAL
"clang++"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-stdlib=libc++ -lc++abi"
)
endif
()
message
(
STATUS
"set LLVM_DIR:
${
LLVM_DIR
}
"
)
message
(
STATUS
"set MLIR_DIR:
${
MLIR_DIR
}
"
)
find_package
(
LLVM REQUIRED CONFIG HINTS
${
LLVM_DIR
}
)
find_package
(
MLIR REQUIRED CONFIG HINTS
${
MLIR_DIR
}
)
find_package
(
ZLIB REQUIRED
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
LLVM_CMAKE_DIR
}
"
)
include
(
AddLLVM
)
include_directories
(
${
LLVM_INCLUDE_DIRS
}
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
LLVM_CMAKE_DIR
}
"
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
MLIR_CMAKE_DIR
}
"
)
include
(
AddLLVM
)
include
(
TableGen
)
include
(
AddMLIR
)
message
(
STATUS
"Found MLIR:
${
MLIR_DIR
}
"
)
message
(
STATUS
"Found LLVM
${
LLVM_PACKAGE_VERSION
}
"
)
message
(
STATUS
"Using LLVMConfig.cmake in:
${
LLVM_DIR
}
"
)
# To build with MLIR, the LLVM is build from source code using the following flags:
#[==[
cmake ../llvm -G "Unix Makefiles" \
-DLLVM_ENABLE_PROJECTS="mlir;clang" \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_ZLIB=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_INSTALL_UTILS=ON \
-DCMAKE_INSTALL_PREFIX=./install
#]==]
# The matched llvm-project version is b5149f4e66a49a98b67e8e2de4e24a4af8e2781b (currently a temporary commit)
add_definitions
(
${
LLVM_DEFINITIONS
}
)
llvm_map_components_to_libnames
(
llvm_libs
Support
Core
irreader
X86
executionengine
orcjit
mcjit
all
codegen
)
message
(
STATUS
"LLVM libs:
${
llvm_libs
}
"
)
get_property
(
mlir_libs GLOBAL PROPERTY MLIR_ALL_LIBS
)
message
(
STATUS
"MLIR libs:
${
mlir_libs
}
"
)
add_definitions
(
${
LLVM_DEFINITIONS
}
)
# The minimum needed libraries for MLIR IR parse and transform.
set
(
MLIR_IR_LIBS MLIRAnalysis MLIRPass MLIRParser MLIRDialect MLIRIR MLIROptLib
)
# tb_base is the name of a xxx.td file (without the .td suffix)
function
(
mlir_tablegen_on td_base
)
set
(
options
)
set
(
oneValueArgs DIALECT
)
cmake_parse_arguments
(
mlir_tablegen_on
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
set
(
LLVM_TARGET_DEFINITIONS
${
td_base
}
.td
)
mlir_tablegen
(
${
td_base
}
.hpp.inc -gen-op-decls
)
mlir_tablegen
(
${
td_base
}
.cpp.inc -gen-op-defs
)
if
(
mlir_tablegen_on_DIALECT
)
mlir_tablegen
(
${
td_base
}
_dialect.hpp.inc --gen-dialect-decls
-dialect=
${
mlir_tablegen_on_DIALECT
}
)
mlir_tablegen
(
${
td_base
}
_dialect.cpp.inc --gen-dialect-defs
-dialect=
${
mlir_tablegen_on_DIALECT
}
)
endif
()
add_public_tablegen_target
(
${
td_base
}
_IncGen
)
add_custom_target
(
${
td_base
}
_inc DEPENDS
${
td_base
}
_IncGen
)
endfunction
()
function
(
mlir_add_rewriter td_base
)
set
(
LLVM_TARGET_DEFINITIONS
${
td_base
}
.td
)
set
(
LLVM_TARGET_DEPENDS
${
LLVM_TARGET_DEPENDS
}
${
CMAKE_SOURCE_DIR
}
/paddle/infrt/dialect/infrt/ir/infrt_base.td
)
mlir_tablegen
(
${
td_base
}
.cpp.inc -gen-rewriters
)
add_public_tablegen_target
(
MLIR
${
td_base
}
IncGen
)
add_dependencies
(
mlir-headers MLIR
${
td_base
}
IncGen
)
endfunction
()
# Execute the mlir script with infrt-exec program.
# @name: name of the test
# @script: path to the mlir script file
function
(
infrt_exec_check name script
)
add_test
(
NAME
${
name
}
COMMAND
sh -c
"
${
CMAKE_BINARY_DIR
}
/paddle/infrt/host_context/infrt-exec -i
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
script
}
|
${
LLVM_PATH
}
/bin/FileCheck
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
script
}
"
)
endfunction
()
cmake/infrt_lib.cmake
已删除
100644 → 0
浏览文件 @
61fe2198
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set
(
INFRT_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/paddle_infrt_install_dir"
CACHE STRING
"A path setting paddle infrt shared and static libraries"
)
function
(
copy TARGET
)
set
(
options
""
)
set
(
oneValueArgs
""
)
set
(
multiValueArgs SRCS DSTS
)
cmake_parse_arguments
(
copy_lib
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
list
(
LENGTH copy_lib_SRCS copy_lib_SRCS_len
)
list
(
LENGTH copy_lib_DSTS copy_lib_DSTS_len
)
if
(
NOT
${
copy_lib_SRCS_len
}
EQUAL
${
copy_lib_DSTS_len
}
)
message
(
FATAL_ERROR
"
${
TARGET
}
source numbers are not equal to destination numbers"
)
endif
()
math
(
EXPR len
"
${
copy_lib_SRCS_len
}
- 1"
)
foreach
(
index RANGE
${
len
}
)
list
(
GET copy_lib_SRCS
${
index
}
src
)
list
(
GET copy_lib_DSTS
${
index
}
dst
)
add_custom_command
(
TARGET
${
TARGET
}
POST_BUILD
COMMAND mkdir -p
"
${
dst
}
"
COMMAND cp -r
"
${
src
}
"
"
${
dst
}
"
COMMENT
"copying
${
src
}
->
${
dst
}
"
)
endforeach
()
endfunction
()
function
(
copy_part_of_thrid_party TARGET DST
)
set
(
dst_dir
"
${
DST
}
/third_party/install/glog"
)
copy
(
${
TARGET
}
SRCS
${
GLOG_INCLUDE_DIR
}
${
GLOG_LIBRARIES
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
)
endfunction
()
# inference library for only inference
set
(
infrt_lib_deps third_party infrt infrt_static
)
add_custom_target
(
infrt_lib_dist DEPENDS
${
infrt_lib_deps
}
)
# CMakeCache Info
copy
(
infrt_lib_dist
SRCS
${
CMAKE_BINARY_DIR
}
/CMakeCache.txt
DSTS
${
INFRT_INSTALL_DIR
}
)
set
(
infrt_lib
${
INFRT_BINARY_DIR
}
/libinfrt.*
)
copy
(
infrt_lib_dist
SRCS
${
INFRT_SOURCE_DIR
}
/api/infrt_api.h
${
infrt_lib
}
DSTS
${
INFRT_INSTALL_DIR
}
/infrt/include
${
INFRT_INSTALL_DIR
}
/infrt/lib
)
copy
(
infrt_lib_dist
SRCS
${
INFRT_BINARY_DIR
}
/paddle/framework.pb.h
DSTS
${
INFRT_INSTALL_DIR
}
/infrt/include/internal
)
# paddle fluid version
function
(
version version_file
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
log --pretty=format:%H -1
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
OUTPUT_VARIABLE PADDLE_GIT_COMMIT
)
file
(
WRITE
${
version_file
}
"GIT COMMIT ID:
${
PADDLE_GIT_COMMIT
}
\n
"
)
file
(
APPEND
${
version_file
}
"CXX compiler version:
${
CMAKE_CXX_COMPILER_VERSION
}
\n
"
)
endfunction
()
version
(
${
INFRT_INSTALL_DIR
}
/version.txt
)
cmake/third_party.cmake
浏览文件 @
6913feb0
...
...
@@ -493,11 +493,6 @@ if(WIN32)
list
(
APPEND third_party_deps extern_dirent
)
endif
()
if
(
WITH_INFRT
)
include
(
external/llvm
)
list
(
APPEND third_party_deps
${
llvm_libs
}
)
endif
()
if
(
WITH_IPU
)
include
(
external/poplar
)
list
(
APPEND third_party_deps extern_poplar
)
...
...
paddle/phi/README.md
浏览文件 @
6913feb0
此差异已折叠。
点击以展开。
tools/get_pr_ut.py
浏览文件 @
6913feb0
...
...
@@ -330,9 +330,7 @@ class PRChecker:
if
filename
.
startswith
(
PADDLE_ROOT
+
'python/'
):
file_list
.
append
(
filename
)
elif
filename
.
startswith
(
PADDLE_ROOT
+
'paddle/'
):
if
filename
.
startswith
(
PADDLE_ROOT
+
'paddle/infrt'
):
filterFiles
.
append
(
filename
)
elif
filename
.
startswith
(
PADDLE_ROOT
+
'paddle/scripts'
):
if
filename
.
startswith
(
PADDLE_ROOT
+
'paddle/scripts'
):
if
filename
.
startswith
(
(
PADDLE_ROOT
+
'paddle/scripts/paddle_build.sh'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录