Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
80f86528
提交
80f86528
authored
8月 12, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
numpydoc for theano/gof/compiledir.py
上级
ee6a7995
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
compiledir.py
theano/gof/compiledir.py
+11
-8
没有找到文件。
theano/gof/compiledir.py
浏览文件 @
80f86528
...
...
@@ -32,10 +32,11 @@ except OSError:
def
local_bitwidth
():
"""
Return 32 for 32bit arch, 64 for 64bit arch
Return 32 for 32bit arch, 64 for 64bit arch
.
By "architecture", we mean the size of memory pointers (size_t in C),
*not* the size of long int, as it can be different.
"""
# Note that according to Python documentation, `platform.architecture()` is
# not reliable on OS X with universal binaries.
...
...
@@ -49,6 +50,7 @@ def python_int_bitwidth():
Return the bit width of Python int (C long int).
Note that it can be different from the size of a memory pointer.
"""
# 'l' denotes a C long int, and the size is expressed in bytes.
return
struct
.
calcsize
(
'l'
)
*
8
...
...
@@ -67,7 +69,8 @@ compiledir_format_dict = {
def
short_platform
(
r
=
None
,
p
=
None
):
"""Return a safe shorter version of platform.platform().
"""
Return a safe shorter version of platform.platform().
The old default Theano compiledir used platform.platform in
it. This use the platform.version() as a substring. This is too
...
...
@@ -103,13 +106,11 @@ def short_platform(r=None, p=None):
compiledir_Linux-2.6.32-220.7.1.el6.x86_64-x86_64-with-redhat-6.2-Santiago-x86_64-2.6.6
compiledir_Linux-2.6.32-220.4.1.el6.x86_64-x86_64-with-redhat-6.2-Santiago-x86_64-2.6.6
We suppose the version are ``X.Y[.*]-(digit)*(anything)*``. We
keep ``X.Y`` and don't keep less important digit in the part
before ``-`` and we remove the leading digit after the first
``-``.
We suppose the version are ``X.Y[.*]-(digit)*(anything)*``. We keep ``X.Y``
and don't keep less important digit in the part before ``-`` and we remove
the leading digit after the first ``-``.
If the information don't fit that pattern, we do not modify
platform.
If the information don't fit that pattern, we do not modify platform.
"""
if
r
is
None
:
...
...
@@ -214,6 +215,7 @@ def filter_compiledir(path):
def
get_home_dir
():
"""
Return location of the user's home directory.
"""
home
=
os
.
getenv
(
'HOME'
)
if
home
is
None
:
...
...
@@ -269,6 +271,7 @@ def cleanup():
3) They do not have a compile version string
If there is no key left for a compiled module, we delete the module.
"""
compiledir
=
theano
.
config
.
compiledir
for
directory
in
os
.
listdir
(
compiledir
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论