Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e44e5515
提交
e44e5515
authored
4月 27, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New try to make Theano link with EPD mkl on MacOS X.
上级
53f07781
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
13 行删除
+20
-13
blas.py
theano/tensor/blas.py
+20
-13
没有找到文件。
theano/tensor/blas.py
浏览文件 @
e44e5515
...
...
@@ -319,8 +319,8 @@ def default_blas_ldflags():
try
:
# If we are in a EPD installation, mkl is available
blas_info
=
numpy
.
distutils
.
__config__
.
blas_opt_info
extra
=
[]
if
"EPD"
in
sys
.
version
:
use_unix_epd
=
True
if
sys
.
platform
==
'win32'
:
return
' '
.
join
(
[
'-L
%
s'
%
os
.
path
.
join
(
sys
.
prefix
,
"Scripts"
)]
+
...
...
@@ -330,23 +330,30 @@ def default_blas_ldflags():
[
'-l
%
s'
%
l
for
l
in
[
"mk2_core"
,
"mk2_intel_thread"
,
"mk2_rt"
]])
elif
sys
.
platform
==
'darwin'
:
# Th
is is needed to link with
# Th
e env variable is needed to link with mkl
new_path
=
os
.
path
.
join
(
sys
.
prefix
,
"lib"
)
v
=
os
.
getenv
(
"DYLD_FALLBACK_LIBRARY_PATH"
,
None
)
if
v
is
None
:
os
.
putenv
(
"DYLD_FALLBACK_LIBRARY_PATH"
,
new_path
)
elif
new_path
not
in
v
.
split
(
":"
):
raise
Exception
(
# The python __import__ don't seam to take into account
# the new env variable "DYLD_FALLBACK_LIBRARY_PATH"
# when we set with os.environ['...'] = X or os.putenv()
# So we warn the user and tell him what todo.
if
v
is
None
or
new_path
not
in
v
.
split
(
":"
):
_logger
.
warning
(
"The environment variable "
"'DYLD_FALLBACK_LIBRARY_PATH'
is set, but do
"
"
not contain the '
%
s' path
. This will make "
"'DYLD_FALLBACK_LIBRARY_PATH'
do not contain
"
"
the '
%
s' path in its value
. This will make "
"Theano use a slow version of BLAS. Update "
"'DYLD_FALLBACK_LIBRARY_PATH' to contain the "
"said value or delete this environment "
"variable."
)
return
' '
.
join
(
[
'-L
%
s'
%
os
.
path
.
join
(
sys
.
prefix
,
"lib"
)]
+
[
'-l
%
s'
%
l
for
l
in
blas_info
[
'libraries'
]])
"said value, this will disable this warning."
)
use_unix_epd
=
False
if
use_unix_epd
:
return
' '
.
join
(
[
'-L
%
s'
%
os
.
path
.
join
(
sys
.
prefix
,
"lib"
)]
+
[
'-l
%
s'
%
l
for
l
in
blas_info
[
'libraries'
]])
#if numpy was linked with library that are not installed, we
#can't reuse them.
if
all
(
not
os
.
path
.
exists
(
dir
)
for
dir
in
blas_info
[
'library_dirs'
]):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论