Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3889293c
提交
3889293c
authored
8月 02, 2013
作者:
lamblin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1476 from nouiz/cleanup
Cleanup
上级
608c442a
aafab649
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
13 行删除
+11
-13
opt.py
theano/sandbox/cuda/opt.py
+11
-7
test_basic_ops.py
theano/sandbox/cuda/tests/test_basic_ops.py
+0
-6
没有找到文件。
theano/sandbox/cuda/opt.py
浏览文件 @
3889293c
...
...
@@ -9,7 +9,7 @@ import numpy
import
theano
from
theano
import
scalar
as
scal
from
theano
import
tensor
,
gof
from
theano
import
config
,
tensor
,
gof
import
theano.ifelse
from
theano.compile
import
optdb
...
...
@@ -17,7 +17,13 @@ from theano.gof import (local_optimizer, EquilibriumDB, SequenceDB, ProxyDB,
Optimizer
,
toolbox
,
DestroyHandler
,
EquilibriumOptimizer
)
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_from_host
,
host_from_gpu
,
HostFromGpu
,
GpuElemwise
,
GpuDimShuffle
,
GpuReshape
,
GpuCAReduce
,
GpuFlatten
,
GpuSubtensor
,
GpuAdvancedSubtensor1
,
GpuAdvancedIncSubtensor1
,
GpuAdvancedIncSubtensor1_dev20
,
GpuIncSubtensor
,
gpu_alloc
,
GpuAlloc
,
gpu_shape
)
from
theano.sandbox.cuda.type
import
CudaNdarrayType
from
theano.sandbox.cuda.blas
import
(
gpu_dot22
,
gpu_dot22scalar
,
gpu_gemm_inplace
,
gpu_gemm_no_inplace
,
GpuConv
)
...
...
@@ -102,7 +108,7 @@ class InputToGpuOptimizer(Optimizer):
if
new_input
.
type
==
input
.
type
:
fgraph
.
replace_validate
(
input
,
new_input
,
"InputToGpuOptimizer"
)
except
TypeError
,
e
:
except
TypeError
:
#as we currently only support float32, this can fail.
#Using try except make that we won't need
pass
...
...
@@ -662,9 +668,6 @@ def local_gpu_careduce(node):
"WARNING: local_gpu_careduce got type wrong"
return
None
raise
Exception
(
"GpuCAReduce does not yet implement this pattern:"
,
pattern
)
return
False
...
...
@@ -1217,7 +1220,8 @@ def get_device_type_sizes():
int_size
=
8
try
:
t
=
cuda_ndarray
.
cuda_ndarray
.
ptr_int_size
()
cuda_ndarray
=
theano
.
sandbox
.
cuda
.
cuda_ndarray
.
cuda_ndarray
t
=
cuda_ndarray
.
ptr_int_size
()
gpu_ptr_size
,
cpu_ptr_size
,
int_size
,
gpu_int_size
=
t
assert
int_size
==
gpu_int_size
del
gpu_int_size
...
...
theano/sandbox/cuda/tests/test_basic_ops.py
浏览文件 @
3889293c
import
copy
import
sys
import
time
import
unittest
...
...
@@ -9,7 +7,6 @@ from theano import tensor
import
numpy
import
theano
import
theano.tensor
as
T
from
numpy.testing.noseclasses
import
KnownFailureTest
# Skip test if cuda_ndarray is not available.
from
nose.plugins.skip
import
SkipTest
...
...
@@ -1255,7 +1252,4 @@ def speed_adv_sub1():
if
__name__
==
'__main__'
:
test_many_arg_elemwise
()
test_gpujoin_twomatrices_joincolumns
()
test_gpujoin_assert_cndas
()
test_gpujoin_preserves_broadcasting
()
test_gpujoin_twomatrices_badshapes
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论