Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
c817315b
提交
c817315b
authored
3月 23, 2015
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2657 from nouiz/test
Fix random failure in test due to rounding change.
上级
4e91569d
8dde2999
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
23 行增加
和
7 行删除
+23
-7
conv.txt
doc/library/tensor/nnet/conv.txt
+1
-2
__init__.py
theano/sandbox/cuda/__init__.py
+3
-0
extra_ops.py
theano/sandbox/cuda/extra_ops.py
+19
-5
没有找到文件。
doc/library/tensor/nnet/conv.txt
浏览文件 @
c817315b
...
...
@@ -27,8 +27,7 @@
As of October 21st, 2014, the default GPU image convolution
changed: By default, if :ref:`cuDNN <libdoc_cuda_dnn>`
is available, we will use it, otherwise we will fall back to using the
gemm version (slower then cuDNN in most cases, uses more memory, but
faster than the legacy version we used before).
gemm version (slower then cuDNN in most cases and uses more memory).
Both cuDNN and the gemm version can be disabled using the Theano flags
``optimizer_excluding=conv_dnn`` and ``optimizer_excluding=conv_gemm``,
...
...
theano/sandbox/cuda/__init__.py
浏览文件 @
c817315b
...
...
@@ -23,6 +23,9 @@ gpu_seqopt = SequenceDB()
def
register_opt
(
*
tags
,
**
kwargs
):
if
any
([
not
isinstance
(
t
,
str
)
for
t
in
tags
]):
raise
RuntimeError
(
"Bad call to register_opt."
" All tags must be strings."
,
tags
)
def
f
(
local_opt
):
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
))
or
local_opt
.
__name__
gpu_optimizer
.
register
(
name
,
local_opt
,
'fast_run'
,
'fast_compile'
,
...
...
theano/sandbox/cuda/extra_ops.py
浏览文件 @
c817315b
...
...
@@ -406,6 +406,22 @@ class GpuCumsum(CumsumOp, GpuOp):
return
code
def
values_eq_approx_high_tol
(
a
,
b
):
"""This fct is needed to don't have DebugMode raise useless
error due to ronding error.
This happen with big input size due to change in the order of
operation.
"""
rtol
=
None
if
a
.
size
>
100000
:
# For float32 the default rtol is 1e-5
rtol
=
5e-5
return
CudaNdarrayType
.
values_eq_approx
(
a
,
b
,
rtol
=
rtol
)
@register_gpu_opt
()
@local_optimizer
([
CumsumOp
])
def
use_gpu_cumsum
(
node
):
if
type
(
node
.
op
)
is
CumsumOp
\
...
...
@@ -427,8 +443,6 @@ def use_gpu_cumsum(node):
# ``gpu_cumsum`` assume array has been flattened if needed.
if
axis
is
None
:
axis
=
0
return
[
host_from_gpu
(
GpuCumsum
(
axis
)(
x
))]
if
cuda_available
:
register_gpu_opt
()(
use_gpu_cumsum
)
ret
=
host_from_gpu
(
GpuCumsum
(
axis
)(
x
))
ret
.
values_eq_approx
=
values_eq_approx_high_tol
return
[
ret
]
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论