Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
16de137c
提交
16de137c
authored
3月 16, 2010
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updated doc about blas.
上级
f4ec6e7e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
44 行增加
和
11 行删除
+44
-11
install.txt
doc/install.txt
+44
-11
没有找到文件。
doc/install.txt
浏览文件 @
16de137c
...
...
@@ -89,14 +89,20 @@ In csh:
Troubleshooting: Make sure you have a BLAS library
-----------------------------------------------------
Theano currently depends on having a BLAS library to link against. The
default is to use the blas installation information in numpy:
``numpy.distutils.__config__.show``, but if numpy is not configured
[correctly] for using a fast BLAS, you should tell Theano which BLAS to use
via the THEANO_FLAGS environment variable, or a ``.theanorc`` file.
The .theanorc file is the simplest way to set a relatively permanent option
like this one. Add a ``[blas]`` section with an ``ldflags``
Their is many way to configure blas for theano. This is done with the
theano flags blas.ldflags (:ref:`libdoc_config`). The default is to use
the blas installation information in numpy:
``numpy.distutils.__config__.show``. You can tell theano to use a different
version if you want faster speed in case you didn't compile numpy with a
faster version of blas or if numpy was compiled with a static library of blas
as this is not nupported in theano.
The short way to configure the theano flags blas.ldflags is by setting the
env variable THEANO_FLAGS to blas.ldflags=XXX
(in bash export THEANO_FLAGS=blas.ldflags=XXX)
The ${HOME}/.theanorc file is the simplest way to set a relatively permanent
option like this one. Add a ``[blas]`` section with an ``ldflags``
entry like this:
.. code-block:: text
...
...
@@ -108,12 +114,39 @@ entry like this:
# other stuff can go here
If you prefer to use an environment variable, type something like this: ``export THEANO_FLAGS="blas.ldflags=<gcc linker flags>"``
so maybe ``export THEANO_FLAGS="blas.ldflags=-lf77blas -latlas -lgfortran"`` might work for you.
For more information on the formatting of ~/.theanorc and the configuration options that you can put there,
see :ref:`libdoc_config`.
Here are some different way to configure it:
0) Do nothing and use the default config. It don't work in the case numpy was
compiled with a static library. ATLAS is compiled by default only as a static lib.
1) The simplest case is too disable the usage of the blas library. In that
case, we call numpy. If numpy is linked with a fast
implementation of blas, it will be faster in theano, but not as fast if
linked directly in theano in some case(for gemm operation). To use numpy,
put the value of blas.ldflags to the empty string
(ex: export THEANO_FLAGS=blas.ldflags=).
2) You can install the default version of blas if the numpy version don't work.
If you have root or sudo access in fedora you can do 'sudo yum install blas blas-devel'.
Under Ubuntu(Debian too?) 'sudo apt-get install libblas-dev'. Then put the
theano flags blas.ldflags=-lblas. Not that the default version of blas is not uptimized.
Using an optimized version that be up to 10x faster in the blas function that we use.
3) Install the ATLAS library. ATLAS is an open source optimized version of BLAS.
You can install precompiled version on most OS, but you can compile it to have
a faster version(I have see speed up of up to 3x, especialy on more recent computer again the precompiled one).
in Fedora 'sudo yum install blas blas-devel'. Under Ubuntu,
'sudo apt-get install libblas-dev. Then use the theano flags
"blas.ldflags=-lblas". Then put the theano flags 'blas.ldflags' to '-lf77blas -latlas -lgfortran'
should do it for you. But the flags value can change for each os.
4) Use a faster version like MKL, GOTO, ... You are on your own to install it. See the
doc of that software and put the theano flags blas.ldflags correctly.
.. note::
Make sure your BLAS
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论