Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
bc0c3b4e
提交
bc0c3b4e
authored
4月 19, 2012
作者:
nouiz
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #613 from delallea/minor
Minor stuff (including a fix for a bug recently introduced)
上级
d4dfbf2a
7877e99f
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
43 行增加
和
41 行删除
+43
-41
NEWS.txt
NEWS.txt
+20
-21
config.txt
doc/library/config.txt
+4
-4
configdefaults.py
theano/configdefaults.py
+1
-1
cmodule.py
theano/gof/cmodule.py
+10
-7
basic_ops.py
theano/sandbox/cuda/basic_ops.py
+4
-4
cuda_ndarray.cu
theano/sandbox/cuda/cuda_ndarray.cu
+4
-4
没有找到文件。
NEWS.txt
浏览文件 @
bc0c3b4e
...
@@ -10,12 +10,12 @@ Bug fixes
...
@@ -10,12 +10,12 @@ Bug fixes
* In Sparse sandbox, fix the grad of theano.sparse.sandbox.sp.row_scale.
* In Sparse sandbox, fix the grad of theano.sparse.sandbox.sp.row_scale.
It did not return the right number of elements. (Frederic B.)
It did not return the right number of elements. (Frederic B.)
* set_subtensor(x[int vector], new_value) when moved to the GPU
* set_subtensor(x[int vector], new_value) when moved to the GPU
w
here transformed into inc_subtensor on the GPU. Now we have a slow
w
as transformed into inc_subtensor on the GPU. Now we have a correct
GPU implementation.
(but slow)
GPU implementation.
Note: set_subtensor(x[slice[,...]], new_value) was working correctly
Note
1
: set_subtensor(x[slice[,...]], new_value) was working correctly
in all case as well as inc_subtensor(*, *).
in all case
s
as well as inc_subtensor(*, *).
Note
2: If your code have this behavior, we print a warning by default.
Note
2: If your code was affected by the incorrect behavior, we now print
(Frederic B.)
a warning by default
(Frederic B.)
* Fixed an issue whereby config values were used as default arguments,
* Fixed an issue whereby config values were used as default arguments,
with those defaults then stuck at old values if the config variables were
with those defaults then stuck at old values if the config variables were
changed during program execution. (David W-F)
changed during program execution. (David W-F)
...
@@ -65,25 +65,24 @@ New Features
...
@@ -65,25 +65,24 @@ New Features
(Frederic B., Simon McGregor)
(Frederic B., Simon McGregor)
* MRG random now raises an error with a clear message when the passed shape
* MRG random now raises an error with a clear message when the passed shape
contains dimensions with bad value like 0. (Frédéric B. reported by Ian G.)
contains dimensions with bad value like 0. (Frédéric B. reported by Ian G.)
* "CudaNdarray[*] = ndarray" work
in more case
(Frederic B.)
* "CudaNdarray[*] = ndarray" work
s in more cases
(Frederic B.)
* "CudaNdarray[*] += ndarray" work
in more case
(Frederic B.)
* "CudaNdarray[*] += ndarray" work
s in more cases
(Frederic B.)
* We add dimensions to CudaNdarray to automatically broadcast more frequently.
* We add dimensions to CudaNdarray to automatically broadcast more frequently.
(Frederic B.)
(Frederic B.)
* theano.tensor.argsort that wrap numpy.argsort (Hani Almousli).
* theano.tensor.argsort that wrap
s
numpy.argsort (Hani Almousli).
* New theano flag cmodule.warn_no_version. Default False. If True,
* New theano flag cmodule.warn_no_version. Default False. If True,
will print a warning when compiling one or more Op with c
code that
will print a warning when compiling one or more Op with C
code that
can't be cached as there is no c_code_cache_version() function to at
can't be cached because there is no c_code_cache_version() function
least of
of those Ops. (Frederic B.)
associated to at least one
of those Ops. (Frederic B.)
* CPU alloc now always generate
c
code (Pascal L.)
* CPU alloc now always generate
C
code (Pascal L.)
* New Theano flag cmodule.warn_no_version=False. When True, warn when an op
* New Theano flag cmodule.warn_no_version=False. When True, warn when an op
with
c code is not versionned. This force to recompile it everytimes
.
with
C code is not versioned (which forces to recompile it everytimes)
.
(Frédéric B.)
(Frédéric B.)
* Made a few Ops with
c code version
ned to reduce compilation time.
* Made a few Ops with
C code versio
ned to reduce compilation time.
(Frédéric B, Pascal L.)
(Frédéric B, Pascal L.)
* C code reuses preallocated outputs (only done by Scan) (Pascal L.)
* c code reuse preallocated output(only done by Scan) (Pascal L.)
* Garbage collection of intermediate results during Theano function calls
* gc of intermediate result during theano function call for op with c code
for Ops with C code (Pascal L.)
(Pascal L.)
Sparse
Sparse
* Implement theano.sparse.mul(sparse1, sparse2) when both inputs don't
* Implement theano.sparse.mul(sparse1, sparse2) when both inputs don't
...
@@ -278,7 +277,7 @@ New features:
...
@@ -278,7 +277,7 @@ New features:
* theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info() return free and total gpu memory (Frederic)
* theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info() return free and total gpu memory (Frederic)
* Theano flags compiledir_format. Keep the same default as before: compiledir_%(platform)s-%(processor)s-%(python_version)s. (Josh Bleecher Snyder)
* Theano flags compiledir_format. Keep the same default as before: compiledir_%(platform)s-%(processor)s-%(python_version)s. (Josh Bleecher Snyder)
* We also support the "theano_version" substitution.
* We also support the "theano_version" substitution.
* IntDiv
c
code (faster and allow this elemwise to be fused with other elemwise) (Pascal)
* IntDiv
C
code (faster and allow this elemwise to be fused with other elemwise) (Pascal)
* Internal filter_variable mechanism in Type. (Pascal, Ian)
* Internal filter_variable mechanism in Type. (Pascal, Ian)
* Ifelse works on sparse.
* Ifelse works on sparse.
* It makes use of gpu shared variable more transparent with theano.function updates and givens parameter.
* It makes use of gpu shared variable more transparent with theano.function updates and givens parameter.
...
@@ -347,7 +346,7 @@ Crashes fixed:
...
@@ -347,7 +346,7 @@ Crashes fixed:
* Fix runtime crash in gemm, dot22. FB
* Fix runtime crash in gemm, dot22. FB
* Fix on 32bits computer: make sure all shape are int64.(Olivier)
* Fix on 32bits computer: make sure all shape are int64.(Olivier)
* Fix to deque on python 2.4 (Olivier)
* Fix to deque on python 2.4 (Olivier)
* Fix crash when not using
c
code (or using DebugMode) (not used by
* Fix crash when not using
C
code (or using DebugMode) (not used by
default) with numpy 1.6*. Numpy has a bug in the reduction code that
default) with numpy 1.6*. Numpy has a bug in the reduction code that
made it crash. (Pascal)
made it crash. (Pascal)
* Crashes of blas functions (Gemv on CPU; Ger, Gemv and Gemm on GPU)
* Crashes of blas functions (Gemv on CPU; Ger, Gemv and Gemm on GPU)
...
...
doc/library/config.txt
浏览文件 @
bc0c3b4e
...
@@ -563,13 +563,13 @@ import theano and print the config variable, as in:
...
@@ -563,13 +563,13 @@ import theano and print the config variable, as in:
Bool value, default: False
Bool value, default: False
If True, will print a warning when compiling one or more Op with
c
If True, will print a warning when compiling one or more Op with
C
code that can't be cached
as
there is no c_code_cache_version()
code that can't be cached
because
there is no c_code_cache_version()
function
to at least of
of those Ops.
function
associated to at least one
of those Ops.
.. attribute:: config.cmodule.mac_framework_link
.. attribute:: config.cmodule.mac_framework_link
Bool value, default: False
Bool value, default: False
If set to True, breaks certain
mac
installations with the infamous
If set to True, breaks certain
MacOS
installations with the infamous
Bus Error.
Bus Error.
theano/configdefaults.py
浏览文件 @
bc0c3b4e
...
@@ -317,7 +317,7 @@ AddConfigVar('warn.subtensor_merge_bug',
...
@@ -317,7 +317,7 @@ AddConfigVar('warn.subtensor_merge_bug',
AddConfigVar
(
'warn.gpu_set_subtensor1'
,
AddConfigVar
(
'warn.gpu_set_subtensor1'
,
"Warn if previous versions of Theano (before 0.6) could have given "
"Warn if previous versions of Theano (before 0.6) could have given "
"incorrect results when moving to the gpu"
"incorrect results when moving to the gpu
"
"set_subtensor(x[int vector], new_value)"
,
"set_subtensor(x[int vector], new_value)"
,
BoolParam
(
warn_default
(
'0.6'
)),
BoolParam
(
warn_default
(
'0.6'
)),
in_c_key
=
False
)
in_c_key
=
False
)
...
...
theano/gof/cmodule.py
浏览文件 @
bc0c3b4e
...
@@ -27,14 +27,17 @@ from theano.gof.cc import hash_from_code
...
@@ -27,14 +27,17 @@ from theano.gof.cc import hash_from_code
import
compilelock
import
compilelock
from
theano.configparser
import
AddConfigVar
,
BoolParam
from
theano.configparser
import
AddConfigVar
,
BoolParam
AddConfigVar
(
'cmodule.mac_framework_link'
,
AddConfigVar
(
'cmodule.mac_framework_link'
,
(
"If set to True, breaks certain mac
installations with the infamous "
"If set to True, breaks certain MacOS
installations with the infamous "
"Bus Error"
)
,
"Bus Error"
,
BoolParam
(
False
))
BoolParam
(
False
))
AddConfigVar
(
'cmodule.warn_no_version'
,
AddConfigVar
(
'cmodule.warn_no_version'
,
"If True, will print a warning when compiling one or more Op with"
"If True, will print a warning when compiling one or more Op "
"c code that can't be cached as there is no c_code_cache_version"
"with C code that can't be cached because there is no "
"() function to at least of of those Ops."
,
"c_code_cache_version() function associated to at least one of "
"those Ops."
,
BoolParam
(
False
))
BoolParam
(
False
))
...
@@ -969,7 +972,7 @@ class ModuleCache(object):
...
@@ -969,7 +972,7 @@ class ModuleCache(object):
if
isinstance
(
k
,
theano
.
Op
)]
if
isinstance
(
k
,
theano
.
Op
)]
_logger
.
warning
(
"not all the"
_logger
.
warning
(
"not all the"
" following op(s) implement"
" following op(s) implement"
" c_code_cache_version(). This make them"
" c_code_cache_version(). This make
s
them"
" recompiled for each process."
+
str
(
ops
))
" recompiled for each process."
+
str
(
ops
))
# Map the new module to its KeyData object. Note that
# Map the new module to its KeyData object. Note that
...
@@ -1437,7 +1440,7 @@ class GCC_compiler(object):
...
@@ -1437,7 +1440,7 @@ class GCC_compiler(object):
#TODO: Do not do the dlimport in this function
#TODO: Do not do the dlimport in this function
if
include_dirs
is
None
:
if
include_dirs
is
None
:
prearg
s
=
[]
include_dir
s
=
[]
if
lib_dirs
is
None
:
if
lib_dirs
is
None
:
lib_dirs
=
[]
lib_dirs
=
[]
if
libs
is
None
:
if
libs
is
None
:
...
...
theano/sandbox/cuda/basic_ops.py
浏览文件 @
bc0c3b4e
...
@@ -1939,10 +1939,10 @@ class GpuAdvancedIncSubtensor1(tensor.AdvancedIncSubtensor1, GpuOp):
...
@@ -1939,10 +1939,10 @@ class GpuAdvancedIncSubtensor1(tensor.AdvancedIncSubtensor1, GpuOp):
return
Apply
(
self
,
[
x_
,
y_
,
ilist_
],
[
x_
.
type
()])
return
Apply
(
self
,
[
x_
,
y_
,
ilist_
],
[
x_
.
type
()])
# CudaNdarray_Subscript() don't support Advanced slicing.
# CudaNdarray_Subscript() do
es
n't support Advanced slicing.
# But we can't use the parent version that loop
on each indices
# But we can't use the parent version that loop
s on each index
# as we also need to loop when set_instead_of_inc is True and the
# as we also need to loop when set_instead_of_inc is True and the
# parent don't loop in that case.
# parent do
es
n't loop in that case.
def
perform
(
self
,
node
,
inp
,
out_
):
def
perform
(
self
,
node
,
inp
,
out_
):
# TODO opt to make this inplace
# TODO opt to make this inplace
x
,
y
,
idx
=
inp
x
,
y
,
idx
=
inp
...
@@ -1950,7 +1950,7 @@ class GpuAdvancedIncSubtensor1(tensor.AdvancedIncSubtensor1, GpuOp):
...
@@ -1950,7 +1950,7 @@ class GpuAdvancedIncSubtensor1(tensor.AdvancedIncSubtensor1, GpuOp):
if
not
self
.
inplace
:
if
not
self
.
inplace
:
x
=
x
.
copy
()
x
=
x
.
copy
()
if
self
.
set_instead_of_inc
:
if
self
.
set_instead_of_inc
:
# CudaNdarray __setitem__ don't do broadcast nor support
# CudaNdarray __setitem__ do
es
n't do broadcast nor support
# list of index.
# list of index.
assert
y
.
ndim
<=
x
.
ndim
# Should be guaranteed by `make_node`
assert
y
.
ndim
<=
x
.
ndim
# Should be guaranteed by `make_node`
if
y
.
ndim
==
x
.
ndim
:
if
y
.
ndim
==
x
.
ndim
:
...
...
theano/sandbox/cuda/cuda_ndarray.cu
浏览文件 @
bc0c3b4e
...
@@ -1066,7 +1066,7 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
...
@@ -1066,7 +1066,7 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
PyErr_SetString
(
PyErr_SetString
(
PyExc_ValueError
,
PyExc_ValueError
,
"CudaNdarray_inplace_elemwise cannot work inplace on"
"CudaNdarray_inplace_elemwise cannot work inplace on"
" un-initialized array when the new value have more th
e
n"
" un-initialized array when the new value have more th
a
n"
" 0 or 1 broadcastable dimensions"
);
" 0 or 1 broadcastable dimensions"
);
Py_XDECREF
(
new_other
);
Py_XDECREF
(
new_other
);
return
0
;
return
0
;
...
@@ -2799,9 +2799,9 @@ int CudaNdarray_CopyFromCudaNdarray(CudaNdarray * self,
...
@@ -2799,9 +2799,9 @@ int CudaNdarray_CopyFromCudaNdarray(CudaNdarray * self,
if
(
self
->
nd
<
other
->
nd
)
if
(
self
->
nd
<
other
->
nd
)
{
{
PyErr_Format
(
PyExc_NotImplementedError
,
PyErr_Format
(
PyExc_NotImplementedError
,
"CudaNdarray_CopyFromCudaNdarray: The
destination need more or the
"
"CudaNdarray_CopyFromCudaNdarray: The
number of dimensions of the
"
"
same number of dimensions then the source. Got %d and %d."
,
"
destination needs to be >= the number of dimensions of the "
self
->
nd
,
other
->
nd
);
"source. Got %d and %d."
,
self
->
nd
,
other
->
nd
);
return
-
1
;
return
-
1
;
}
}
else
if
(
self
->
nd
!=
other
->
nd
)
else
if
(
self
->
nd
!=
other
->
nd
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论