Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
26de4540
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看板
提交
26de4540
编写于
8月 18, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4639 rename param_value to param_info
Merge pull request !4639 from vlne-v1/rename_param_value
上级
406ce735
c1c30a44
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
48 addition
and
49 deletion
+48
-49
mindspore/ccsrc/backend/session/ascend_inference_session.cc
mindspore/ccsrc/backend/session/ascend_inference_session.cc
+1
-1
mindspore/ccsrc/backend/session/kernel_graph.cc
mindspore/ccsrc/backend/session/kernel_graph.cc
+1
-1
mindspore/ccsrc/backend/session/session_basic.cc
mindspore/ccsrc/backend/session/session_basic.cc
+1
-1
mindspore/ccsrc/debug/anf_ir_utils.cc
mindspore/ccsrc/debug/anf_ir_utils.cc
+1
-1
mindspore/ccsrc/debug/draw.cc
mindspore/ccsrc/debug/draw.cc
+1
-1
mindspore/ccsrc/frontend/parallel/graph_util/node_info.cc
mindspore/ccsrc/frontend/parallel/graph_util/node_info.cc
+1
-1
mindspore/ccsrc/frontend/parallel/step_auto_parallel.cc
mindspore/ccsrc/frontend/parallel/step_auto_parallel.cc
+1
-1
mindspore/ccsrc/frontend/parallel/step_parallel.cc
mindspore/ccsrc/frontend/parallel/step_parallel.cc
+1
-1
mindspore/ccsrc/pipeline/jit/action.cc
mindspore/ccsrc/pipeline/jit/action.cc
+1
-1
mindspore/ccsrc/pipeline/jit/parse/resolve.cc
mindspore/ccsrc/pipeline/jit/parse/resolve.cc
+1
-1
mindspore/ccsrc/pipeline/jit/pipeline.cc
mindspore/ccsrc/pipeline/jit/pipeline.cc
+1
-1
mindspore/ccsrc/pipeline/pynative/pynative_execute.cc
mindspore/ccsrc/pipeline/pynative/pynative_execute.cc
+1
-1
mindspore/ccsrc/pybind_api/ir/param_info_py.cc
mindspore/ccsrc/pybind_api/ir/param_info_py.cc
+11
-11
mindspore/ccsrc/transform/onnx/ir_exporter.cc
mindspore/ccsrc/transform/onnx/ir_exporter.cc
+1
-1
mindspore/ccsrc/transform/onnx/onnx_exporter.cc
mindspore/ccsrc/transform/onnx/onnx_exporter.cc
+1
-1
mindspore/ccsrc/utils/callbacks_ge.cc
mindspore/ccsrc/utils/callbacks_ge.cc
+1
-1
mindspore/ccsrc/utils/convert_utils.cc
mindspore/ccsrc/utils/convert_utils.cc
+5
-5
mindspore/ccsrc/utils/load_onnx/anf_model_parser.cc
mindspore/ccsrc/utils/load_onnx/anf_model_parser.cc
+1
-1
mindspore/common/parameter.py
mindspore/common/parameter.py
+2
-2
mindspore/core/ir/anf.h
mindspore/core/ir/anf.h
+2
-2
mindspore/core/ir/func_graph_cloner.cc
mindspore/core/ir/func_graph_cloner.cc
+1
-1
mindspore/core/ir/param_info.h
mindspore/core/ir/param_info.h
+8
-8
mindspore/lite/src/param_value_lite.h
mindspore/lite/src/param_value_lite.h
+0
-1
tests/ut/cpp/pre_activate/ascend/enhancer/insert_memcpy_async_for_hccl_op_test.cc
...e/ascend/enhancer/insert_memcpy_async_for_hccl_op_test.cc
+1
-1
tests/ut/cpp/session/anf_runtime_algorithm_test.cc
tests/ut/cpp/session/anf_runtime_algorithm_test.cc
+1
-1
tests/ut/cpp/session/kernel_graph_test.cc
tests/ut/cpp/session/kernel_graph_test.cc
+1
-1
未找到文件。
mindspore/ccsrc/backend/session/ascend_inference_session.cc
浏览文件 @
26de4540
...
...
@@ -19,7 +19,7 @@
#include "frontend/operator/ops.h"
#include "ir/tensor.h"
#include "ir/anf.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "runtime/device/kernel_runtime.h"
#include "backend/session/anf_runtime_algorithm.h"
#include "utils/ms_utils.h"
...
...
mindspore/ccsrc/backend/session/kernel_graph.cc
浏览文件 @
26de4540
...
...
@@ -19,7 +19,7 @@
#include <unordered_set>
#include <set>
#include "frontend/operator/ops.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "backend/session/anf_runtime_algorithm.h"
#include "runtime/device/kernel_info.h"
#include "backend/kernel_compiler/kernel_build_info.h"
...
...
mindspore/ccsrc/backend/session/session_basic.cc
浏览文件 @
26de4540
...
...
@@ -20,7 +20,7 @@
#include <unordered_set>
#include "pipeline/jit/parse/data_converter.h"
#include "ir/manager.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "backend/kernel_compiler/common_utils.h"
#include "frontend/operator/ops.h"
#include "common/trans.h"
...
...
mindspore/ccsrc/debug/anf_ir_utils.cc
浏览文件 @
26de4540
...
...
@@ -26,7 +26,7 @@
#include "ir/graph_utils.h"
#include "utils/symbolic.h"
#include "ir/meta_func_graph.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "pybind_api/ir/tensor_py.h"
#include "pipeline/jit/parse/python_adapter.h"
#include "pipeline/jit/parse/resolve.h"
...
...
mindspore/ccsrc/debug/draw.cc
浏览文件 @
26de4540
...
...
@@ -24,7 +24,7 @@
#include <string>
#include "ir/meta_func_graph.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "ir/primitive.h"
#include "ir/graph_utils.h"
#include "utils/utils.h"
...
...
mindspore/ccsrc/frontend/parallel/graph_util/node_info.cc
浏览文件 @
26de4540
...
...
@@ -19,7 +19,7 @@
#include <string>
#include "ir/anf.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "pipeline/jit/parse/python_adapter.h"
namespace
mindspore
{
...
...
mindspore/ccsrc/frontend/parallel/step_auto_parallel.cc
浏览文件 @
26de4540
...
...
@@ -28,7 +28,7 @@
#include <vector>
#include "ir/anf.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "ir/tensor.h"
#include "frontend/optimizer/opt.h"
#include "frontend/optimizer/optimizer.h"
...
...
mindspore/ccsrc/frontend/parallel/step_parallel.cc
浏览文件 @
26de4540
...
...
@@ -28,7 +28,7 @@
#include <utility>
#include "ir/tensor.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "frontend/operator/ops.h"
#include "frontend/optimizer/optimizer.h"
#include "frontend/parallel/auto_parallel/graph_costmodel.h"
...
...
mindspore/ccsrc/pipeline/jit/action.cc
浏览文件 @
26de4540
...
...
@@ -24,7 +24,7 @@
#include <functional>
#include "ir/func_graph_cloner.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "frontend/parallel/costmodel_context.h"
#include "frontend/parallel/context.h"
#include "pipeline/jit/pass.h"
...
...
mindspore/ccsrc/pipeline/jit/parse/resolve.cc
浏览文件 @
26de4540
...
...
@@ -21,7 +21,7 @@
#include <vector>
#include <algorithm>
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "pipeline/jit/parse/data_converter.h"
#include "pipeline/jit/parse/parse.h"
#include "pipeline/jit/parse/python_adapter.h"
...
...
mindspore/ccsrc/pipeline/jit/pipeline.cc
浏览文件 @
26de4540
...
...
@@ -24,7 +24,7 @@
#include <cstdlib>
#include <algorithm>
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "pipeline/jit/pass.h"
#include "pipeline/jit/parse/data_converter.h"
#include "frontend/optimizer/ad/dfunctor.h"
...
...
mindspore/ccsrc/pipeline/pynative/pynative_execute.cc
浏览文件 @
26de4540
...
...
@@ -24,7 +24,7 @@
#include "debug/trace.h"
#include "pybind_api/ir/tensor_py.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "utils/any.h"
#include "utils/utils.h"
#include "utils/ms_context.h"
...
...
mindspore/ccsrc/pybind_api/ir/param_
value
_py.cc
→
mindspore/ccsrc/pybind_api/ir/param_
info
_py.cc
浏览文件 @
26de4540
...
...
@@ -13,30 +13,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "pybind11/pybind11.h"
#include "pybind_api/api_register.h"
namespace
mindspore
{
namespace
py
=
pybind11
;
REGISTER_PYBIND_DEFINE
(
Param
Value
,
([](
const
py
::
module
*
m
)
{
(
void
)
py
::
class_
<
Param
Value
,
ParamValuePtr
>
(
*
m
,
"ParamValue
"
)
REGISTER_PYBIND_DEFINE
(
Param
Info
,
([](
const
py
::
module
*
m
)
{
(
void
)
py
::
class_
<
Param
Info
,
ParamValuePtr
>
(
*
m
,
"ParamInfo
"
)
.
def
(
py
::
init
())
.
def
(
"clone"
,
&
Param
Value
::
Clone
)
.
def_property
(
"name"
,
&
Param
Value
::
name
,
&
ParamValue
::
set_name
)
.
def_property
(
"requires_grad"
,
&
Param
Value
::
requires_grad
,
&
ParamValue
::
set_requires_grad
)
.
def_property
(
"layerwise_parallel"
,
&
Param
Value
::
layerwise_parallel
,
&
Param
Value
::
set_layerwise_parallel
)
.
def
(
"clone"
,
&
Param
Info
::
Clone
)
.
def_property
(
"name"
,
&
Param
Info
::
name
,
&
ParamInfo
::
set_name
)
.
def_property
(
"requires_grad"
,
&
Param
Info
::
requires_grad
,
&
ParamInfo
::
set_requires_grad
)
.
def_property
(
"layerwise_parallel"
,
&
Param
Info
::
layerwise_parallel
,
&
Param
Info
::
set_layerwise_parallel
)
.
def
(
py
::
pickle
(
[](
const
Param
Value
&
p
)
{
// __getstate__
[](
const
Param
Info
&
p
)
{
// __getstate__
return
py
::
make_tuple
(
p
.
name
(),
p
.
requires_grad
(),
p
.
layerwise_parallel
());
},
[](
const
py
::
tuple
&
t
)
{
// __setstate__
if
(
t
.
size
()
!=
6
)
{
std
::
runtime_error
(
"Invalid state for Param
Value
!"
);
std
::
runtime_error
(
"Invalid state for Param
Info
!"
);
}
ParamValuePtr
p
=
std
::
make_shared
<
Param
Value
>
();
ParamValuePtr
p
=
std
::
make_shared
<
Param
Info
>
();
p
->
set_name
(
t
[
1
].
cast
<
std
::
string
>
());
p
->
set_requires_grad
(
t
[
2
].
cast
<
bool
>
());
p
->
set_layerwise_parallel
(
t
[
3
].
cast
<
bool
>
());
...
...
mindspore/ccsrc/transform/onnx/ir_exporter.cc
浏览文件 @
26de4540
...
...
@@ -24,7 +24,7 @@
#include <functional>
#include "ir/tensor.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "debug/anf_ir_utils.h"
#include "frontend/operator/ops.h"
#include "proto/onnx.pb.h"
...
...
mindspore/ccsrc/transform/onnx/onnx_exporter.cc
浏览文件 @
26de4540
...
...
@@ -27,7 +27,7 @@
#include "proto/onnx.pb.h"
#include "frontend/operator/ops.h"
#include "ir/tensor.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
namespace
mindspore
{
enum
OpMergeMode
{
...
...
mindspore/ccsrc/utils/callbacks_ge.cc
浏览文件 @
26de4540
...
...
@@ -16,7 +16,7 @@
#include "utils/callbacks_ge.h"
#include "pybind11/pybind11.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "transform/graph_ir/df_graph_manager.h"
#include "transform/graph_ir/util.h"
#include "pipeline/jit/parse/data_converter.h"
...
...
mindspore/ccsrc/utils/convert_utils.cc
浏览文件 @
26de4540
...
...
@@ -30,7 +30,7 @@
#include "pipeline/jit/parse/parse_base.h"
#include "ir/value.h"
#include "ir/tensor.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "utils/base_ref_extends.h"
#include "utils/ms_context.h"
...
...
@@ -483,8 +483,8 @@ bool IsGraphOutputValueNodeOrParameter(const AnfNodePtr &output, const py::tuple
// Isomorphism
static
bool
SameNode
(
const
AnfNodePtr
&
node1
,
const
AnfNodePtr
&
node2
,
FuncGraphPairMapEquiv
*
equiv_func_graph
,
NodeMapEquiv
*
const
equiv_node
);
bool
SameNodeShallow
(
const
AnfNodePtr
&
node1
,
const
AnfNodePtr
&
node2
,
FuncGraphPairMapEquiv
*
equiv_func_graph
,
NodeMapEquiv
*
const
equiv_node
)
{
static
bool
SameNodeShallow
(
const
AnfNodePtr
&
node1
,
const
AnfNodePtr
&
node2
,
FuncGraphPairMapEquiv
*
equiv_func_graph
,
NodeMapEquiv
*
const
equiv_node
)
{
if
(
equiv_node
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"Invalid equiv_node"
;
return
false
;
...
...
@@ -523,8 +523,8 @@ bool SameNodeShallow(const AnfNodePtr &node1, const AnfNodePtr &node2, FuncGraph
return
false
;
}
static
bool
SameNode
(
const
AnfNodePtr
&
node1
,
const
AnfNodePtr
&
node2
,
FuncGraphPairMapEquiv
*
equiv_func_graph
,
NodeMapEquiv
*
const
equiv_node
)
{
bool
SameNode
(
const
AnfNodePtr
&
node1
,
const
AnfNodePtr
&
node2
,
FuncGraphPairMapEquiv
*
equiv_func_graph
,
NodeMapEquiv
*
const
equiv_node
)
{
MS_EXCEPTION_IF_NULL
(
node1
);
MS_EXCEPTION_IF_NULL
(
node2
);
if
(
node1
->
isa
<
CNode
>
()
&&
node2
->
isa
<
CNode
>
())
{
...
...
mindspore/ccsrc/utils/load_onnx/anf_model_parser.cc
浏览文件 @
26de4540
...
...
@@ -22,7 +22,7 @@
#include <vector>
#include "google/protobuf/io/zero_copy_stream_impl.h"
#include "ir/tensor.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "frontend/operator/ops.h"
#include "abstract/abstract_value.h"
#include "proto/onnx.pb.h"
...
...
mindspore/common/parameter.py
浏览文件 @
26de4540
...
...
@@ -15,7 +15,7 @@
"""Parameter for cell."""
from
copy
import
copy
from
.._c_expression
import
Param
Value
from
.._c_expression
import
Param
Info
from
.
import
dtype
as
mstype
from
.initializer
import
initializer
,
Initializer
from
.tensor
import
Tensor
,
MetaTensor
...
...
@@ -79,7 +79,7 @@ class Parameter(MetaTensor):
Parameter
,
(
data
,
self
.
name
,
self
.
requires_grad
,
self
.
layerwise_parallel
))
def
__init__
(
self
,
default_input
,
name
,
requires_grad
=
True
,
layerwise_parallel
=
False
):
self
.
_value
=
Param
Value
()
self
.
_value
=
Param
Info
()
self
.
name
=
name
self
.
requires_grad
=
requires_grad
self
.
layerwise_parallel
=
layerwise_parallel
...
...
mindspore/core/ir/anf.h
浏览文件 @
26de4540
...
...
@@ -74,8 +74,8 @@ using VarPtr = std::shared_ptr<Var>;
class
AnfIrVisitor
;
class
Param
Value
;
using
ParamValuePtr
=
std
::
shared_ptr
<
Param
Value
>
;
class
Param
Info
;
using
ParamValuePtr
=
std
::
shared_ptr
<
Param
Info
>
;
// AnfNode is the basic class of the IR definition derived from Base.
// Only two types of nodes are derived: CNode and ANode.
...
...
mindspore/core/ir/func_graph_cloner.cc
浏览文件 @
26de4540
...
...
@@ -19,7 +19,7 @@
#include <algorithm>
#include "ir/manager.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "base/core_ops.h"
#include "utils/convert_utils_base.h"
#include "utils/log_adapter.h"
...
...
mindspore/core/ir/param_
value
.h
→
mindspore/core/ir/param_
info
.h
浏览文件 @
26de4540
...
...
@@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef MINDSPORE_CORE_IR_PARAM_
VALUE
_H_
#define MINDSPORE_CORE_IR_PARAM_
VALUE
_H_
#ifndef MINDSPORE_CORE_IR_PARAM_
INFO
_H_
#define MINDSPORE_CORE_IR_PARAM_
INFO
_H_
#include <atomic>
#include <memory>
...
...
@@ -25,13 +25,13 @@
#include "ir/tensor.h"
namespace
mindspore
{
class
Param
Value
{
class
Param
Info
{
public:
Param
Value
()
{}
Param
Info
()
{}
Param
Value
(
const
ParamValue
&
other
)
=
default
;
Param
Info
(
const
ParamInfo
&
other
)
=
default
;
virtual
~
Param
Value
()
=
default
;
virtual
~
Param
Info
()
=
default
;
const
std
::
string
&
name
()
const
{
return
name_
;
}
void
set_name
(
const
std
::
string
&
name
)
{
name_
=
name
;
}
...
...
@@ -58,7 +58,7 @@ class ParamValue {
ParamValuePtr
Clone
()
{
static
std
::
atomic
<
int32_t
>
parameter_cloned_index
{
1
};
int32_t
index
=
parameter_cloned_index
.
fetch_add
(
1
,
std
::
memory_order_relaxed
);
auto
clone
=
std
::
make_shared
<
Param
Value
>
(
*
this
);
auto
clone
=
std
::
make_shared
<
Param
Info
>
(
*
this
);
clone
->
be_cloned_
=
false
;
clone
->
cloned_
=
true
;
clone
->
be_cloned_index_
=
{};
...
...
@@ -78,4 +78,4 @@ class ParamValue {
int32_t
cloned_index_
{
0
};
};
}
// namespace mindspore
#endif // MINDSPORE_CORE_IR_PARAM_
VALUE
_H_
#endif // MINDSPORE_CORE_IR_PARAM_
INFO
_H_
mindspore/lite/src/param_value_lite.h
浏览文件 @
26de4540
...
...
@@ -22,7 +22,6 @@
#include <vector>
#include <utility>
#include "ir/param_value.h"
#include "ir/dtype/type_id.h"
namespace
mindspore
{
...
...
tests/ut/cpp/pre_activate/ascend/enhancer/insert_memcpy_async_for_hccl_op_test.cc
浏览文件 @
26de4540
...
...
@@ -22,7 +22,7 @@
#include "utils/utils.h"
#include "backend/kernel_compiler/kernel_build_info.h"
#include "backend/optimizer/common/optimizer.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#define private public
#define protected public
#include "backend/optimizer/ascend/enhancer/insert_memcpy_async_for_hccl_op.h"
...
...
tests/ut/cpp/session/anf_runtime_algorithm_test.cc
浏览文件 @
26de4540
...
...
@@ -15,7 +15,7 @@
*/
#include "common/common_test.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "frontend/operator/ops.h"
#include "backend/session/kernel_graph.h"
#include "backend/session/anf_runtime_algorithm.h"
...
...
tests/ut/cpp/session/kernel_graph_test.cc
浏览文件 @
26de4540
...
...
@@ -15,7 +15,7 @@
*/
#include "common/common_test.h"
#include "ir/param_
value
.h"
#include "ir/param_
info
.h"
#include "frontend/operator/ops.h"
#include "backend/session/kernel_graph.h"
#include "backend/session/anf_runtime_algorithm.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录