提交 f5bc7fc1 authored 作者: James Bergstra's avatar James Bergstra

Merge pull request #742 from nouiz/default_cvm

Make cvm the default
......@@ -143,10 +143,10 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None,
with all the Apply nodes in the graph in the correct order.
the cvm is a linker that replaces this python loop with a c
loop to avoid continuously changing between python and c.
(It's currently a matter of disagreement as to whether there
is a cost of changing between
python and C, or whether the cvm is faster only because C code
is faster than python code)
The CVM is faster for 2 reasons:
1) It's internal logic in C, so no Python interpreter overhead.
2) It makes native calls from the VM logic into thunks that
have been compiled using the CLinker.
the vm is a linker that was developed to prototype the cvm. it
was easier to develop the vm in python then translate it to c instead
of just writing it in c from scratch
......
......@@ -130,8 +130,8 @@ try:
AddConfigVar('linker',
("Default linker used if the theano flags mode is Mode "
"or ProfileMode"),
EnumStr('c|py', 'py', 'c', 'c|py_nogc', 'c&py',
'vm', 'cvm', 'vm_nogc', 'cvm_nogc'),
EnumStr('cvm', 'c|py', 'py', 'c', 'c|py_nogc', 'c&py',
'vm', 'vm_nogc', 'cvm_nogc'),
in_c_key=False)
except OSError:
# g++ is not present, linker should default to python only
......
......@@ -220,13 +220,13 @@ class Variable(utils.object2):
- `Constant` (a subclass) which adds a default and un-replaceable :literal:`value`, and
requires that owner is None
- `TensorVariable`
- `TensorVariable` subclass of Variable that represent numpy.ndarray object
- `SharedTensorVariable`
- `SharedTensorVariable` Shared version of TensorVariable
- `SparseVariable`
- `SparseVariable` subclass of Variable that represent scipy.sparse.{csc,csr}_matrix object
- `CudaVariable`
- `CudaNdarrayVariable` subclass of Variable that represent our object on the GPU that is a subset of numpy.ndarray
- `RandomVariable`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论