Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
2f8901cb
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看板
未验证
提交
2f8901cb
编写于
11月 16, 2022
作者:
L
Leo Chen
提交者:
GitHub
11月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
increase the level of some log (#47990)
上级
0d507fc2
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
20 addition
and
20 deletion
+20
-20
paddle/fluid/eager/auto_code_generator/eager_generator.cc
paddle/fluid/eager/auto_code_generator/eager_generator.cc
+1
-1
paddle/fluid/eager/auto_code_generator/generator/python_c_gen.py
...fluid/eager/auto_code_generator/generator/python_c_gen.py
+2
-2
paddle/fluid/eager/to_static/run_program_op_func.h
paddle/fluid/eager/to_static/run_program_op_func.h
+2
-2
paddle/fluid/framework/attribute_checker.h
paddle/fluid/framework/attribute_checker.h
+1
-1
paddle/fluid/imperative/tracer.cc
paddle/fluid/imperative/tracer.cc
+1
-1
paddle/fluid/pybind/eager_functions.cc
paddle/fluid/pybind/eager_functions.cc
+1
-1
paddle/fluid/pybind/eager_math_op_patch.cc
paddle/fluid/pybind/eager_math_op_patch.cc
+5
-5
paddle/fluid/pybind/eager_method.cc
paddle/fluid/pybind/eager_method.cc
+1
-1
paddle/fluid/pybind/eager_utils.cc
paddle/fluid/pybind/eager_utils.cc
+3
-3
paddle/phi/infermeta/binary.cc
paddle/phi/infermeta/binary.cc
+2
-2
paddle/phi/infermeta/unary.cc
paddle/phi/infermeta/unary.cc
+1
-1
未找到文件。
paddle/fluid/eager/auto_code_generator/eager_generator.cc
浏览文件 @
2f8901cb
...
@@ -592,7 +592,7 @@ static bool CheckOpProto(proto::OpProto* op_proto) {
...
@@ -592,7 +592,7 @@ static bool CheckOpProto(proto::OpProto* op_proto) {
}
}
// Only handle matmul_v2 for now
// Only handle matmul_v2 for now
VLOG
(
1
)
<<
"------ Analyzing Op ------: "
<<
op_type
;
VLOG
(
3
)
<<
"------ Analyzing Op ------: "
<<
op_type
;
return
true
;
return
true
;
}
}
...
...
paddle/fluid/eager/auto_code_generator/generator/python_c_gen.py
浏览文件 @
2f8901cb
...
@@ -115,7 +115,7 @@ NOAMP_DYGRAPH_FUNCTION_TEMPLATE = "decltype({}({})) out = {}({});"
...
@@ -115,7 +115,7 @@ NOAMP_DYGRAPH_FUNCTION_TEMPLATE = "decltype({}({})) out = {}({});"
FUNCTION_SET_DEVICE_TEMPLATE
=
"""{} if (paddle::platform::is_gpu_place(place)) {{
FUNCTION_SET_DEVICE_TEMPLATE
=
"""{} if (paddle::platform::is_gpu_place(place)) {{
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
phi::backends::gpu::SetDeviceId(place.device);
phi::backends::gpu::SetDeviceId(place.device);
VLOG(
1
) <<"CurrentDeviceId: " << phi::backends::gpu::GetCurrentDeviceId() << " from " << (int)place.device;
VLOG(
4
) <<"CurrentDeviceId: " << phi::backends::gpu::GetCurrentDeviceId() << " from " << (int)place.device;
#else
#else
PADDLE_THROW(paddle::platform::errors::PreconditionNotMet(
PADDLE_THROW(paddle::platform::errors::PreconditionNotMet(
"PaddlePaddle should compile with GPU if use CUDAPlace."));
"PaddlePaddle should compile with GPU if use CUDAPlace."));
...
@@ -124,7 +124,7 @@ FUNCTION_SET_DEVICE_TEMPLATE = """{} if (paddle::platform::is_gpu_place(place
...
@@ -124,7 +124,7 @@ FUNCTION_SET_DEVICE_TEMPLATE = """{} if (paddle::platform::is_gpu_place(place
if (paddle::platform::is_custom_place(place)) {{
if (paddle::platform::is_custom_place(place)) {{
#if defined(PADDLE_WITH_CUSTOM_DEVICE)
#if defined(PADDLE_WITH_CUSTOM_DEVICE)
phi::DeviceManager::SetDevice(place);
phi::DeviceManager::SetDevice(place);
VLOG(
1
) <<"CurrentDeviceId: " << phi::DeviceManager::GetDevice(place.GetDeviceType()) << " from " << (int)place.device;
VLOG(
4
) <<"CurrentDeviceId: " << phi::DeviceManager::GetDevice(place.GetDeviceType()) << " from " << (int)place.device;
#else
#else
PADDLE_THROW(paddle::platform::errors::PreconditionNotMet(
PADDLE_THROW(paddle::platform::errors::PreconditionNotMet(
"PaddlePaddle should compile with CUSTOM_DEVICE if use CustomPlace."));
"PaddlePaddle should compile with CUSTOM_DEVICE if use CustomPlace."));
...
...
paddle/fluid/eager/to_static/run_program_op_func.h
浏览文件 @
2f8901cb
...
@@ -32,7 +32,7 @@ static void clear_no_grad_edges(
...
@@ -32,7 +32,7 @@ static void clear_no_grad_edges(
for
(
size_t
i
=
0
;
i
<
params
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
params
.
size
();
++
i
)
{
auto
p_grad_name
=
paddle
::
framework
::
GradVarName
(
params
[
i
].
name
());
auto
p_grad_name
=
paddle
::
framework
::
GradVarName
(
params
[
i
].
name
());
if
(
!
block_desc
->
HasVar
(
p_grad_name
))
{
if
(
!
block_desc
->
HasVar
(
p_grad_name
))
{
VLOG
(
1
)
<<
"clear edge of "
<<
p_grad_name
;
VLOG
(
3
)
<<
"clear edge of "
<<
p_grad_name
;
grad_node
->
MutableOutputMeta
()[
slot_id
][
i
].
GetMutableEdge
().
Clear
();
grad_node
->
MutableOutputMeta
()[
slot_id
][
i
].
GetMutableEdge
().
Clear
();
}
}
}
}
...
@@ -48,7 +48,7 @@ static void clear_no_grad_edges_with_partial_block(
...
@@ -48,7 +48,7 @@ static void clear_no_grad_edges_with_partial_block(
auto
p_grad_name
=
paddle
::
framework
::
GradVarName
(
params
[
i
].
name
());
auto
p_grad_name
=
paddle
::
framework
::
GradVarName
(
params
[
i
].
name
());
if
(
!
forward_block_desc
->
HasVar
(
p_grad_name
)
&&
if
(
!
forward_block_desc
->
HasVar
(
p_grad_name
)
&&
!
backward_block_desc
->
HasVar
(
p_grad_name
))
{
!
backward_block_desc
->
HasVar
(
p_grad_name
))
{
VLOG
(
1
)
<<
"clear edge of "
<<
p_grad_name
;
VLOG
(
3
)
<<
"clear edge of "
<<
p_grad_name
;
grad_node
->
MutableOutputMeta
()[
slot_id
][
i
].
GetMutableEdge
().
Clear
();
grad_node
->
MutableOutputMeta
()[
slot_id
][
i
].
GetMutableEdge
().
Clear
();
}
}
}
}
...
...
paddle/fluid/framework/attribute_checker.h
浏览文件 @
2f8901cb
...
@@ -249,7 +249,7 @@ class TypedAttrChecker {
...
@@ -249,7 +249,7 @@ class TypedAttrChecker {
"doesn't support phi::DenseTensor type."
,
"doesn't support phi::DenseTensor type."
,
attr_name_
));
attr_name_
));
VLOG
(
1
)
<<
"Found Attribute "
<<
attr_name_
<<
" with type(Variable)."
;
VLOG
(
3
)
<<
"Found Attribute "
<<
attr_name_
<<
" with type(Variable)."
;
var_info_checker_
(
it
->
second
);
var_info_checker_
(
it
->
second
);
return
;
return
;
}
}
...
...
paddle/fluid/imperative/tracer.cc
浏览文件 @
2f8901cb
...
@@ -223,7 +223,7 @@ void Tracer::TraceOpImpl(const std::string& type,
...
@@ -223,7 +223,7 @@ void Tracer::TraceOpImpl(const std::string& type,
platform
::
RecordEvent
op_type_record_event
(
platform
::
RecordEvent
op_type_record_event
(
type
,
platform
::
TracerEventType
::
Operator
,
1
);
type
,
platform
::
TracerEventType
::
Operator
,
1
);
platform
::
ScopedFlushDenormal
flush
;
platform
::
ScopedFlushDenormal
flush
;
VLOG
(
1
)
<<
"Trace Op: "
<<
type
;
VLOG
(
4
)
<<
"Trace Op: "
<<
type
;
if
(
FLAGS_use_mkldnn
)
{
if
(
FLAGS_use_mkldnn
)
{
// if both lists are empty all ops are enabled (default for
// if both lists are empty all ops are enabled (default for
// FLAGS_use_mkldnn=1)
// FLAGS_use_mkldnn=1)
...
...
paddle/fluid/pybind/eager_functions.cc
浏览文件 @
2f8901cb
...
@@ -161,7 +161,7 @@ static PyObject* eager_api_run_partial_grad(PyObject* self,
...
@@ -161,7 +161,7 @@ static PyObject* eager_api_run_partial_grad(PyObject* self,
only_inputs
,
only_inputs
,
allow_unused
,
allow_unused
,
no_grad_vars
);
no_grad_vars
);
VLOG
(
1
)
<<
" in eager_api_run_partial_grad, after runing egr::Grad"
;
VLOG
(
4
)
<<
" in eager_api_run_partial_grad, after runing egr::Grad"
;
}
}
return
ToPyObject
(
result
,
true
/* return_py_none_if_not_initialize */
);
return
ToPyObject
(
result
,
true
/* return_py_none_if_not_initialize */
);
EAGER_CATCH_AND_THROW_RETURN_NULL
EAGER_CATCH_AND_THROW_RETURN_NULL
...
...
paddle/fluid/pybind/eager_math_op_patch.cc
浏览文件 @
2f8901cb
...
@@ -349,7 +349,7 @@ static PyObject* tensor__rsub__method(TensorObject* self,
...
@@ -349,7 +349,7 @@ static PyObject* tensor__rsub__method(TensorObject* self,
1
);
1
);
EAGER_TRY
EAGER_TRY
VLOG
(
1
)
<<
"Running Eager tensor__rsub__method"
;
VLOG
(
4
)
<<
"Running Eager tensor__rsub__method"
;
// Set Device ID
// Set Device ID
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
...
@@ -771,7 +771,7 @@ static PyObject* tensor__gt__method(TensorObject* self,
...
@@ -771,7 +771,7 @@ static PyObject* tensor__gt__method(TensorObject* self,
1
);
1
);
EAGER_TRY
EAGER_TRY
VLOG
(
1
)
<<
"Running Eager tensor__gt__method"
;
VLOG
(
4
)
<<
"Running Eager tensor__gt__method"
;
// Set Device ID
// Set Device ID
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
...
@@ -857,7 +857,7 @@ static PyObject* tensor__ge__method(TensorObject* self,
...
@@ -857,7 +857,7 @@ static PyObject* tensor__ge__method(TensorObject* self,
1
);
1
);
EAGER_TRY
EAGER_TRY
VLOG
(
1
)
<<
"Running Eager tensor__ge__method"
;
VLOG
(
4
)
<<
"Running Eager tensor__ge__method"
;
// Set Device ID
// Set Device ID
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
...
@@ -1134,7 +1134,7 @@ static PyObject* tensor__lt__method(TensorObject* self,
...
@@ -1134,7 +1134,7 @@ static PyObject* tensor__lt__method(TensorObject* self,
1
);
1
);
EAGER_TRY
EAGER_TRY
VLOG
(
1
)
<<
"Running Eager tensor__lt__method"
;
VLOG
(
4
)
<<
"Running Eager tensor__lt__method"
;
// Set Device ID
// Set Device ID
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
...
@@ -1220,7 +1220,7 @@ static PyObject* tensor__le__method(TensorObject* self,
...
@@ -1220,7 +1220,7 @@ static PyObject* tensor__le__method(TensorObject* self,
1
);
1
);
EAGER_TRY
EAGER_TRY
VLOG
(
1
)
<<
"Running Eager tensor__le__method"
;
VLOG
(
4
)
<<
"Running Eager tensor__le__method"
;
// Set Device ID
// Set Device ID
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
auto
place
=
egr
::
Controller
::
Instance
().
GetExpectedPlace
();
...
...
paddle/fluid/pybind/eager_method.cc
浏览文件 @
2f8901cb
...
@@ -800,7 +800,7 @@ static PyObject* tensor_method__get_tensor_from_selected_rows(
...
@@ -800,7 +800,7 @@ static PyObject* tensor_method__get_tensor_from_selected_rows(
auto
*
dense_tensor
=
auto
*
dense_tensor
=
static_cast
<
phi
::
DenseTensor
*>
(
selected_rows
->
mutable_value
());
static_cast
<
phi
::
DenseTensor
*>
(
selected_rows
->
mutable_value
());
VLOG
(
1
)
<<
"dense_tensor: "
<<
dense_tensor
->
IsInitialized
();
VLOG
(
4
)
<<
"dense_tensor: "
<<
dense_tensor
->
IsInitialized
();
auto
t
=
paddle
::
experimental
::
Tensor
(
auto
t
=
paddle
::
experimental
::
Tensor
(
egr
::
Controller
::
Instance
().
GenerateUniqueName
());
egr
::
Controller
::
Instance
().
GenerateUniqueName
());
...
...
paddle/fluid/pybind/eager_utils.cc
浏览文件 @
2f8901cb
...
@@ -1243,7 +1243,7 @@ paddle::experimental::Scalar CastNumpy2Scalar(PyObject* obj,
...
@@ -1243,7 +1243,7 @@ paddle::experimental::Scalar CastNumpy2Scalar(PyObject* obj,
ssize_t
arg_pos
)
{
ssize_t
arg_pos
)
{
PyTypeObject
*
type
=
obj
->
ob_type
;
PyTypeObject
*
type
=
obj
->
ob_type
;
auto
type_name
=
std
::
string
(
type
->
tp_name
);
auto
type_name
=
std
::
string
(
type
->
tp_name
);
VLOG
(
1
)
<<
"type_name: "
<<
type_name
;
VLOG
(
4
)
<<
"type_name: "
<<
type_name
;
if
(
type_name
==
"numpy.ndarray"
&&
PySequence_Check
(
obj
))
{
if
(
type_name
==
"numpy.ndarray"
&&
PySequence_Check
(
obj
))
{
PyObject
*
item
=
nullptr
;
PyObject
*
item
=
nullptr
;
item
=
PySequence_GetItem
(
obj
,
0
);
item
=
PySequence_GetItem
(
obj
,
0
);
...
@@ -1296,7 +1296,7 @@ paddle::experimental::Scalar CastPyArg2Scalar(PyObject* obj,
...
@@ -1296,7 +1296,7 @@ paddle::experimental::Scalar CastPyArg2Scalar(PyObject* obj,
// obj could be: int, float, bool, paddle.Tensor
// obj could be: int, float, bool, paddle.Tensor
PyTypeObject
*
type
=
obj
->
ob_type
;
PyTypeObject
*
type
=
obj
->
ob_type
;
auto
type_name
=
std
::
string
(
type
->
tp_name
);
auto
type_name
=
std
::
string
(
type
->
tp_name
);
VLOG
(
1
)
<<
"type_name: "
<<
type_name
;
VLOG
(
4
)
<<
"type_name: "
<<
type_name
;
if
(
PyBool_Check
(
obj
))
{
if
(
PyBool_Check
(
obj
))
{
bool
value
=
CastPyArg2Boolean
(
obj
,
op_type
,
arg_pos
);
bool
value
=
CastPyArg2Boolean
(
obj
,
op_type
,
arg_pos
);
return
paddle
::
experimental
::
Scalar
(
value
);
return
paddle
::
experimental
::
Scalar
(
value
);
...
@@ -1348,7 +1348,7 @@ std::vector<phi::Scalar> CastPyArg2ScalarArray(PyObject* obj,
...
@@ -1348,7 +1348,7 @@ std::vector<phi::Scalar> CastPyArg2ScalarArray(PyObject* obj,
PyTypeObject
*
type
=
obj
->
ob_type
;
PyTypeObject
*
type
=
obj
->
ob_type
;
auto
type_name
=
std
::
string
(
type
->
tp_name
);
auto
type_name
=
std
::
string
(
type
->
tp_name
);
VLOG
(
1
)
<<
"type_name: "
<<
type_name
;
VLOG
(
4
)
<<
"type_name: "
<<
type_name
;
if
(
PyList_Check
(
obj
))
{
if
(
PyList_Check
(
obj
))
{
Py_ssize_t
len
=
PyList_Size
(
obj
);
Py_ssize_t
len
=
PyList_Size
(
obj
);
PyObject
*
item
=
nullptr
;
PyObject
*
item
=
nullptr
;
...
...
paddle/phi/infermeta/binary.cc
浏览文件 @
2f8901cb
...
@@ -195,10 +195,10 @@ void BincountInferMeta(const MetaTensor& x,
...
@@ -195,10 +195,10 @@ void BincountInferMeta(const MetaTensor& x,
"But the dimension of Input(X) is [%d]"
,
"But the dimension of Input(X) is [%d]"
,
input_dim
.
size
()));
input_dim
.
size
()));
VLOG
(
1
)
<<
"####### CHECK weights"
;
VLOG
(
4
)
<<
"####### CHECK weights"
;
if
(
weights
)
{
if
(
weights
)
{
auto
weights_dim
=
weights
.
dims
();
auto
weights_dim
=
weights
.
dims
();
VLOG
(
1
)
<<
"##### weights_dim "
<<
weights_dim
;
VLOG
(
4
)
<<
"##### weights_dim "
<<
weights_dim
;
PADDLE_ENFORCE_EQ
(
weights_dim
.
size
(),
PADDLE_ENFORCE_EQ
(
weights_dim
.
size
(),
1
,
1
,
phi
::
errors
::
InvalidArgument
(
phi
::
errors
::
InvalidArgument
(
...
...
paddle/phi/infermeta/unary.cc
浏览文件 @
2f8901cb
...
@@ -3732,7 +3732,7 @@ void StridedSliceRawInferMeta(const MetaTensor& x,
...
@@ -3732,7 +3732,7 @@ void StridedSliceRawInferMeta(const MetaTensor& x,
}
}
out_dims
=
phi
::
make_ddim
(
new_out_shape
);
out_dims
=
phi
::
make_ddim
(
new_out_shape
);
}
}
VLOG
(
1
)
<<
"out_dims: "
<<
out_dims
;
VLOG
(
4
)
<<
"out_dims: "
<<
out_dims
;
out
->
set_dims
(
out_dims
);
out
->
set_dims
(
out_dims
);
out
->
share_lod
(
x
);
out
->
share_lod
(
x
);
out
->
set_dtype
(
x
.
dtype
());
out
->
set_dtype
(
x
.
dtype
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录