Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
akg
提交
2ad9c1bd
A
akg
项目概览
MindSpore
/
akg
通知
57
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看板
提交
2ad9c1bd
编写于
8月 27, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 27, 2020
浏览文件
操作
浏览文件
下载
差异文件
!117 matmul add bert testcases and tunning setdim
Merge pull request !117 from looop5/matmul_bert
上级
0871623a
68b3ccfb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
0 deletion
+15
-0
python/akg/ops/nn/matmul.py
python/akg/ops/nn/matmul.py
+5
-0
tests/operators/cube/test_matmul_001.py
tests/operators/cube/test_matmul_001.py
+10
-0
未找到文件。
python/akg/ops/nn/matmul.py
浏览文件 @
2ad9c1bd
...
...
@@ -77,6 +77,11 @@ matmul_set_dim_map = {
str
(((
16
,
16
,
32
,
32
,
16
,
16
),
(
16
,
16
,
4
,
32
,
16
,
16
),
0
,
"zN"
,
"zN"
,
"zN"
,
True
,
False
,
"float16"
))
:
([(
1
,
1
),(
1
,
1
),(
4
,
4
),(
16
,
16
),(
16
,
16
),(
16
,
16
),(
16
,
4
)],
{
"bypass"
:
0
}),
# (16, 16, 512, 64), (16, 16, 512, 64)
str
(((
16
,
16
,
4
,
32
,
16
,
16
),
(
16
,
16
,
4
,
32
,
16
,
16
),
0
,
"zN"
,
"zN"
,
"zN"
,
False
,
True
,
"float16"
))
:
([(
1
,
1
),(
1
,
1
),(
32
,
4
),(
32
,
32
),(
16
,
16
),(
16
,
16
),(
4
,
4
)],
{
"bypass"
:
0
}),
# (24, 16, 512, 512), (24, 16, 512, 64)
str
(((
24
,
16
,
32
,
32
,
16
,
16
),
(
24
,
16
,
4
,
32
,
16
,
16
),
0
,
'zN'
,
'zN'
,
'zN'
,
False
,
False
,
'float16'
))
:
([(
1
,
1
),(
1
,
1
),(
4
,
4
),(
8
,
1
),(
16
,
16
),(
16
,
16
),(
32
,
32
)],
{
"bypass"
:
0
}),
str
(((
24
,
16
,
32
,
32
,
16
,
16
),
(
24
,
16
,
4
,
32
,
16
,
16
),
0
,
'zN'
,
'zN'
,
'zN'
,
True
,
False
,
'float16'
))
:
([(
1
,
1
),(
1
,
1
),(
4
,
4
),(
32
,
32
),(
16
,
16
),(
16
,
16
),(
8
,
1
)],
{
"bypass"
:
0
}),
# (24, 16, 512, 64), (24, 16, 512, 64)
str
(((
24
,
16
,
4
,
32
,
16
,
16
),
(
24
,
16
,
4
,
32
,
16
,
16
),
0
,
'zN'
,
'zN'
,
'zN'
,
False
,
True
,
'float16'
))
:
([(
1
,
1
),(
1
,
1
),(
32
,
16
),(
32
,
16
),(
16
,
16
),(
16
,
16
),(
4
,
2
)],
{
"bypass"
:
0
}),
}
...
...
tests/operators/cube/test_matmul_001.py
浏览文件 @
2ad9c1bd
...
...
@@ -43,6 +43,16 @@ class TestCase(TestBase):
# [16, 16, 4, 32, 16, 16] * [16, 16, 4, 32, 16, 16] -> [16, 16, 32, 32, 16, 16]
(
"batchmatmul_run_bert_02"
,
"matmul_run"
,
((
16
,
16
,
512
,
64
),
(
16
,
16
,
512
,
64
),
0
,
"zN"
,
"zN"
,
"zN"
,
False
,
True
,
"float16"
,
None
,
"float16"
,
"batchmatmul_cce"
)),
# [24, 16, 32, 32, 16, 16] * [24, 16, 4, 32, 16, 16] -> [24, 16, 4, 32, 16, 16]
(
"batchmatmul_run_bert_00"
,
"matmul_run"
,
((
24
,
16
,
512
,
512
),
(
24
,
16
,
512
,
64
),
0
,
"zN"
,
"zN"
,
"zN"
,
False
,
False
,
"float16"
,
None
,
"float16"
,
"batchmatmul_cce"
)),
# [24, 16, 32, 32, 16, 16] * [24, 16, 4, 32, 16, 16] -> [24, 16, 4, 32, 16, 16]
(
"batchmatmul_run_bert_01"
,
"matmul_run"
,
((
24
,
16
,
512
,
512
),
(
24
,
16
,
512
,
64
),
0
,
"zN"
,
"zN"
,
"zN"
,
True
,
False
,
"float16"
,
None
,
"float16"
,
"batchmatmul_cce"
)),
# [24, 16, 4, 32, 16, 16] * [24, 16, 4, 32, 16, 16] -> [24, 16, 32, 32, 16, 16]
(
"batchmatmul_run_bert_02"
,
"matmul_run"
,
((
24
,
16
,
512
,
64
),
(
24
,
16
,
512
,
64
),
0
,
"zN"
,
"zN"
,
"zN"
,
False
,
True
,
"float16"
,
None
,
"float16"
,
"batchmatmul_cce"
)),
# bert shape
(
"matmul_run_bert_00"
,
"matmul_run"
,
((
16
,
1024
),
(
16
,
1024
),
0
,
"zN"
,
"zN"
,
"zN"
,
False
,
True
,
"float16"
,
None
,
"float16"
,
"matmul_cce"
)),
(
"matmul_run_bert_01"
,
"matmul_run"
,
((
8192
,
4096
),
(
8192
,
1024
),
0
,
"zN"
,
"zN"
,
"zN"
,
True
,
False
,
"float16"
,
None
,
"float32"
,
"matmul_cce"
)),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录