Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9da67d20
提交
9da67d20
authored
10月 06, 2014
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2153 from nouiz/cuda_tests
[BUILDBOT CRASH] Fix test in FAST_COMPILE.
上级
7d286d04
86814d96
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
31 行增加
和
8 行删除
+31
-8
profiling.txt
doc/tutorial/profiling.txt
+14
-0
test_conv_cuda_ndarray.py
theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py
+6
-2
Conv3D.py
theano/tensor/nnet/Conv3D.py
+2
-1
conv3d2d.py
theano/tensor/nnet/conv3d2d.py
+2
-1
opt.py
theano/tensor/opt.py
+1
-1
test_basic.py
theano/tensor/tests/test_basic.py
+6
-3
没有找到文件。
doc/tutorial/profiling.txt
浏览文件 @
9da67d20
...
@@ -65,6 +65,20 @@ Here is an example output when we disable some Theano optimizations to
...
@@ -65,6 +65,20 @@ Here is an example output when we disable some Theano optimizations to
give you a better idea of the difference between sections. With all
give you a better idea of the difference between sections. With all
optimizations enabled, there would be only one op left in the graph.
optimizations enabled, there would be only one op left in the graph.
.. note::
To profile the peak memory usage on the GPU you need to do::
* In the file theano/sandbox/cuda/cuda_ndarray.cu, set the macro
COMPUTE_GPU_MEM_USED to 1.
* Then call theano.sandbox.cuda.theano_allocated()
It return a tuple with two ints. The first is the current GPU
memory allocated by Theano. The second is the peak GPU memory
that was allocated by Theano.
Do not always enable this, as this slowdown memory allocation and
free. As this slowdown the computation, this will affect speed
profiling. So don't use both at the same time.
to run the example:
to run the example:
...
...
theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py
浏览文件 @
9da67d20
...
@@ -563,7 +563,9 @@ def _test_valid(cls, mode=None, extra_shapes=[], version=[-1]):
...
@@ -563,7 +563,9 @@ def _test_valid(cls, mode=None, extra_shapes=[], version=[-1]):
def
test_valid
():
def
test_valid
():
for
t
in
_test_valid
(
None
,
version
=
[
-
2
,
-
1
,
6
]):
for
t
in
_test_valid
(
None
,
mode
=
theano_mode
,
version
=
[
-
2
,
-
1
,
6
]):
yield
t
yield
t
...
@@ -648,7 +650,9 @@ def _test_full(cls, mode=None, version=[-1], extra_shapes=[]):
...
@@ -648,7 +650,9 @@ def _test_full(cls, mode=None, version=[-1], extra_shapes=[]):
def
test_full
():
def
test_full
():
for
t
in
_test_full
(
None
,
version
=
[
-
2
,
-
1
,
0
,
1
,
2
,
3
,
4
,
5
]):
for
t
in
_test_full
(
None
,
mode
=
theano_mode
,
version
=
[
-
2
,
-
1
,
0
,
1
,
2
,
3
,
4
,
5
]):
yield
t
yield
t
...
...
theano/tensor/nnet/Conv3D.py
浏览文件 @
9da67d20
...
@@ -551,7 +551,8 @@ def conv3D(V, W, b, d):
...
@@ -551,7 +551,8 @@ def conv3D(V, W, b, d):
This is for optimization.
This is for optimization.
:note: The GPU implementation is very slow. You should use
:note: The GPU implementation is very slow. You should use
:func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` for a
:func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` or
:func:`conv3d_fft <theano.sandbox.cuda.fftconv.conv3d_fft>` for a
GPU graph instead.
GPU graph instead.
:see: Someone made a script that shows how to swap the axes
:see: Someone made a script that shows how to swap the axes
...
...
theano/tensor/nnet/conv3d2d.py
浏览文件 @
9da67d20
...
@@ -176,7 +176,8 @@ def conv3d(signals, filters,
...
@@ -176,7 +176,8 @@ def conv3d(signals, filters,
:note: Another way to define signals: (batch, time, in channel, row, column)
:note: Another way to define signals: (batch, time, in channel, row, column)
Another way to define filters: (out channel,time,in channel, row, column)
Another way to define filters: (out channel,time,in channel, row, column)
:note: See the `conv3d_fft`_ or `conv3d2d`_ for GPU implementations.
:note: For the GPU, you can use this implementation or
:func:`conv3d_fft <theano.sandbox.cuda.fftconv.conv3d_fft>`.
:see: Someone made a script that shows how to swap the axes between
:see: Someone made a script that shows how to swap the axes between
both 3d convolution implementations in Theano. See the last
both 3d convolution implementations in Theano. See the last
...
...
theano/tensor/opt.py
浏览文件 @
9da67d20
...
@@ -339,7 +339,7 @@ def register_specialize(lopt, *tags, **kwargs):
...
@@ -339,7 +339,7 @@ def register_specialize(lopt, *tags, **kwargs):
else
:
else
:
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
))
or
lopt
.
__name__
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
))
or
lopt
.
__name__
compile
.
optdb
[
'specialize'
]
.
register
(
name
,
lopt
,
'fast_run'
,
compile
.
optdb
[
'specialize'
]
.
register
(
name
,
lopt
,
'fast_run'
,
'fast_compile_gpu'
,
*
tags
)
*
tags
)
return
lopt
return
lopt
...
...
theano/tensor/tests/test_basic.py
浏览文件 @
9da67d20
...
@@ -6430,7 +6430,8 @@ class TestInferShape(utt.InferShapeTester):
...
@@ -6430,7 +6430,8 @@ class TestInferShape(utt.InferShapeTester):
self
.
_compile_and_check
([
advec
,
bdvec
],
self
.
_compile_and_check
([
advec
,
bdvec
],
[
Dot
()(
advec
,
bdvec
)],
[
Dot
()(
advec
,
bdvec
)],
[
advec_val
,
bdvec_val
],
[
advec_val
,
bdvec_val
],
(
Dot
,
tensor
.
blas
.
Gemv
,
tensor
.
blas_c
.
CGemv
))
(
Dot
,
tensor
.
blas
.
Dot22
,
tensor
.
blas
.
Gemv
,
tensor
.
blas_c
.
CGemv
))
#mat/mat
#mat/mat
admat
=
dmatrix
()
admat
=
dmatrix
()
...
@@ -6447,14 +6448,16 @@ class TestInferShape(utt.InferShapeTester):
...
@@ -6447,14 +6448,16 @@ class TestInferShape(utt.InferShapeTester):
self
.
_compile_and_check
([
advec
,
bdmat
],
self
.
_compile_and_check
([
advec
,
bdmat
],
[
Dot
()(
advec
,
bdmat
)],
[
Dot
()(
advec
,
bdmat
)],
[
advec_val
,
bdmat_val
],
[
advec_val
,
bdmat_val
],
(
Dot
,
tensor
.
blas
.
Gemv
,
tensor
.
blas_c
.
CGemv
))
(
Dot
,
tensor
.
blas
.
Dot22
,
tensor
.
blas
.
Gemv
,
tensor
.
blas_c
.
CGemv
))
#mat/vec
#mat/vec
admat_val
=
rand
(
5
,
4
)
admat_val
=
rand
(
5
,
4
)
self
.
_compile_and_check
([
admat
,
bdvec
],
self
.
_compile_and_check
([
admat
,
bdvec
],
[
Dot
()(
admat
,
bdvec
)],
[
Dot
()(
admat
,
bdvec
)],
[
admat_val
,
bdvec_val
],
[
admat_val
,
bdvec_val
],
(
Dot
,
tensor
.
blas
.
Gemv
,
tensor
.
blas_c
.
CGemv
))
(
Dot
,
tensor
.
blas
.
Dot22
,
tensor
.
blas
.
Gemv
,
tensor
.
blas_c
.
CGemv
))
# Split
# Split
aivec
=
ivector
()
aivec
=
ivector
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论