Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
94006b16
提交
94006b16
authored
5月 11, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
in the theano flags, compiledir_format, allow the g++ version.
上级
b7d71322
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
21 行增加
和
19 行删除
+21
-19
cmodule.py
theano/gof/cmodule.py
+1
-19
compiledir.py
theano/gof/compiledir.py
+20
-0
没有找到文件。
theano/gof/cmodule.py
浏览文件 @
94006b16
...
@@ -25,6 +25,7 @@ from theano.gof.cc import hash_from_code
...
@@ -25,6 +25,7 @@ from theano.gof.cc import hash_from_code
# we will abuse the lockfile mechanism when reading and writing the registry
# we will abuse the lockfile mechanism when reading and writing the registry
import
compilelock
import
compilelock
from
compiledir
import
gcc_version_str
from
theano.configparser
import
AddConfigVar
,
BoolParam
from
theano.configparser
import
AddConfigVar
,
BoolParam
...
@@ -1407,25 +1408,6 @@ def std_lib_dirs():
...
@@ -1407,25 +1408,6 @@ def std_lib_dirs():
return
std_lib_dirs_and_libs
()[
1
]
return
std_lib_dirs_and_libs
()[
1
]
# Using the dummy file descriptors below is a workaround for a crash
# experienced in an unusual Python 2.4.4 Windows environment with the default
# None values.
dummy_in
=
open
(
os
.
devnull
)
dummy_err
=
open
(
os
.
devnull
,
'w'
)
p
=
None
try
:
p
=
subprocess
.
Popen
([
'g++'
,
'-dumpversion'
],
stdout
=
subprocess
.
PIPE
,
stdin
=
dummy_in
.
fileno
(),
stderr
=
dummy_err
.
fileno
())
p
.
wait
()
gcc_version_str
=
p
.
stdout
.
readline
()
.
strip
()
except
OSError
:
# Typically means gcc cannot be found.
gcc_version_str
=
'GCC_NOT_FOUND'
del
p
del
dummy_in
del
dummy_err
def
gcc_version
():
def
gcc_version
():
return
gcc_version_str
return
gcc_version_str
...
...
theano/gof/compiledir.py
浏览文件 @
94006b16
...
@@ -3,6 +3,7 @@ import errno
...
@@ -3,6 +3,7 @@ import errno
import
os
import
os
import
platform
import
platform
import
re
import
re
import
subprocess
import
shutil
import
shutil
import
sys
import
sys
import
textwrap
import
textwrap
...
@@ -13,11 +14,30 @@ import theano
...
@@ -13,11 +14,30 @@ import theano
from
theano.configparser
import
config
,
AddConfigVar
,
ConfigParam
,
StrParam
from
theano.configparser
import
config
,
AddConfigVar
,
ConfigParam
,
StrParam
from
theano.gof.utils
import
flatten
from
theano.gof.utils
import
flatten
# Using the dummy file descriptors below is a workaround for a crash
# experienced in an unusual Python 2.4.4 Windows environment with the default
# None values.
dummy_in
=
open
(
os
.
devnull
)
dummy_err
=
open
(
os
.
devnull
,
'w'
)
p
=
None
try
:
p
=
subprocess
.
Popen
([
'g++'
,
'-dumpversion'
],
stdout
=
subprocess
.
PIPE
,
stdin
=
dummy_in
.
fileno
(),
stderr
=
dummy_err
.
fileno
())
p
.
wait
()
gcc_version_str
=
p
.
stdout
.
readline
()
.
strip
()
except
OSError
:
# Typically means gcc cannot be found.
gcc_version_str
=
'GCC_NOT_FOUND'
del
p
del
dummy_in
del
dummy_err
compiledir_format_dict
=
{
"platform"
:
platform
.
platform
(),
compiledir_format_dict
=
{
"platform"
:
platform
.
platform
(),
"processor"
:
platform
.
processor
(),
"processor"
:
platform
.
processor
(),
"python_version"
:
platform
.
python_version
(),
"python_version"
:
platform
.
python_version
(),
"theano_version"
:
theano
.
__version__
,
"theano_version"
:
theano
.
__version__
,
"numpy_version"
:
numpy
.
__version__
,
"numpy_version"
:
numpy
.
__version__
,
"g++"
:
gcc_version_str
.
replace
(
" "
,
"_"
),
}
}
compiledir_format_keys
=
", "
.
join
(
compiledir_format_dict
.
keys
())
compiledir_format_keys
=
", "
.
join
(
compiledir_format_dict
.
keys
())
default_compiledir_format
=
\
default_compiledir_format
=
\
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论