Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
abe1dca3
P
Paddle
项目概览
Crayon鑫
/
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看板
未验证
提交
abe1dca3
编写于
9月 17, 2022
作者:
Y
Yuanle Liu
提交者:
GitHub
9月 17, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compilation errors on mac arm64 (#46117)
上级
b680fb80
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
28 addition
and
19 deletion
+28
-19
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+0
-2
cmake/external/xxhash.cmake
cmake/external/xxhash.cmake
+0
-1
paddle/fluid/eager/pylayer/py_layer_node.h
paddle/fluid/eager/pylayer/py_layer_node.h
+1
-1
paddle/fluid/inference/capi_exp/CMakeLists.txt
paddle/fluid/inference/capi_exp/CMakeLists.txt
+12
-0
paddle/fluid/operators/abs_op.cc
paddle/fluid/operators/abs_op.cc
+1
-1
paddle/fluid/operators/activation_op.cc
paddle/fluid/operators/activation_op.cc
+1
-1
paddle/fluid/operators/cross_entropy_op.cc
paddle/fluid/operators/cross_entropy_op.cc
+1
-1
paddle/fluid/operators/dequantize_abs_max_op.cc
paddle/fluid/operators/dequantize_abs_max_op.cc
+1
-1
paddle/fluid/operators/dequantize_log_op.cc
paddle/fluid/operators/dequantize_log_op.cc
+1
-1
paddle/fluid/operators/kron_op.cc
paddle/fluid/operators/kron_op.cc
+2
-2
paddle/fluid/operators/matmul_op.cc
paddle/fluid/operators/matmul_op.cc
+1
-1
paddle/fluid/operators/matmul_v2_op.cc
paddle/fluid/operators/matmul_v2_op.cc
+2
-2
paddle/fluid/operators/pad3d_op.cc
paddle/fluid/operators/pad3d_op.cc
+1
-1
paddle/fluid/operators/prelu_op.cc
paddle/fluid/operators/prelu_op.cc
+2
-2
paddle/phi/core/string_tensor.h
paddle/phi/core/string_tensor.h
+1
-1
paddle/phi/core/tensor_array.h
paddle/phi/core/tensor_array.h
+1
-1
未找到文件。
cmake/external/protobuf.cmake
浏览文件 @
abe1dca3
...
@@ -268,8 +268,6 @@ function(build_protobuf TARGET_NAME BUILD_FOR_HOST)
...
@@ -268,8 +268,6 @@ function(build_protobuf TARGET_NAME BUILD_FOR_HOST)
DOWNLOAD_DIR
${
PROTOBUF_SOURCE_DIR
}
DOWNLOAD_DIR
${
PROTOBUF_SOURCE_DIR
}
DOWNLOAD_COMMAND rm -rf arm_protobuf.tar.gz && wget --no-check-certificate
DOWNLOAD_COMMAND rm -rf arm_protobuf.tar.gz && wget --no-check-certificate
${
ARM_PROTOBUF_URL
}
&& tar zxvf arm_protobuf.tar.gz
${
ARM_PROTOBUF_URL
}
&& tar zxvf arm_protobuf.tar.gz
#DOWNLOAD_COMMAND cp /home/wangbin44/Paddle/build/arm_protobuf.tar.gz .
# && tar zxvf arm_protobuf.tar.gz
UPDATE_COMMAND
""
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
PROTOBUF_INSTALL_DIR
}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
PROTOBUF_INSTALL_DIR
}
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
...
...
cmake/external/xxhash.cmake
浏览文件 @
abe1dca3
...
@@ -97,5 +97,4 @@ endif()
...
@@ -97,5 +97,4 @@ endif()
add_library
(
xxhash STATIC IMPORTED GLOBAL
)
add_library
(
xxhash STATIC IMPORTED GLOBAL
)
set_property
(
TARGET xxhash PROPERTY IMPORTED_LOCATION
${
XXHASH_LIBRARIES
}
)
set_property
(
TARGET xxhash PROPERTY IMPORTED_LOCATION
${
XXHASH_LIBRARIES
}
)
include_directories
(
${
XXHASH_INCLUDE_DIR
}
)
add_dependencies
(
xxhash extern_xxhash
)
add_dependencies
(
xxhash extern_xxhash
)
paddle/fluid/eager/pylayer/py_layer_node.h
浏览文件 @
abe1dca3
...
@@ -45,7 +45,7 @@ class GradNodePyLayer : public GradNodeBase {
...
@@ -45,7 +45,7 @@ class GradNodePyLayer : public GradNodeBase {
void
ClearTensorWrappers
()
override
{
VLOG
(
6
)
<<
"Do nothing here now"
;
}
void
ClearTensorWrappers
()
override
{
VLOG
(
6
)
<<
"Do nothing here now"
;
}
std
::
string
name
()
{
std
::
string
name
()
override
{
return
"GradNodePyLayer_"
+
std
::
string
(
Py_TYPE
(
ctx_
)
->
tp_name
);
return
"GradNodePyLayer_"
+
std
::
string
(
Py_TYPE
(
ctx_
)
->
tp_name
);
}
}
...
...
paddle/fluid/inference/capi_exp/CMakeLists.txt
浏览文件 @
abe1dca3
...
@@ -31,6 +31,18 @@ cc_library(
...
@@ -31,6 +31,18 @@ cc_library(
DEPS paddle_inference
)
DEPS paddle_inference
)
set_target_properties
(
paddle_inference_c_shared PROPERTIES OUTPUT_NAME
set_target_properties
(
paddle_inference_c_shared PROPERTIES OUTPUT_NAME
paddle_inference_c
)
paddle_inference_c
)
if
(
APPLE
)
target_link_libraries
(
paddle_inference_c_shared
xxhash
utf8proc
cryptopp
protobuf
gflags
cblas
)
endif
()
if
(
WIN32
)
if
(
WIN32
)
target_link_libraries
(
paddle_inference_c_shared shlwapi.lib
)
target_link_libraries
(
paddle_inference_c_shared shlwapi.lib
)
endif
()
endif
()
paddle/fluid/operators/abs_op.cc
浏览文件 @
abe1dca3
...
@@ -154,7 +154,7 @@ class AbsDoubleGradOp : public framework::OperatorWithKernel {
...
@@ -154,7 +154,7 @@ class AbsDoubleGradOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
framework
::
TransToProtoVarType
(
tensor
.
dtype
()),
framework
::
TransToProtoVarType
(
tensor
.
dtype
()),
tensor
.
place
(),
tensor
.
place
(),
...
...
paddle/fluid/operators/activation_op.cc
浏览文件 @
abe1dca3
...
@@ -125,7 +125,7 @@ class ActivationOp : public framework::OperatorWithKernel {
...
@@ -125,7 +125,7 @@ class ActivationOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
Tensor
&
tensor
,
const
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
#ifdef PADDLE_WITH_MKLDNN
#ifdef PADDLE_WITH_MKLDNN
// When activation is first oneDNN op (there was some non oneDNN op
// When activation is first oneDNN op (there was some non oneDNN op
// previously)
// previously)
...
...
paddle/fluid/operators/cross_entropy_op.cc
浏览文件 @
abe1dca3
...
@@ -142,7 +142,7 @@ class CrossEntropyGradientOpBase : public framework::OperatorWithKernel {
...
@@ -142,7 +142,7 @@ class CrossEntropyGradientOpBase : public framework::OperatorWithKernel {
public:
public:
using
framework
::
OperatorWithKernel
::
OperatorWithKernel
;
using
framework
::
OperatorWithKernel
::
OperatorWithKernel
;
void
InferShape
(
framework
::
InferShapeContext
*
ctx
)
const
{
void
InferShape
(
framework
::
InferShapeContext
*
ctx
)
const
override
{
OP_INOUT_CHECK
(
OP_INOUT_CHECK
(
ctx
->
HasInput
(
"Label"
),
"Input"
,
"Label"
,
"CrossEntropyGradientOpBase"
);
ctx
->
HasInput
(
"Label"
),
"Input"
,
"Label"
,
"CrossEntropyGradientOpBase"
);
OP_INOUT_CHECK
(
ctx
->
HasInput
(
framework
::
GradVarName
(
"Y"
)),
OP_INOUT_CHECK
(
ctx
->
HasInput
(
framework
::
GradVarName
(
"Y"
)),
...
...
paddle/fluid/operators/dequantize_abs_max_op.cc
浏览文件 @
abe1dca3
...
@@ -69,7 +69,7 @@ class DequantizeMaxAbsOp : public framework::OperatorWithKernel {
...
@@ -69,7 +69,7 @@ class DequantizeMaxAbsOp : public framework::OperatorWithKernel {
}
}
framework
::
OpKernelType
GetExpectedKernelType
(
framework
::
OpKernelType
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
{
const
framework
::
ExecutionContext
&
ctx
)
const
override
{
auto
data_type
=
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"X"
);
auto
data_type
=
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"X"
);
auto
type
=
framework
::
OpKernelType
(
data_type
,
ctx
.
device_context
());
auto
type
=
framework
::
OpKernelType
(
data_type
,
ctx
.
device_context
());
return
type
;
return
type
;
...
...
paddle/fluid/operators/dequantize_log_op.cc
浏览文件 @
abe1dca3
...
@@ -76,7 +76,7 @@ class DequantizeLogOp : public framework::OperatorWithKernel {
...
@@ -76,7 +76,7 @@ class DequantizeLogOp : public framework::OperatorWithKernel {
}
}
framework
::
OpKernelType
GetExpectedKernelType
(
framework
::
OpKernelType
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
{
const
framework
::
ExecutionContext
&
ctx
)
const
override
{
auto
data_type
=
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"X"
);
auto
data_type
=
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"X"
);
auto
type
=
framework
::
OpKernelType
(
data_type
,
ctx
.
device_context
());
auto
type
=
framework
::
OpKernelType
(
data_type
,
ctx
.
device_context
());
return
type
;
return
type
;
...
...
paddle/fluid/operators/kron_op.cc
浏览文件 @
abe1dca3
...
@@ -39,7 +39,7 @@ class KronOp : public framework::OperatorWithKernel {
...
@@ -39,7 +39,7 @@ class KronOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
// only promote inputs’s types when contains complex input
// only promote inputs’s types when contains complex input
return
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
...
@@ -121,7 +121,7 @@ class KronGradOp : public framework::OperatorWithKernel {
...
@@ -121,7 +121,7 @@ class KronGradOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
// only promote inputs’s types when contains complex input
// only promote inputs’s types when contains complex input
return
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
...
...
paddle/fluid/operators/matmul_op.cc
浏览文件 @
abe1dca3
...
@@ -714,7 +714,7 @@ class MatMulOp : public framework::OperatorWithKernel {
...
@@ -714,7 +714,7 @@ class MatMulOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
// only promote inputs’s types when contains complex input
// only promote inputs’s types when contains complex input
return
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
...
...
paddle/fluid/operators/matmul_v2_op.cc
浏览文件 @
abe1dca3
...
@@ -150,7 +150,7 @@ class MatMulV2Op : public framework::OperatorWithKernel {
...
@@ -150,7 +150,7 @@ class MatMulV2Op : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
// only promote inputs’s types when contains complex input
// only promote inputs’s types when contains complex input
return
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
...
@@ -225,7 +225,7 @@ class MatMulV2OpGrad : public framework::OperatorWithKernel {
...
@@ -225,7 +225,7 @@ class MatMulV2OpGrad : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
if
(
framework
::
IsComplexType
(
expected_kernel_type
.
data_type_
))
{
// only promote inputs’s types when contains complex input
// only promote inputs’s types when contains complex input
return
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
...
...
paddle/fluid/operators/pad3d_op.cc
浏览文件 @
abe1dca3
...
@@ -54,7 +54,7 @@ class Pad3dOp : public framework::OperatorWithKernel {
...
@@ -54,7 +54,7 @@ class Pad3dOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
Tensor
&
tensor
,
const
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
#ifdef PADDLE_WITH_MKLDNN
#ifdef PADDLE_WITH_MKLDNN
if
((
expected_kernel_type
.
data_layout_
==
framework
::
DataLayout
::
kMKLDNN
)
&&
if
((
expected_kernel_type
.
data_layout_
==
framework
::
DataLayout
::
kMKLDNN
)
&&
(
tensor
.
layout
()
!=
framework
::
DataLayout
::
kMKLDNN
))
{
(
tensor
.
layout
()
!=
framework
::
DataLayout
::
kMKLDNN
))
{
...
...
paddle/fluid/operators/prelu_op.cc
浏览文件 @
abe1dca3
...
@@ -71,7 +71,7 @@ class PReluOp : public framework::OperatorWithKernel {
...
@@ -71,7 +71,7 @@ class PReluOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
Tensor
&
tensor
,
const
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
innerGetKernelTypeForVar
(
tensor
,
expected_kernel_type
);
return
innerGetKernelTypeForVar
(
tensor
,
expected_kernel_type
);
}
}
};
};
...
@@ -150,7 +150,7 @@ class PReluGradOp : public framework::OperatorWithKernel {
...
@@ -150,7 +150,7 @@ class PReluGradOp : public framework::OperatorWithKernel {
framework
::
OpKernelType
GetKernelTypeForVar
(
framework
::
OpKernelType
GetKernelTypeForVar
(
const
std
::
string
&
var_name
,
const
std
::
string
&
var_name
,
const
Tensor
&
tensor
,
const
Tensor
&
tensor
,
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
{
const
framework
::
OpKernelType
&
expected_kernel_type
)
const
override
{
return
innerGetKernelTypeForVar
(
tensor
,
expected_kernel_type
);
return
innerGetKernelTypeForVar
(
tensor
,
expected_kernel_type
);
}
}
};
};
...
...
paddle/phi/core/string_tensor.h
浏览文件 @
abe1dca3
...
@@ -123,7 +123,7 @@ class StringTensor : public TensorBase,
...
@@ -123,7 +123,7 @@ class StringTensor : public TensorBase,
}
}
void
*
AllocateFrom
(
Allocator
*
allocator
,
void
*
AllocateFrom
(
Allocator
*
allocator
,
DataType
dtype
,
DataType
dtype
,
size_t
requested_size
=
0
);
size_t
requested_size
=
0
)
override
;
dtype
::
pstring
*
mutable_data
(
const
phi
::
Place
&
place
,
dtype
::
pstring
*
mutable_data
(
const
phi
::
Place
&
place
,
size_t
requested_size
=
0
);
size_t
requested_size
=
0
);
...
...
paddle/phi/core/tensor_array.h
浏览文件 @
abe1dca3
...
@@ -83,7 +83,7 @@ class TensorArray : public TensorBase,
...
@@ -83,7 +83,7 @@ class TensorArray : public TensorBase,
/// \return Void pointer
/// \return Void pointer
void
*
AllocateFrom
(
Allocator
*
allocator
,
void
*
AllocateFrom
(
Allocator
*
allocator
,
DataType
dtype
,
DataType
dtype
,
size_t
requested_size
=
0
);
size_t
requested_size
=
0
)
override
;
bool
empty
()
const
{
return
tensors_
.
empty
();
}
bool
empty
()
const
{
return
tensors_
.
empty
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录