Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
akg
提交
a6d3f303
A
akg
项目概览
MindSpore
/
akg
通知
58
Star
7
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
akg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a6d3f303
编写于
6月 29, 2020
作者:
H
hanhuifeng2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug that extra pipe_barrier inserted in the loop
上级
5a35fac5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
12 deletion
+9
-12
src/pass/dataflow_analyze.cc
src/pass/dataflow_analyze.cc
+9
-12
未找到文件。
src/pass/dataflow_analyze.cc
浏览文件 @
a6d3f303
...
@@ -471,12 +471,11 @@ class DFVisitor : public IRVisitor {
...
@@ -471,12 +471,11 @@ class DFVisitor : public IRVisitor {
/**
/**
* Check whether meminfo has necessary args for calculating stride.
* Check whether meminfo has necessary args for calculating stride.
*/
*/
bool
checkAllMemInfoExists
(
const
IntImm
*
offset
,
const
IntImm
*
extent
,
const
IntImm
*
typeSize
,
bool
checkAllMemInfoExists
(
const
IntImm
*
offset
,
const
IntImm
*
typeSize
,
const
IntImm
*
repeatTime
,
const
IntImm
*
repeatTime
,
const
IntImm
*
repeatStride
,
const
IntImm
*
blockNumber
,
const
IntImm
*
repeatStride
,
const
IntImm
*
blockNumber
,
const
IntImm
*
blockStride
,
const
IntImm
*
blockStride
,
const
IntImm
*
blockSize
)
const
{
const
IntImm
*
blockSize
)
const
{
return
((
offset
!=
nullptr
)
&&
(
extent
!=
nullptr
)
&&
(
typeSize
!=
nullptr
)
&&
(
repeatTime
!=
nullptr
)
&&
return
((
offset
!=
nullptr
)
&&
(
typeSize
!=
nullptr
)
&&
(
repeatTime
!=
nullptr
)
&&
(
repeatStride
!=
nullptr
)
&&
(
repeatStride
!=
nullptr
)
&&
(
blockNumber
!=
nullptr
)
&&
(
blockStride
!=
nullptr
)
&&
(
blockNumber
!=
nullptr
)
&&
(
blockStride
!=
nullptr
)
&&
(
blockSize
!=
nullptr
));
(
blockSize
!=
nullptr
));
}
}
/**
/**
...
@@ -530,7 +529,6 @@ class DFVisitor : public IRVisitor {
...
@@ -530,7 +529,6 @@ class DFVisitor : public IRVisitor {
CHECK
(
offsetIntImmOfA
->
value
>=
0
)
<<
"offset A must be Non-negative number"
;
CHECK
(
offsetIntImmOfA
->
value
>=
0
)
<<
"offset A must be Non-negative number"
;
Expr
typeSizeExprOfA
=
make_const
(
a
.
offset
.
type
(),
a
.
type
.
bytes
());
Expr
typeSizeExprOfA
=
make_const
(
a
.
offset
.
type
(),
a
.
type
.
bytes
());
const
auto
extentIntImmOfA
=
a
.
extent
.
as
<
IntImm
>
();
const
auto
typeSizeIntImmOfA
=
typeSizeExprOfA
.
as
<
IntImm
>
();
const
auto
typeSizeIntImmOfA
=
typeSizeExprOfA
.
as
<
IntImm
>
();
const
auto
repeatTimeIntImmOfA
=
a
.
repeatTime
.
as
<
IntImm
>
();
const
auto
repeatTimeIntImmOfA
=
a
.
repeatTime
.
as
<
IntImm
>
();
const
auto
repeatStrideIntImmOfA
=
a
.
repeatStride
.
as
<
IntImm
>
();
const
auto
repeatStrideIntImmOfA
=
a
.
repeatStride
.
as
<
IntImm
>
();
...
@@ -539,7 +537,6 @@ class DFVisitor : public IRVisitor {
...
@@ -539,7 +537,6 @@ class DFVisitor : public IRVisitor {
const
auto
blockSizeIntImmOfA
=
a
.
blockSize
.
as
<
IntImm
>
();
const
auto
blockSizeIntImmOfA
=
a
.
blockSize
.
as
<
IntImm
>
();
Expr
typeSizeExprOfB
=
make_const
(
b
.
offset
.
type
(),
b
.
type
.
bytes
());
Expr
typeSizeExprOfB
=
make_const
(
b
.
offset
.
type
(),
b
.
type
.
bytes
());
const
auto
extentIntImmOfB
=
b
.
extent
.
as
<
IntImm
>
();
const
auto
typeSizeIntImmOfB
=
typeSizeExprOfB
.
as
<
IntImm
>
();
const
auto
typeSizeIntImmOfB
=
typeSizeExprOfB
.
as
<
IntImm
>
();
const
auto
repeatTimeIntImmOfB
=
b
.
repeatTime
.
as
<
IntImm
>
();
const
auto
repeatTimeIntImmOfB
=
b
.
repeatTime
.
as
<
IntImm
>
();
const
auto
repeatStrideIntImmOfB
=
b
.
repeatStride
.
as
<
IntImm
>
();
const
auto
repeatStrideIntImmOfB
=
b
.
repeatStride
.
as
<
IntImm
>
();
...
@@ -549,10 +546,10 @@ class DFVisitor : public IRVisitor {
...
@@ -549,10 +546,10 @@ class DFVisitor : public IRVisitor {
// if checkResult is true, it means there is enough info to calc stride. If not, func will return overlap(default).
// if checkResult is true, it means there is enough info to calc stride. If not, func will return overlap(default).
bool
checkResult
=
bool
checkResult
=
checkAllMemInfoExists
(
offsetIntImmOfA
,
extentIntImmOfA
,
typeSizeIntImmOfA
,
repeatTim
eIntImmOfA
,
checkAllMemInfoExists
(
offsetIntImmOfA
,
typeSizeIntImmOfA
,
repeatTimeIntImmOfA
,
repeatStrid
eIntImmOfA
,
repeatStrideIntImmOfA
,
blockNumberIntImmOfA
,
blockStrideIntImmOfA
,
blockSizeIntImmOfA
)
&&
blockNumberIntImmOfA
,
blockStrideIntImmOfA
,
blockSizeIntImmOfA
)
&&
checkAllMemInfoExists
(
offsetIntImmOfB
,
extentIntImmOfB
,
typeSizeIntImmOfB
,
repeatTim
eIntImmOfB
,
checkAllMemInfoExists
(
offsetIntImmOfB
,
typeSizeIntImmOfB
,
repeatTimeIntImmOfB
,
repeatStrid
eIntImmOfB
,
repeatStrideIntImmOfB
,
blockNumberIntImmOfB
,
blockStrideIntImmOfB
,
blockSizeIntImmOfB
);
blockNumberIntImmOfB
,
blockStrideIntImmOfB
,
blockSizeIntImmOfB
);
if
(
!
checkResult
)
{
if
(
!
checkResult
)
{
return
true
;
return
true
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录