Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
aa892a7e
提交
aa892a7e
authored
11月 21, 2014
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2279 from nouiz/import_fix
Fix crash at import
上级
8ae6abce
26d6978c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
5 行删除
+14
-5
opt.py
theano/sandbox/cuda/opt.py
+14
-5
没有找到文件。
theano/sandbox/cuda/opt.py
浏览文件 @
aa892a7e
...
@@ -17,7 +17,7 @@ from theano.gof import (local_optimizer, EquilibriumDB, SequenceDB, ProxyDB,
...
@@ -17,7 +17,7 @@ from theano.gof import (local_optimizer, EquilibriumDB, SequenceDB, ProxyDB,
Optimizer
,
toolbox
)
Optimizer
,
toolbox
)
from
theano.gof.python25
import
all
,
any
from
theano.gof.python25
import
all
,
any
from
theano.sandbox.cuda.basic_ops
import
(
from
theano.sandbox.cuda.basic_ops
import
(
device_properties
,
gpu_eye
,
gpu_contiguous
,
gpu_eye
,
gpu_contiguous
,
gpu_from_host
,
host_from_gpu
,
GpuFromHost
,
HostFromGpu
,
gpu_from_host
,
host_from_gpu
,
GpuFromHost
,
HostFromGpu
,
GpuElemwise
,
GpuDimShuffle
,
GpuReshape
,
GpuCAReduce
,
GpuFlatten
,
GpuElemwise
,
GpuDimShuffle
,
GpuReshape
,
GpuCAReduce
,
GpuFlatten
,
GpuSubtensor
,
GpuAdvancedSubtensor1
,
GpuSubtensor
,
GpuAdvancedSubtensor1
,
...
@@ -47,6 +47,13 @@ from theano.tensor.blas import _is_real_vector, _is_real_matrix
...
@@ -47,6 +47,13 @@ from theano.tensor.blas import _is_real_vector, _is_real_matrix
from
theano.tensor
import
nlinalg
from
theano.tensor
import
nlinalg
from
theano.tensor.nnet.Conv3D
import
Conv3D
from
theano.tensor.nnet.Conv3D
import
Conv3D
try
:
# We need to be able to import this file even if cuda isn't avail.
from
theano.sandbox.cuda
import
device_properties
except
ImportError
:
pass
#optdb.print_summary() # shows what is currently registered
#optdb.print_summary() # shows what is currently registered
#ignore_newtrees is to speed the optimization as this is the pattern
#ignore_newtrees is to speed the optimization as this is the pattern
...
@@ -1337,10 +1344,12 @@ conv_groupopt.register('conv_fft_full', local_conv_fft_full, 10,
...
@@ -1337,10 +1344,12 @@ conv_groupopt.register('conv_fft_full', local_conv_fft_full, 10,
# cuDNN is the second, but only registered if cuDNN is available.
# cuDNN is the second, but only registered if cuDNN is available.
# It can be disabled by excluding 'conv_dnn' or 'cudnn'.
# It can be disabled by excluding 'conv_dnn' or 'cudnn'.
from
.
import
dnn
from
.
import
dnn
if
dnn
.
dnn_available
():
# We can't check at import if dnn is available, so we must always
conv_groupopt
.
register
(
'local_conv_dnn'
,
dnn
.
local_conv_dnn
,
20
,
# register it. This do not cause problem as if it is not avail, the
'conv_dnn'
,
# opt will do nothing.
'fast_compile'
,
'fast_run'
,
'cudnn'
)
conv_groupopt
.
register
(
'local_conv_dnn'
,
dnn
.
local_conv_dnn
,
20
,
'conv_dnn'
,
'fast_compile'
,
'fast_run'
,
'cudnn'
)
# The GEMM-based convolution comes last to catch all remaining cases.
# The GEMM-based convolution comes last to catch all remaining cases.
# It can be disabled by excluding 'conv_gemm'.
# It can be disabled by excluding 'conv_gemm'.
conv_groupopt
.
register
(
'local_conv_gemm'
,
local_conv_gemm
,
30
,
conv_groupopt
.
register
(
'local_conv_gemm'
,
local_conv_gemm
,
30
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论