Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2535f2dd
提交
2535f2dd
authored
7月 05, 2012
作者:
nouiz
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #721 from nouiz/epd-mac
Epd mac
上级
f5bc7fc1
34e8ed7c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
34 行增加
和
4 行删除
+34
-4
blas.py
theano/tensor/blas.py
+34
-4
没有找到文件。
theano/tensor/blas.py
浏览文件 @
2535f2dd
...
@@ -323,6 +323,7 @@ def default_blas_ldflags():
...
@@ -323,6 +323,7 @@ def default_blas_ldflags():
# If we are in a EPD installation, mkl is available
# If we are in a EPD installation, mkl is available
blas_info
=
numpy
.
distutils
.
__config__
.
blas_opt_info
blas_info
=
numpy
.
distutils
.
__config__
.
blas_opt_info
if
"EPD"
in
sys
.
version
:
if
"EPD"
in
sys
.
version
:
use_unix_epd
=
True
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
return
' '
.
join
(
return
' '
.
join
(
[
'-L
%
s'
%
os
.
path
.
join
(
sys
.
prefix
,
"Scripts"
)]
+
[
'-L
%
s'
%
os
.
path
.
join
(
sys
.
prefix
,
"Scripts"
)]
+
...
@@ -331,9 +332,37 @@ def default_blas_ldflags():
...
@@ -331,9 +332,37 @@ def default_blas_ldflags():
# blas_info['libraries']?
# blas_info['libraries']?
[
'-l
%
s'
%
l
for
l
in
[
"mk2_core"
,
"mk2_intel_thread"
,
[
'-l
%
s'
%
l
for
l
in
[
"mk2_core"
,
"mk2_intel_thread"
,
"mk2_rt"
]])
"mk2_rt"
]])
return
' '
.
join
(
elif
sys
.
platform
==
'darwin'
:
[
'-L
%
s'
%
os
.
path
.
join
(
sys
.
prefix
,
"lib"
)]
+
# The env variable is needed to link with mkl
[
'-l
%
s'
%
l
for
l
in
blas_info
[
'libraries'
]])
new_path
=
os
.
path
.
join
(
sys
.
prefix
,
"lib"
)
v
=
os
.
getenv
(
"DYLD_FALLBACK_LIBRARY_PATH"
,
None
)
if
v
is
not
None
:
# Explicit version could be replaced by a symbolic
# link called 'Current' created by EPD installer
# This will resolve symbolic links
v
=
os
.
path
.
realpath
(
v
)
# 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' does 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, this will disable this warning."
%
new_path
)
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
#if numpy was linked with library that are not installed, we
#can't reuse them.
#can't reuse them.
if
all
(
not
os
.
path
.
exists
(
dir
)
for
dir
in
blas_info
[
'library_dirs'
]):
if
all
(
not
os
.
path
.
exists
(
dir
)
for
dir
in
blas_info
[
'library_dirs'
]):
...
@@ -345,7 +374,8 @@ def default_blas_ldflags():
...
@@ -345,7 +374,8 @@ def default_blas_ldflags():
# we just pass the whole ldflags as the -l
# we just pass the whole ldflags as the -l
# options part.
# options part.
[
'-L
%
s'
%
l
for
l
in
blas_info
[
'library_dirs'
]]
+
[
'-L
%
s'
%
l
for
l
in
blas_info
[
'library_dirs'
]]
+
[
'-l
%
s'
%
l
for
l
in
blas_info
[
'libraries'
]])
[
'-l
%
s'
%
l
for
l
in
blas_info
[
'libraries'
]]
+
extra
)
# ['-I%s' % l for l in blas_info['include_dirs']])
# ['-I%s' % l for l in blas_info['include_dirs']])
except
KeyError
:
except
KeyError
:
return
"-lblas"
return
"-lblas"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论