Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
a7fc02cb
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a7fc02cb
编写于
7月 28, 2020
作者:
F
fary86
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adjust source code format and check scripts, format source codes in
directory 'mindspore/core'
上级
16079e63
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
11 addition
and
13 deletion
+11
-13
mindspore/core/base/base_ref_utils.h
mindspore/core/base/base_ref_utils.h
+0
-1
mindspore/core/ir/anf.h
mindspore/core/ir/anf.h
+3
-1
mindspore/core/ir/pattern_matcher.h
mindspore/core/ir/pattern_matcher.h
+1
-3
mindspore/core/ir/primitive.cc
mindspore/core/ir/primitive.cc
+0
-1
mindspore/core/utils/flags.h
mindspore/core/utils/flags.h
+1
-1
scripts/check_clang_format.sh
scripts/check_clang_format.sh
+3
-3
scripts/format_source_code.sh
scripts/format_source_code.sh
+3
-3
未找到文件。
mindspore/core/base/base_ref_utils.h
浏览文件 @
a7fc02cb
...
...
@@ -21,7 +21,6 @@
#include "ir/tensor.h"
#include "base/base_ref.h"
#ifndef MINDSPORE_CCSRC_UTILS_BASE_REF_UTILS_H
#define MINDSPORE_CCSRC_UTILS_BASE_REF_UTILS_H
namespace
mindspore
{
...
...
mindspore/core/ir/anf.h
浏览文件 @
a7fc02cb
...
...
@@ -180,7 +180,9 @@ class AnfNode : public Base {
bool
HasUserData
(
const
std
::
string
&
key
)
const
{
return
user_data_
.
has
(
key
);
}
template
<
typename
T
>
bool
HasUserData
()
const
{
return
user_data_
.
has
(
T
::
key
);
}
bool
HasUserData
()
const
{
return
user_data_
.
has
(
T
::
key
);
}
protected:
// Hold a weak ref to Graph as Graph also hold ref to AnfNode.
...
...
mindspore/core/ir/pattern_matcher.h
浏览文件 @
a7fc02cb
...
...
@@ -40,9 +40,7 @@ namespace mindspore {
template
<
typename
T
>
class
PBase
{
public:
bool
CheckFunc
(
const
PredicateFuncType
&
func
,
const
AnfNodePtr
&
node
)
{
return
func
(
get_object
().
GetNode
(
node
));
}
bool
CheckFunc
(
const
PredicateFuncType
&
func
,
const
AnfNodePtr
&
node
)
{
return
func
(
get_object
().
GetNode
(
node
));
}
const
T
&
get_object
()
const
{
return
*
static_cast
<
const
T
*>
(
this
);
}
...
...
mindspore/core/ir/primitive.cc
浏览文件 @
a7fc02cb
...
...
@@ -19,7 +19,6 @@
#include <utility>
#include "abstract/abstract_function.h"
namespace
mindspore
{
abstract
::
AbstractBasePtr
Primitive
::
ToAbstract
()
{
...
...
mindspore/core/utils/flags.h
浏览文件 @
a7fc02cb
...
...
@@ -23,6 +23,6 @@ extern const char GRAPH_FLAG_HAS_EFFECT[];
extern
const
char
GRAPH_FLAG_EFFECT_PATIAL_ORDER
[];
extern
const
char
GRAPH_FLAG_RANDOM_EFFECT
[];
extern
const
char
GRAPH_FLAG_SIDE_EFFECT
[];
}
}
// namespace mindspore
#endif // MINDSPORE_CORE_UTILS_FLAGS_H
scripts/check_clang_format.sh
浏览文件 @
a7fc02cb
...
...
@@ -86,12 +86,12 @@ cd "${SCRIPTS_PATH}/.." || exit 1
CHECK_LIST_FILE
=
'__checked_files_list__'
if
[
"X
${
mode
}
"
==
"Xall"
]
;
then
find mindspore/
ccsrc
-type
f
-name
"*"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
CHECK_LIST_FILE
}
"
||
true
find mindspore/
{
ccsrc,core
}
-type
f
-name
"*"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
CHECK_LIST_FILE
}
"
||
true
elif
[
"X
${
mode
}
"
==
"Xchanged"
]
;
then
# --diff-filter=ACMRTUXB will ignore deleted files in commit
git diff
--diff-filter
=
ACMRTUXB
--name-only
|
grep
"mindspore/ccsrc"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
CHECK_LIST_FILE
}
"
||
true
git diff
--diff-filter
=
ACMRTUXB
--name-only
|
grep
"mindspore/ccsrc
\|
mindspore/core
"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
CHECK_LIST_FILE
}
"
||
true
else
# "X${mode}" == "Xlastcommit"
git diff
--diff-filter
=
ACMRTUXB
--name-only
HEAD~ HEAD |
grep
"mindspore/ccsrc"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
CHECK_LIST_FILE
}
"
||
true
git diff
--diff-filter
=
ACMRTUXB
--name-only
HEAD~ HEAD |
grep
"mindspore/ccsrc
\|
mindspore/core
"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
CHECK_LIST_FILE
}
"
||
true
fi
CHECK_RESULT_FILE
=
__code_format_check_result__
...
...
scripts/format_source_code.sh
浏览文件 @
a7fc02cb
...
...
@@ -86,11 +86,11 @@ cd "${SCRIPTS_PATH}/.." || exit 1
FMT_FILE_LIST
=
'__format_files_list__'
if
[[
"X
${
mode
}
"
==
"Xall"
]]
;
then
find mindspore/
ccsrc
-type
f
-name
"*"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
FMT_FILE_LIST
}
"
||
true
find mindspore/
{
ccsrc,core
}
-type
f
-name
"*"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
FMT_FILE_LIST
}
"
||
true
elif
[[
"X
${
mode
}
"
==
"Xchanged"
]]
;
then
git diff
--name-only
|
grep
"mindspore/ccsrc"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
FMT_FILE_LIST
}
"
||
true
git diff
--name-only
|
grep
"mindspore/ccsrc
\|
mindspore/core
"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
FMT_FILE_LIST
}
"
||
true
else
# "X${mode}" == "Xlastcommit"
git diff
--name-only
HEAD~ HEAD |
grep
"mindspore/ccsrc"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
FMT_FILE_LIST
}
"
||
true
git diff
--name-only
HEAD~ HEAD |
grep
"mindspore/ccsrc
\|
mindspore/core
"
|
grep
"
\.
h
$\
|
\.
cc$"
>
"
${
FMT_FILE_LIST
}
"
||
true
fi
while
read
line
;
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录