Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
02548d27
提交
02548d27
authored
5月 06, 2016
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4464 from nouiz/small
Doc Ubuntu 16.04 and clean up flag in_c_key
上级
fc39f6ba
d22c596e
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
93 行增加
和
48 行删除
+93
-48
install.txt
doc/install.txt
+0
-15
install_ubuntu.txt
doc/install_ubuntu.txt
+25
-0
config.txt
doc/library/config.txt
+0
-7
conditions.txt
doc/tutorial/conditions.txt
+9
-0
debug_faq.txt
doc/tutorial/debug_faq.txt
+2
-0
configdefaults.py
theano/configdefaults.py
+34
-22
cc.py
theano/gof/cc.py
+0
-4
do_nightly_build
theano/misc/do_nightly_build
+8
-0
scan.py
theano/scan_module/scan.py
+15
-0
没有找到文件。
doc/install.txt
浏览文件 @
02548d27
...
...
@@ -815,21 +815,6 @@ try the following.
[gcc]
cxxflags = -L/opt/local/lib
- An obscure ``Bus error`` can sometimes be caused when linking
Theano-generated object files against the ``framework`` library in Leopard.
For this reason, we have disabled linking with ``-framework Python``, since on
most configurations this solves the ``Bus error`` problem. If this default
configuration causes problems with your Python/Theano installation and you think
that linking with ``-framework Python`` might help, then either set
the :envvar:`THEANO_FLAGS` environment variable with
``THEANO_FLAGS=cmodule.mac_framework_link`` or edit your ``~/.theanorc`` to
contain
.. code-block:: cfg
[cmodule]
mac_framework_link=True
- More generally, to investigate libraries issues, you can use the ``otool -L``
command on ``.so`` files found under your ``~/.theano`` directory. This will
list shared libraries dependencies, and may help identify incompatibilities.
...
...
doc/install_ubuntu.txt
浏览文件 @
02548d27
...
...
@@ -12,6 +12,31 @@ For NVIDIA Jetson TX1 embedded platform:
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libblas-dev git
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user # Need Theano 0.8(not yet released) or more recent
For Ubuntu 16.04 with cuda 7.5
.. code-block:: bash
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
sudo pip install Theano
# cuda 7.5 don't support the default g++ version. Install an supported version and make it the default.
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
# Work around a glibc bug
echo -e "\n[nvcc]\nflags=-D_FORCE_INLINES\n" >> ~/.theanorc
For Ubuntu 11.10 through 14.04:
.. code-block:: bash
...
...
doc/library/config.txt
浏览文件 @
02548d27
...
...
@@ -940,13 +940,6 @@ import theano and print the config variable, as in:
code that can't be cached because there is no c_code_cache_version()
function associated to at least one of those Ops.
.. attribute:: config.cmodule.mac_framework_link
Bool value, default: False
If set to True, breaks certain MacOS installations with the infamous
Bus Error.
.. attribute:: config.cmodule.remove_gxx_opt
Bool value, default: False
...
...
doc/tutorial/conditions.txt
浏览文件 @
02548d27
...
...
@@ -75,3 +75,12 @@ is not currently set by default to ``cvm``, it will be in the near future.
There is no automatic optimization replacing a ``switch`` with a
broadcasted scalar to an ``ifelse``, as this is not always faster. See
this `ticket <http://www.assembla.com/spaces/theano/tickets/764>`_.
.. note::
If you use :ref:`test values <test_values>`, then all branches of
the IfElse will be computed. This is normal, as using test_value
means everything will be computed when we build it, due to Python's
greedy evaluation and the semantic of test value. As we build both
branches, they will be executed for test values. This doesn't cause
any changes during the execution of the compiled Theano function.
doc/tutorial/debug_faq.txt
浏览文件 @
02548d27
...
...
@@ -84,6 +84,8 @@ We can here see that the error can be traced back to the line ``z = z + y``.
For this example, using ``optimizer=fast_compile`` worked. If it did not,
you could set ``optimizer=None`` or use test values.
.. _test_values:
Using Test Values
-----------------
...
...
theano/configdefaults.py
浏览文件 @
02548d27
...
...
@@ -42,6 +42,8 @@ AddConfigVar('floatX',
"Note: float16 support is experimental, use at your own risk."
,
EnumStr
(
'float64'
,
'float32'
,
'float16'
,
convert
=
floatX_convert
,),
# TODO: see gh-4466 for how to remove it.
in_c_key
=
True
)
AddConfigVar
(
'warn_float64'
,
...
...
@@ -343,11 +345,15 @@ def default_dnn_path(suffix):
AddConfigVar
(
'dnn.include_path'
,
"Location of the cudnn header (defaults to the cuda root)"
,
StrParam
(
default_dnn_path
(
'include'
)))
StrParam
(
default_dnn_path
(
'include'
)),
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'dnn.library_path'
,
"Location of the cudnn header (defaults to the cuda root)"
,
StrParam
(
default_dnn_path
(
'lib'
if
sys
.
platform
==
'darwin'
else
'lib64'
)))
StrParam
(
default_dnn_path
(
'lib'
if
sys
.
platform
==
'darwin'
else
'lib64'
)),
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'dnn.enabled'
,
"'auto', use cuDNN if available, but silently fall back"
...
...
@@ -543,7 +549,9 @@ AddConfigVar(
AddConfigVar
(
'lib.amdlibm'
,
"Use amd's amdlibm numerical library"
,
BoolParam
(
False
))
BoolParam
(
False
),
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'gpuelemwise.sync'
,
...
...
@@ -564,10 +572,6 @@ AddConfigVar(
IntParam
(
8
),
in_c_key
=
False
)
AddConfigVar
(
'experimental.mrg'
,
"Another random number generator that work on the gpu"
,
BoolParam
(
False
))
AddConfigVar
(
'experimental.unpickle_gpu_on_cpu'
,
"Allow unpickling of pickled CudaNdarrays as numpy.ndarrays."
"This is useful, if you want to open a CudaNdarray without "
...
...
@@ -854,7 +858,8 @@ AddConfigVar(
"It can be used to speed up compilation, reduce overhead "
"(particularly for scalars) and reduce the number of generated C "
"files."
,
BoolParam
(
True
))
BoolParam
(
True
),
in_c_key
=
True
)
AddConfigVar
(
'cache_optimizations'
,
...
...
@@ -863,7 +868,8 @@ AddConfigVar(
"any optimized graph and its optimization. Actually slow downs a lot "
"the first optimization, and could possibly still contains some bugs. "
"Use at your own risks."
,
BoolParam
(
False
))
BoolParam
(
False
),
in_c_key
=
False
)
def
good_seed_param
(
seed
):
...
...
@@ -1072,13 +1078,9 @@ AddConfigVar('optdb.max_use_ratio',
AddConfigVar
(
'gcc.cxxflags'
,
"Extra compiler flags for gcc"
,
StrParam
(
""
))
AddConfigVar
(
'cmodule.mac_framework_link'
,
"If set to True, breaks certain MacOS installations with the infamous "
"Bus Error"
,
BoolParam
(
False
))
StrParam
(
""
),
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'cmodule.warn_no_version'
,
"If True, will print a warning when compiling one or more Op "
...
...
@@ -1092,11 +1094,15 @@ AddConfigVar('cmodule.remove_gxx_opt',
"If True, will remove the -O* parameter passed to g++."
"This is useful to debug in gdb modules compiled by Theano."
"The parameter -g is passed by default to g++"
,
BoolParam
(
False
))
BoolParam
(
False
),
# TODO: change so that this isn't needed.
# This can be done by handing this in compile_args()
in_c_key
=
True
)
AddConfigVar
(
'cmodule.compilation_warning'
,
"If True, will print compilation warnings."
,
BoolParam
(
False
))
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'cmodule.preload_cache'
,
...
...
@@ -1315,7 +1321,9 @@ def try_blas_flag(flags):
AddConfigVar
(
'blas.ldflags'
,
"lib[s] to include for [Fortran] level-3 blas implementation"
,
StrParam
(
default_blas_ldflags
))
StrParam
(
default_blas_ldflags
),
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'metaopt.verbose'
,
...
...
@@ -1399,12 +1407,14 @@ AddConfigVar(
AddConfigVar
(
'scan.allow_gc'
,
"Allow/disallow gc inside of Scan (default: False)"
,
BoolParam
(
False
))
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'scan.allow_output_prealloc'
,
"Allow/disallow memory preallocation for outputs inside of scan "
"(default: True)"
,
BoolParam
(
True
))
BoolParam
(
True
),
in_c_key
=
False
)
AddConfigVar
(
'pycuda.init'
,
"""If True, always initialize PyCUDA when Theano want to
...
...
@@ -1419,7 +1429,9 @@ AddConfigVar('pycuda.init',
AddConfigVar
(
'cublas.lib'
,
"""Name of the cuda blas library for the linker."""
,
StrParam
(
'cublas'
))
StrParam
(
'cublas'
),
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'lib.cnmem'
,
"""Do we enable CNMeM or not (a faster CUDA memory allocator).
...
...
theano/gof/cc.py
浏览文件 @
02548d27
...
...
@@ -1229,10 +1229,6 @@ class CLinker(link.Linker):
It is followed by elements for every node in the topological ordering
of `self.fgraph`.
If the Op of any Apply in the FunctionGraph does not have
c_code_cache_ok()==True, then this function raises a KeyError
exception.
Input Signature
---------------
...
...
theano/misc/do_nightly_build
浏览文件 @
02548d27
...
...
@@ -53,6 +53,7 @@ FLAGS=${FLAGS},device=cpu,floatX=float64
if
[
"
$RELEASE
"
]
;
then
echo
"Executing tests with default mode and compute_test_value"
date
THEANO_FLAGS
=
${
FLAGS
}
,compute_test_value
=
ignore
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
...
...
@@ -60,6 +61,7 @@ if [ "$RELEASE" ]; then
echo
"Executing tests with linker=vm,floatX=float32"
echo
"THEANO_FLAGS=
${
FLAGS
}
,linker=vm,floatX=float32
${
NOSETESTS
}
${
ARGS
}
"
date
THEANO_FLAGS
=
${
FLAGS
}
,linker
=
vm,floatX
=
float32
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
...
...
@@ -67,6 +69,7 @@ if [ "$RELEASE" ]; then
echo
"Executing tests with cxx="
echo
"THEANO_FLAGS=
${
FLAGS
}
,cxx=
${
NOSETESTS
}
${
ARGS
}
"
date
THEANO_FLAGS
=
${
FLAGS
}
,cxx
=
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
...
...
@@ -76,6 +79,7 @@ fi
echo
"Executing tests with mode=FAST_RUN"
echo
"THEANO_FLAGS=cmodule.warn_no_version=True,
${
FLAGS
}
,mode=FAST_RUN
${
NOSETESTS
}
${
PROFILING
}
${
ARGS
}
"
date
THEANO_FLAGS
=
cmodule.warn_no_version
=
True,
${
FLAGS
}
,mode
=
FAST_RUN
${
NOSETESTS
}
${
PROFILING
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
...
...
@@ -83,6 +87,7 @@ echo
echo
"Executing tests with mode=FAST_RUN,floatX=float32"
echo
"THEANO_FLAGS=
${
FLAGS
}
,mode=FAST_RUN,floatX=float32
${
NOSETESTS
}
${
ARGS
}
"
date
THEANO_FLAGS
=
${
FLAGS
}
,mode
=
FAST_RUN,floatX
=
float32
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
...
...
@@ -90,6 +95,7 @@ echo
echo
"Executing tests with linker=vm,vm.lazy=True,floatX=float32"
echo
"THEANO_FLAGS=
${
FLAGS
}
,linker=vm,vm.lazy=True,floatX=float32
${
NOSETESTS
}
${
ARGS
}
"
date
THEANO_FLAGS
=
${
FLAGS
}
,linker
=
vm,vm.lazy
=
True,floatX
=
float32
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
...
...
@@ -99,6 +105,7 @@ echo
seed
=
$RANDOM
echo
"Executing tests with mode=DEBUG_MODE with seed of the day
$seed
"
echo
"THEANO_FLAGS=
${
FLAGS
}
,unittests.rseed=
$seed
,mode=DEBUG_MODE,DebugMode.check_strides=0,DebugMode.patience=3,DebugMode.check_preallocated_output=
${
NOSETESTS
}
${
ARGS
}
"
date
THEANO_FLAGS
=
${
FLAGS
}
,unittests.rseed
=
$seed
,mode
=
DEBUG_MODE,DebugMode.check_strides
=
0,DebugMode.patience
=
3,DebugMode.check_preallocated_output
=
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
...
...
@@ -110,6 +117,7 @@ echo
# with --batch=1000" # The buildbot freeze sometimes when collecting the tests to run
echo
"Executing tests with mode=FAST_COMPILE"
echo
"THEANO_FLAGS=
${
FLAGS
}
,mode=FAST_COMPILE
${
NOSETESTS
}
${
ARGS
}
"
date
THEANO_FLAGS
=
${
FLAGS
}
,mode
=
FAST_COMPILE
${
NOSETESTS
}
${
ARGS
}
echo
"Number of elements in the compiledir:"
...
...
theano/scan_module/scan.py
浏览文件 @
02548d27
...
...
@@ -316,6 +316,21 @@ def scan(fn,
Set the value of allow gc for the internal graph of scan. If
set to None, this will use the value of config.scan.allow_gc.
The full scan behavior related to allocation is determined by
this value and the Theano flag allow_gc. If the flag allow_gc
is True (default) and this scan parameter allow_gc is False
(default), then we let scan allocate all intermediate memory
on the first iteration, those are not garbage collected them
during that first iteration (this is determined by the scan
allow_gc). This speed up allocation of the following
iteration. But we free all those temp allocation at the end of
all iterations (this is what the Theano flag allow_gc mean).
If you use cnmem and this scan is on GPU, the speed up from
the scan allow_gc is small. If you are missing memory, disable
the scan allow_gc could help you run graph that request much
memory.
strict
If true, all the shared variables used in ``fn`` must be provided as a
part of ``non_sequences`` or ``sequences``.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论