Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
8c94d8cb
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
8c94d8cb
编写于
2月 27, 2021
作者:
石
石晓伟
提交者:
GitHub
2月 27, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Custom OP] change the user header file format, test=develop (#31274)
上级
038ce70d
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
40 addition
and
25 deletion
+40
-25
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+4
-0
paddle/extension.h
paddle/extension.h
+1
-1
paddle/fluid/extension/include/ext_all.h
paddle/fluid/extension/include/ext_all.h
+5
-5
paddle/fluid/extension/include/ext_dispatch.h
paddle/fluid/extension/include/ext_dispatch.h
+1
-1
paddle/fluid/extension/include/ext_dll_decl.h
paddle/fluid/extension/include/ext_dll_decl.h
+0
-0
paddle/fluid/extension/include/ext_dtype.h
paddle/fluid/extension/include/ext_dtype.h
+0
-0
paddle/fluid/extension/include/ext_op_meta_info.h
paddle/fluid/extension/include/ext_op_meta_info.h
+2
-2
paddle/fluid/extension/include/ext_place.h
paddle/fluid/extension/include/ext_place.h
+0
-0
paddle/fluid/extension/include/ext_tensor.h
paddle/fluid/extension/include/ext_tensor.h
+5
-3
paddle/fluid/extension/src/ext_op_meta_info.cc
paddle/fluid/extension/src/ext_op_meta_info.cc
+1
-1
paddle/fluid/extension/src/ext_tensor.cc
paddle/fluid/extension/src/ext_tensor.cc
+1
-1
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+13
-5
paddle/fluid/framework/custom_operator.cc
paddle/fluid/framework/custom_operator.cc
+1
-1
paddle/fluid/framework/custom_operator.h
paddle/fluid/framework/custom_operator.h
+1
-1
paddle/fluid/framework/custom_tensor_test.cc
paddle/fluid/framework/custom_tensor_test.cc
+1
-1
paddle/fluid/framework/custom_tensor_utils.h
paddle/fluid/framework/custom_tensor_utils.h
+1
-1
paddle/fluid/framework/op_meta_info_helper.h
paddle/fluid/framework/op_meta_info_helper.h
+1
-1
paddle/fluid/inference/CMakeLists.txt
paddle/fluid/inference/CMakeLists.txt
+2
-1
未找到文件。
cmake/inference_lib.cmake
浏览文件 @
8c94d8cb
...
...
@@ -189,6 +189,10 @@ copy(inference_lib_dist
DSTS
${
PADDLE_INFERENCE_INSTALL_DIR
}
/paddle/include/crypto/
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/../paddle/fluid/framework/io
)
copy
(
inference_lib_dist
SRCS
${
PADDLE_SOURCE_DIR
}
/paddle/fluid/extension/include/*
DSTS
${
PADDLE_INFERENCE_INSTALL_DIR
}
/paddle/include/experimental/
)
# CAPI inference library for only inference
set
(
PADDLE_INFERENCE_C_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/paddle_inference_c_install_dir"
CACHE STRING
"A path setting CAPI paddle inference shared"
)
...
...
paddle/extension.h
浏览文件 @
8c94d8cb
...
...
@@ -15,4 +15,4 @@ limitations under the License. */
#pragma once
// All paddle apis in C++ frontend
#include "paddle/fluid/extension/include/all.h"
#include "paddle/fluid/extension/include/
ext_
all.h"
paddle/fluid/extension/include/all.h
→
paddle/fluid/extension/include/
ext_
all.h
浏览文件 @
8c94d8cb
...
...
@@ -24,8 +24,8 @@ limitations under the License. */
#endif
#endif
#include "
paddle/fluid/extension/include/dispatch.h"
#include "
paddle/fluid/extension/include/dtype.h"
#include "
paddle/fluid/extension/include/op_meta_info.h"
#include "
paddle/fluid/extension/include/place.h"
#include "
paddle/fluid/extension/include/tensor.h"
#include "
ext_dispatch.h" // NOLINT
#include "
ext_dtype.h" // NOLINT
#include "
ext_op_meta_info.h" // NOLINT
#include "
ext_place.h" // NOLINT
#include "
ext_tensor.h" // NOLINT
paddle/fluid/extension/include/dispatch.h
→
paddle/fluid/extension/include/
ext_
dispatch.h
浏览文件 @
8c94d8cb
...
...
@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once
#include "
paddle/fluid/extension/include/dtype.h"
#include "
ext_dtype.h" // NOLINT
namespace
paddle
{
...
...
paddle/fluid/extension/include/dll_decl.h
→
paddle/fluid/extension/include/
ext_
dll_decl.h
浏览文件 @
8c94d8cb
文件已移动
paddle/fluid/extension/include/dtype.h
→
paddle/fluid/extension/include/
ext_
dtype.h
浏览文件 @
8c94d8cb
文件已移动
paddle/fluid/extension/include/op_meta_info.h
→
paddle/fluid/extension/include/
ext_
op_meta_info.h
浏览文件 @
8c94d8cb
...
...
@@ -21,8 +21,8 @@ limitations under the License. */
#include <boost/any.hpp>
#include "
paddle/fluid/extension/include/dll_decl.h"
#include "
paddle/fluid/extension/include/tensor.h"
#include "
ext_dll_decl.h" // NOLINT
#include "
ext_tensor.h" // NOLINT
/**
* Op Meta Info Related Define.
...
...
paddle/fluid/extension/include/place.h
→
paddle/fluid/extension/include/
ext_
place.h
浏览文件 @
8c94d8cb
文件已移动
paddle/fluid/extension/include/tensor.h
→
paddle/fluid/extension/include/
ext_
tensor.h
浏览文件 @
8c94d8cb
...
...
@@ -16,12 +16,14 @@ limitations under the License. */
#include <memory>
#include <vector>
#include "paddle/fluid/extension/include/dll_decl.h"
#include "paddle/fluid/extension/include/dtype.h"
#include "paddle/fluid/extension/include/place.h"
#ifdef PADDLE_WITH_CUDA
#include <cuda_runtime.h>
#endif
#include "ext_dll_decl.h" // NOLINT
#include "ext_dtype.h" // NOLINT
#include "ext_place.h" // NOLINT
namespace
paddle
{
namespace
framework
{
class
CustomTensorUtils
;
...
...
paddle/fluid/extension/src/op_meta_info.cc
→
paddle/fluid/extension/src/
ext_
op_meta_info.cc
浏览文件 @
8c94d8cb
...
...
@@ -12,7 +12,7 @@ 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. */
#include "paddle/fluid/extension/include/op_meta_info.h"
#include "paddle/fluid/extension/include/
ext_
op_meta_info.h"
#include <string>
#include <unordered_map>
...
...
paddle/fluid/extension/src/tensor.cc
→
paddle/fluid/extension/src/
ext_
tensor.cc
浏览文件 @
8c94d8cb
...
...
@@ -12,7 +12,7 @@ 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. */
#include "paddle/fluid/extension/include/tensor.h"
#include "paddle/fluid/extension/include/
ext_
tensor.h"
#include <utility>
#include "paddle/fluid/framework/custom_tensor_utils.h"
#include "paddle/fluid/framework/lod_tensor.h"
...
...
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
8c94d8cb
...
...
@@ -346,11 +346,13 @@ message(STATUS "branch: ${PADDLE_BRANCH}")
configure_file
(
commit.h.in commit.h
)
cc_library
(
custom_tensor SRCS ../extension/src/tensor.cc DEPS lod_tensor memory enforce
)
cc_library
(
op_meta_info SRCS ../extension/src/op_meta_info.cc DEPS custom_tensor
)
cc_library
(
custom_tensor SRCS ../extension/src/
ext_
tensor.cc DEPS lod_tensor memory enforce
)
cc_library
(
op_meta_info SRCS ../extension/src/
ext_
op_meta_info.cc DEPS custom_tensor
)
cc_library
(
custom_operator SRCS custom_operator.cc DEPS tensor attribute framework_proto op_registry operator dynamic_loader string_helper custom_tensor op_meta_info
)
cc_test
(
custom_tensor_test SRCS custom_tensor_test.cc DEPS custom_tensor glog
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../extension/include
)
set
(
FLUID_FRAMEWORK_MODULES proto_desc memory lod_tensor executor data_feed_proto layer dynamic_loader custom_operator
)
cc_library
(
paddle_framework DEPS
${
FLUID_FRAMEWORK_MODULES
}
)
...
...
@@ -394,10 +396,16 @@ endif()
# if not deps `layer`, will cause: undefined symbol: _ZN6paddle10imperative7VarBase9name_set_
set
(
PADDLE_CUSTOM_OP_MODULES custom_tensor op_meta_info custom_operator layer
)
set
(
PADDLE_CUSTOM_OP_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/custom_operator.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../extension/src/ext_tensor.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../extension/src/ext_op_meta_info.cc
${
CMAKE_SOURCE_DIR
}
/paddle/fluid/imperative/layer.cc
)
set
(
PADDLE_CUSTOM_OP_SRCS
${
PADDLE_CUSTOM_OP_SRCS
}
PARENT_SCOPE
)
cc_library
(
paddle_custom_op_shared
SHARED SRCS custom_operator.cc ../extension/src/tensor.cc ../extension/src/op_meta_info.cc
${
CMAKE_SOURCE_DIR
}
/paddle/fluid/imperative/layer.cc
DEPS
${
PADDLE_CUSTOM_OP_MODULES
}
)
SHARED SRCS
${
PADDLE_CUSTOM_OP_SRCS
}
DEPS
${
PADDLE_CUSTOM_OP_MODULES
}
)
get_property
(
os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES
)
set_target_properties
(
paddle_custom_op_shared PROPERTIES OUTPUT_NAME paddle_custom_op
)
target_link_libraries
(
paddle_custom_op_shared
${
os_dependency_modules
}
)
...
...
paddle/fluid/framework/custom_operator.cc
浏览文件 @
8c94d8cb
...
...
@@ -25,7 +25,7 @@ limitations under the License. */
#include <utility>
#include <vector>
#include "paddle/fluid/extension/include/tensor.h"
#include "paddle/fluid/extension/include/
ext_
tensor.h"
#include "paddle/fluid/framework/attribute.h"
#include "paddle/fluid/framework/c/c_api.h"
#include "paddle/fluid/framework/custom_tensor_utils.h"
...
...
paddle/fluid/framework/custom_operator.h
浏览文件 @
8c94d8cb
...
...
@@ -16,7 +16,7 @@ limitations under the License. */
#include <string>
#include "paddle/fluid/extension/include/op_meta_info.h"
#include "paddle/fluid/extension/include/
ext_
op_meta_info.h"
namespace
paddle
{
namespace
framework
{
...
...
paddle/fluid/framework/custom_tensor_test.cc
浏览文件 @
8c94d8cb
...
...
@@ -14,7 +14,7 @@
#include "glog/logging.h"
#include "gtest/gtest.h"
#include "paddle/fluid/extension/include/all.h"
#include "paddle/fluid/extension/include/
ext_
all.h"
#include "paddle/fluid/framework/custom_tensor_utils.h"
#include "paddle/fluid/framework/lod_tensor.h"
...
...
paddle/fluid/framework/custom_tensor_utils.h
浏览文件 @
8c94d8cb
...
...
@@ -16,7 +16,7 @@ limitations under the License. */
#include <memory>
#include "paddle/fluid/extension/include/tensor.h"
#include "paddle/fluid/extension/include/
ext_
tensor.h"
#include "paddle/fluid/framework/data_type.h"
#include "paddle/fluid/platform/gpu_info.h"
#include "paddle/fluid/platform/place.h"
...
...
paddle/fluid/framework/op_meta_info_helper.h
浏览文件 @
8c94d8cb
...
...
@@ -17,7 +17,7 @@ limitations under the License. */
#include <string>
#include <vector>
#include "paddle/fluid/extension/include/op_meta_info.h"
#include "paddle/fluid/extension/include/
ext_
op_meta_info.h"
namespace
paddle
{
namespace
framework
{
...
...
paddle/fluid/inference/CMakeLists.txt
浏览文件 @
8c94d8cb
...
...
@@ -73,7 +73,8 @@ set(SHARED_INFERENCE_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/api/analysis_predictor.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/api/details/zero_copy_tensor.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/utils/io_utils.cc
${
mkldnn_quantizer_src_file
}
)
${
mkldnn_quantizer_src_file
}
${
PADDLE_CUSTOM_OP_SRCS
}
)
# shared inference library deps
set
(
SHARED_INFERENCE_DEPS
${
fluid_modules
}
analysis_predictor
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录