Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9dc0dc8e
提交
9dc0dc8e
authored
7月 18, 2015
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3140 from JesseLivezey/check_blas
add larger matrix for check_blas
上级
2eb732ed
88e6c00a
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
54 行增加
和
7 行删除
+54
-7
check_blas.py
theano/misc/check_blas.py
+54
-7
没有找到文件。
theano/misc/check_blas.py
浏览文件 @
9dc0dc8e
...
...
@@ -127,13 +127,13 @@ parser.add_option('--print_only', action='store_true', dest='print_only',
default
=
False
,
help
=
"If true, do not perform gemm computations"
)
parser
.
add_option
(
'-M'
,
'--M'
,
action
=
'store'
,
dest
=
'M'
,
default
=
200
0
,
type
=
"int"
,
default
=
0
,
type
=
"int"
,
help
=
"The M size to gemm"
)
parser
.
add_option
(
'-N'
,
'--N'
,
action
=
'store'
,
dest
=
'N'
,
default
=
200
0
,
type
=
"int"
,
default
=
0
,
type
=
"int"
,
help
=
"The N size to gemm"
)
parser
.
add_option
(
'-K'
,
'--K'
,
action
=
'store'
,
dest
=
'K'
,
default
=
200
0
,
type
=
"int"
,
default
=
0
,
type
=
"int"
,
help
=
"The K size to gemm"
)
parser
.
add_option
(
'--iter'
,
action
=
'store'
,
dest
=
'iter'
,
default
=
10
,
type
=
"int"
,
...
...
@@ -143,6 +143,9 @@ parser.add_option('--order', action='store', dest='order',
help
=
"The numpy memory layout parameter used when creating"
" the numpy.ndarray objects. It accepts 'C' for C memory"
" order and 'F' for Fortran order (for all matrices)."
)
parser
.
add_option
(
'-B'
,
'--B'
,
action
=
'store'
,
dest
=
'B'
,
default
=
5000
,
type
=
"int"
,
help
=
"The M, N, and K for big gemm"
)
if
__name__
==
"__main__"
:
...
...
@@ -240,11 +243,55 @@ if __name__ == "__main__":
GT 220 3.80s
GT 210 6.35s
8500 GT 10.68s
Results for larger matrices.
There were 10 executions of gemm in float32
with matrices of shape 5000x5000 (M=N=K=5000).
All memory layout was in C order.
cuda version 7.5 7.0 6.5
gpu
K6000/NOECC
K40 0.88s
K20m/ECC
K20/NOECC
M2090
C2075
M2075
M2070
M2070-Q
M2050(Amazon)
C1060
K600
GTX Titan Black
GTX Titan(D15U-50)
GTX 780
GTX 980
GTX 970
GTX 680
GRID K520
GTX 580
GTX 480
GTX 750 Ti
"""
)
if
options
.
M
==
0
:
M
=
options
.
B
else
:
M
=
options
.
M
if
options
.
N
==
0
:
N
=
options
.
B
else
:
N
=
options
.
N
if
options
.
K
==
0
:
K
=
options
.
B
else
:
K
=
options
.
K
t
,
impl
=
execute
(
not
options
.
print_only
,
not
options
.
quiet
,
M
=
options
.
M
,
N
=
options
.
N
,
K
=
options
.
K
,
iters
=
options
.
iter
,
order
=
options
.
order
)
M
=
M
,
N
=
N
,
K
=
K
,
iters
=
options
.
iter
,
order
=
options
.
order
)
if
options
.
print_only
:
pass
...
...
@@ -254,8 +301,7 @@ if __name__ == "__main__":
print
()
print
(
"We executed"
,
options
.
iter
,
end
=
' '
)
print
(
"calls to gemm with a and b matrices of shapes"
,
end
=
' '
)
print
(
"(
%
d,
%
d) and (
%
d,
%
d)."
%
(
options
.
M
,
options
.
N
,
options
.
N
,
options
.
K
))
print
(
"(
%
d,
%
d) and (
%
d,
%
d)."
%
(
M
,
N
,
N
,
K
))
print
()
print
(
'Total execution time:
%.2
fs on
%
s.'
%
(
t
,
impl
))
...
...
@@ -263,3 +309,4 @@ if __name__ == "__main__":
print
(
'Try to run this script a few times. Experience shows that'
' the first time is not as fast as followings calls. The'
' difference is not big, but consistent.'
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论