Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e9299c5d
提交
e9299c5d
authored
9月 25, 2011
作者:
goodfeli
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #56 from lamblin/fix_dot_test
Do not call gemm with 0 stride, some blas refuse.
上级
7c19ea2b
60c82e69
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
15 行增加
和
10 行删除
+15
-10
blas.py
theano/tensor/blas.py
+15
-10
没有找到文件。
theano/tensor/blas.py
浏览文件 @
e9299c5d
...
@@ -478,8 +478,9 @@ class GemmRelated(Op):
...
@@ -478,8 +478,9 @@ class GemmRelated(Op):
(long int)Ny[1], (long int)Nz[1]);
(long int)Ny[1], (long int)Nz[1]);
%(fail)
s;
%(fail)
s;
}
}
// We must not raise an error when Nx[1] == 0. This would disable case
// that numpy.dot accept.
// We must not raise an error when Nx[1] == 0. This would disable cases
// that numpy.dot accept.
"""
"""
check_strides
=
"""
check_strides
=
"""
...
@@ -526,14 +527,18 @@ class GemmRelated(Op):
...
@@ -526,14 +527,18 @@ class GemmRelated(Op):
compute_strides
=
"""
compute_strides
=
"""
/* create appropriate strides for malformed matrices that are row or column
/* create appropriate strides for malformed matrices that are row or column
* vectors
* vectors, or empty matrices.
* In that case, the value of the stride does not really matter, but
* some versions of BLAS insist that:
* - they are not smaller than the number of elements in the array,
* - they are not 0.
*/
*/
sx_0 = (Nx[0] > 1) ? Sx[0]/type_size :
Nx[1]
;
sx_0 = (Nx[0] > 1) ? Sx[0]/type_size :
(Nx[1] + 1)
;
sx_1 = (Nx[1] > 1) ? Sx[1]/type_size :
Nx[0]
;
sx_1 = (Nx[1] > 1) ? Sx[1]/type_size :
(Nx[0] + 1)
;
sy_0 = (Ny[0] > 1) ? Sy[0]/type_size :
Ny[1]
;
sy_0 = (Ny[0] > 1) ? Sy[0]/type_size :
(Ny[1] + 1)
;
sy_1 = (Ny[1] > 1) ? Sy[1]/type_size :
Ny[0]
;
sy_1 = (Ny[1] > 1) ? Sy[1]/type_size :
(Ny[0] + 1)
;
sz_0 = (Nz[0] > 1) ? Sz[0]/type_size :
Nz[1]
;
sz_0 = (Nz[0] > 1) ? Sz[0]/type_size :
(Nz[1] + 1)
;
sz_1 = (Nz[1] > 1) ? Sz[1]/type_size :
Nz[0]
;
sz_1 = (Nz[1] > 1) ? Sz[1]/type_size :
(Nz[0] + 1)
;
"""
"""
begin_switch_typenum
=
"""
begin_switch_typenum
=
"""
...
@@ -639,7 +644,7 @@ class GemmRelated(Op):
...
@@ -639,7 +644,7 @@ class GemmRelated(Op):
self
.
end_switch_typenum
),
''
)
self
.
end_switch_typenum
),
''
)
def
build_gemm_version
(
self
):
def
build_gemm_version
(
self
):
return
(
8
,)
return
(
9
,)
class
Gemm
(
GemmRelated
):
class
Gemm
(
GemmRelated
):
"""In-place version of matrix-matrix multiplication (with accumulation):
"""In-place version of matrix-matrix multiplication (with accumulation):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论