Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
36fbd5a6
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
403
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
36fbd5a6
编写于
4月 07, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mgb): fix spell error
GitOrigin-RevId: acae00e0a54daf5a18a775bcf8bb5d2469f337cb
上级
957d1d40
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
14 addition
and
13 deletion
+14
-13
dnn/src/x86/conv_bias/opr_impl.cpp
dnn/src/x86/conv_bias/opr_impl.cpp
+1
-1
imperative/python/megengine/functional/debug_param.py
imperative/python/megengine/functional/debug_param.py
+1
-1
imperative/python/src/graph_rt.cpp
imperative/python/src/graph_rt.cpp
+1
-1
sdk/load-and-run/src/mgblar.cpp
sdk/load-and-run/src/mgblar.cpp
+1
-1
src/gopt/test/inference.cpp
src/gopt/test/inference.cpp
+2
-2
src/opr/impl/search_policy/algo_chooser.cpp
src/opr/impl/search_policy/algo_chooser.cpp
+1
-1
src/opr/test/dnn/convolution.cpp
src/opr/test/dnn/convolution.cpp
+5
-5
tools/param_defs/mgb_opr_param_defs.py
tools/param_defs/mgb_opr_param_defs.py
+2
-1
未找到文件。
dnn/src/x86/conv_bias/opr_impl.cpp
浏览文件 @
36fbd5a6
...
...
@@ -185,7 +185,7 @@ SmallVector<AlgoCategory> ConvBiasImpl::suggest_algo_category_order(
}
//! conv1x1
im2col_prefer
|=
(
FH
==
1
&&
FW
==
1
);
//! x86 8x8x16 not optmized, so it will use fallback im2col+matmul
//! x86 8x8x16 not opt
i
mized, so it will use fallback im2col+matmul
if
(
param
.
deduce_algo_data_type
()
==
AlgoDataType
::
INT8X8X16
)
{
im2col_prefer
=
true
;
}
...
...
imperative/python/megengine/functional/debug_param.py
浏览文件 @
36fbd5a6
...
...
@@ -40,7 +40,7 @@ def set_execution_strategy(option):
* HEURISTIC uses heuristic to choose the fastest algorithm.
* PROFILE runs possible algorithms on real device to find the best one.
* REPRODUCIBLE uses the algorithms that is reproducible.
* OPTMIZED uses the algorithms that is optimized.
* OPT
I
MIZED uses the algorithms that is optimized.
The default strategy is HEURISTIC, this options can be combined to
form a combination option, e.g. PROFILE | REPRODUCIBLE
...
...
imperative/python/src/graph_rt.cpp
浏览文件 @
36fbd5a6
...
...
@@ -266,7 +266,7 @@ void init_graph_rt(py::module m) {
{
"HEURISTIC"
,
[
&
]()
{
stg
=
_AlgoStrategy
::
HEURISTIC
;
}},
{
"PROFILE"
,
[
&
]()
{
stg
=
_AlgoStrategy
::
PROFILE
;
}},
{
"REPRODUCIBLE"
,
[
&
]()
{
stg
=
_AlgoStrategy
::
REPRODUCIBLE
;
}},
{
"OPT
MIZED"
,
[
&
]()
{
stg
=
_AlgoStrategy
::
OPT
MIZED
;
}},
{
"OPT
IMIZED"
,
[
&
]()
{
stg
=
_AlgoStrategy
::
OPTI
MIZED
;
}},
};
auto
it
=
m
.
find
(
strategy
);
mgb_assert
(
it
!=
m
.
end
(),
"Invalid strategy string!"
);
...
...
sdk/load-and-run/src/mgblar.cpp
浏览文件 @
36fbd5a6
...
...
@@ -709,7 +709,7 @@ void run_test_st(Args &env) {
strategy
=
S
::
PROFILE
;
}
}
else
if
(
env
.
use_fast_run
)
{
strategy
=
S
::
PROFILE
|
S
::
OPTMIZED
;
strategy
=
S
::
PROFILE
|
S
::
OPT
I
MIZED
;
}
else
if
(
env
.
reproducible
)
{
strategy
=
S
::
HEURISTIC
|
S
::
REPRODUCIBLE
;
}
...
...
src/gopt/test/inference.cpp
浏览文件 @
36fbd5a6
...
...
@@ -1756,8 +1756,8 @@ TEST(TestGoptInference, FastProfileCache) {
using
S
=
opr
::
Convolution
::
ExecutionPolicy
::
Strategy
;
ASSERT_EQ
(
S
::
HEURISTIC
,
conv
.
execution_policy_transient
().
strategy
);
gopt
::
modify_opr_algo_strategy_inplace
({
z
+
2.3
f
},
S
::
PROFILE
|
S
::
OPTMIZED
);
ASSERT_EQ
(
S
::
PROFILE
|
S
::
OPTMIZED
,
conv
.
execution_policy
().
strategy
);
S
::
PROFILE
|
S
::
OPT
I
MIZED
);
ASSERT_EQ
(
S
::
PROFILE
|
S
::
OPT
I
MIZED
,
conv
.
execution_policy
().
strategy
);
}
TEST
(
TestGoptInference
,
AlgoWorkspaceLimit
)
{
...
...
src/opr/impl/search_policy/algo_chooser.cpp
浏览文件 @
36fbd5a6
...
...
@@ -283,7 +283,7 @@ std::vector<megdnn::Algorithm::SearchItem> flatten_search_space(
static
bool
algo_attribute_match_strategy
(
AlgoAttribute
attribute
,
ExecutionStrategy
selected_strategy
)
{
bool
ret
=
true
;
if
(
selected_strategy
&
ExecutionStrategy
::
OPTMIZED
)
{
if
(
selected_strategy
&
ExecutionStrategy
::
OPT
I
MIZED
)
{
ret
&=
(
!
static_cast
<
bool
>
(
AlgoAttribute
::
NAIVE
&
attribute
));
}
else
if
(
selected_strategy
&
ExecutionStrategy
::
REPRODUCIBLE
)
{
ret
&=
static_cast
<
bool
>
(
AlgoAttribute
::
REPRODUCIBLE
&
attribute
);
...
...
src/opr/test/dnn/convolution.cpp
浏览文件 @
36fbd5a6
...
...
@@ -357,7 +357,7 @@ TEST(TestOprDNN, ConvBiasExePolicy) {
#if MGB_ENABLE_FASTRUN
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
::
PROFILE
,
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
REPRODUCIBLE
,
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPTMIZED
})
{
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPT
I
MIZED
})
{
#else
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
:
HEURISTIC
,
S
::
PROFILE
|
S
::
HEURISTIC
})
{
...
...
@@ -444,7 +444,7 @@ TEST(TestOprDNN, ConvolutionExePolicy) {
#if MGB_ENABLE_FASTRUN
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
::
PROFILE
,
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
REPRODUCIBLE
,
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPTMIZED
})
{
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPT
I
MIZED
})
{
#else
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
:
HEURISTIC
,
S
::
PROFILE
|
S
::
HEURISTIC
})
{
...
...
@@ -1717,7 +1717,7 @@ TEST(TestOprDNN, LocalShareForwardExecPolicy) {
#if MGB_ENABLE_FASTRUN
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
::
PROFILE
,
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
REPRODUCIBLE
,
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPTMIZED
})
{
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPT
I
MIZED
})
{
#else
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
:
HEURISTIC
,
S
::
PROFILE
|
S
::
HEURISTIC
})
{
...
...
@@ -1828,7 +1828,7 @@ TEST(TestOprDNN, DeformableConvForward) {
#if MGB_ENABLE_FASTRUN
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
::
PROFILE
,
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
REPRODUCIBLE
,
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPTMIZED
})
{
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPT
I
MIZED
})
{
#else
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
:
HEURISTIC
,
S
::
PROFILE
|
S
::
HEURISTIC
})
{
...
...
@@ -1997,7 +1997,7 @@ TEST(TestOprDNN, BatchConvBiasForward) {
#if MGB_ENABLE_FASTRUN
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
::
PROFILE
,
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
REPRODUCIBLE
,
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPTMIZED
})
{
S
::
PROFILE
|
S
::
HEURISTIC
,
S
::
PROFILE
|
S
::
OPT
I
MIZED
})
{
#else
for
(
auto
strategy
:
SmallVector
<
S
>
{
S
:
HEURISTIC
,
S
::
PROFILE
|
S
::
HEURISTIC
})
{
...
...
tools/param_defs/mgb_opr_param_defs.py
浏览文件 @
36fbd5a6
...
...
@@ -41,12 +41,13 @@ pdef('PersistentOutputStorage').add_fields(
Doc
(
'REPRODUCIBLE'
,
'when profile or heuristic algo selection it require the algos'
'must be reproducible'
),
Doc
(
'OPTMIZED'
,
Doc
(
'OPT
I
MIZED'
,
'profile require algos are optmized to achieve fast-profile'
),
default
=
(
'HEURISTIC'
,),
member_alias
=
[((
'HEURISTIC'
,
'REPRODUCIBLE'
),
'HEURISTIC_REPRODUCIBLE'
),
((
'PROFILE'
,
'REPRODUCIBLE'
),
'PROFILE_REPRODUCIBLE'
),
((
'PROFILE'
,
'HEURISTIC'
),
'PROFILE_HEURISTIC'
),
((
'OPTIMIZED'
,),
'OPTMIZED'
),
]).
add_fields
(
'uint64'
,
Doc
(
'workspace_limit'
,
'workspace limit in bytes'
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录