* Sparse type is now supported by the shape op and the ShapeFeature optimizer work correctly with them.
* Sparse type is now supported by the shape op and the ShapeFeature optimizer work correctly with them.
* fuse GpuElemwise more often(in the case where their is too many inputs that fusing all of them would bust the 256 bytes limits of parameter to gpu function)
* Fuse GpuElemwise more often (in the case where there are so many inputs that fusing them all would bust the 256 bytes limit of parameter to gpu function).
* Speed up gemv by a work around scipy gemv slowness when the matrix is in c order(the default)
* Speed up gemv by a work around scipy gemv slowness when the matrix is in C order (the default).
warning("WARNING: cuda_ndarray was loaded from",cuda_ndarray.cuda_ndarray.__file__,"This is not expected as theano should compile it automatically for you. Do you have a directory called cuda_ndarray in your LD_LIBRARY_PATH environment variable? If so, please remove it as it is outdated!")
warning("WARNING: cuda_ndarray was loaded from",cuda_ndarray.cuda_ndarray.__file__,"This is not expected as theano should compile it automatically for you. Do you have a directory called cuda_ndarray in your LD_LIBRARY_PATH environment variable? If so, please remove it as it is outdated!")
This file implement specialization optimization that break the canonicalization form
This file implement specialization optimization that break the canonization form of the graph.
Currently their is problem with the order of optimization and the definition of definition of canonized graph.
Right now their is a canonization optimization phase that try to make all equivalent graph identical. This is not always the case, but it do many of the basic stuff canonical. We need to extend the definition of canonization to make this true more often.
The problem this file indent to fix in the future is that in the "Equilibrium" specialization optimization phase, there is optimization that request that the graph is canonical, some other request that this is not true, and some other that break the canonicalization for some optimization. As we can't control the order of those optimization, their is case that some optimization requesting a canonical graph won't be applied as optimization that break the canonicalization form of the graph executed before.
To fix this, we need to split the specialization phase into a phase where optimization can't break the canonicalization form and one where this is allowed. This is also needed for the stabilized optimization phase, but as it happen before the specialization phase, this cause less problem.
Also, we should make the env refuse optimization that break the canonization of the graph in the optimizations phases where the graph is supposed to be canonical.
"""
"""
# TODO: intelligent merge for mul/add
# TODO: intelligent merge for mul/add
...
@@ -30,7 +40,7 @@ from theano import scalar as scal
...
@@ -30,7 +40,7 @@ from theano import scalar as scal
classMaxAndArgmaxOptimizer(Optimizer):
classMaxAndArgmaxOptimizer(Optimizer):
"""Replace MaxAndArgmax by CAReduce when the argmax is not used
"""Replace MaxAndArgmax by CAReduce when the argmax is not used
This is faster as MaxAndArgmax don't have c code and execute it
This is faster as MaxAndArgmax don't have c code and execute it
in two pass.
in two pass.
"""
"""
...
@@ -70,7 +80,7 @@ def local_max_to_min(node):
...
@@ -70,7 +80,7 @@ def local_max_to_min(node):
This is tested in tensor/tests/test_basic.py:test_min_max
This is tested in tensor/tests/test_basic.py:test_min_max
:note: we don't need an opt that will do the reverse as by default
:note: we don't need an opt that will do the reverse as by default
the interface put only MaxAndArgmax into the graph.
the interface put only MaxAndArgmax into the graph.