Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4de38113
提交
4de38113
authored
11月 15, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NumPy 1.8 changed a private interface, but the official interface output useless stuff to the user.
Try to use the old interface and silence part of the printed stuff.
上级
cbaf5cc0
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
1 行删除
+24
-1
blas.py
theano/tensor/blas.py
+24
-1
没有找到文件。
theano/tensor/blas.py
浏览文件 @
4de38113
...
@@ -128,10 +128,15 @@ import logging
...
@@ -128,10 +128,15 @@ import logging
import
os
import
os
import
sys
import
sys
import
time
import
time
import
warnings
import
numpy
import
numpy
import
numpy.distutils
import
numpy.distutils
import
numpy.distutils.system_info
import
numpy.distutils.system_info
try
:
import
numpy.distutils.__config__
except
ImportError
:
pass
from
theano.configparser
import
config
,
AddConfigVar
,
StrParam
from
theano.configparser
import
config
,
AddConfigVar
,
StrParam
from
theano.gof
import
(
utils
,
Op
,
view_roots
,
DestroyHandler
,
from
theano.gof
import
(
utils
,
Op
,
view_roots
,
DestroyHandler
,
...
@@ -156,8 +161,26 @@ _logger = logging.getLogger('theano.tensor.blas')
...
@@ -156,8 +161,26 @@ _logger = logging.getLogger('theano.tensor.blas')
# Otherwise, we give an optimization warning for no reason in some cases.
# Otherwise, we give an optimization warning for no reason in some cases.
def
default_blas_ldflags
():
def
default_blas_ldflags
():
try
:
try
:
# If we are in a EPD installation, mkl is available
if
hasattr
(
numpy
.
distutils
,
'__config__'
):
#If the old private interface is available use it as it
#don't print information to the user.
blas_info
=
numpy
.
distutils
.
__config__
.
blas_opt_info
else
:
#We need to catch warnings as in some cases NumPy print
#stuff that we don't want the user to see like this:
"""
SOMEPATH/Canopy_64bit/User/lib/python2.7/site-packages/numpy/distutils/system_info.py:564: UserWarning: Specified path /home/vagrant/src/master-env/lib is invalid.
warnings.warn('Specified path
%
s is invalid.'
%
d)
"""
#I'm not able to remove all printed stuff
with_context
=
warnings
.
catch_warnings
(
record
=
True
)
with_context
.
__enter__
()
try
:
blas_info
=
numpy
.
distutils
.
system_info
.
get_info
(
"blas_opt"
)
blas_info
=
numpy
.
distutils
.
system_info
.
get_info
(
"blas_opt"
)
finally
:
with_context
.
__exit__
(
None
,
None
,
None
)
# If we are in a EPD installation, mkl is available
if
"EPD"
in
sys
.
version
:
if
"EPD"
in
sys
.
version
:
use_unix_epd
=
True
use_unix_epd
=
True
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论