Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
ea17e455
提交
ea17e455
authored
9月 26, 2014
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't try to compile scan cython code if no compiler. More robust if the c file isn't available.
上级
bb085872
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
20 行增加
和
4 行删除
+20
-4
lazylinker_c.py
theano/gof/lazylinker_c.py
+2
-2
scan_perform_ext.py
theano/scan_module/scan_perform_ext.py
+18
-2
没有找到文件。
theano/gof/lazylinker_c.py
浏览文件 @
ea17e455
...
...
@@ -89,11 +89,11 @@ except ImportError:
if
not
os
.
path
.
exists
(
cfile
):
# This can happen in not normal case. We just
# disable the c clinker. If we are here the user
# didn't disable the compiler, so print a warning.
# didn't disable
d
the compiler, so print a warning.
warnings
.
warn
(
"The file lazylinker_c.c is not available. This do"
"not happen normally. You are probably in a strange"
"setup. This mean Theano ca not use the cvm:"
"setup. This mean Theano ca
n
not use the cvm:"
"our c execution engine for Theano function. If you"
"want to remove this warning, use the Theano flag"
"'cxx=' (set to an empty string) to disable all c"
...
...
theano/scan_module/scan_perform_ext.py
浏览文件 @
ea17e455
...
...
@@ -54,12 +54,28 @@ except ImportError:
if
version
!=
getattr
(
scan_perform
,
'_version'
,
None
):
raise
ImportError
()
except
ImportError
:
if
not
theano
.
config
.
cxx
:
raise
ImportError
(
"no c compiler, can't compile cython code"
)
_logger
.
info
(
"Compiling C code for scan"
)
dirname
=
'scan_perform'
cfile
=
os
.
path
.
join
(
theano
.
__path__
[
0
],
'scan_module'
,
'scan_perform.c'
)
code
=
open
(
cfile
)
.
read
()
if
not
os
.
path
.
exists
(
cfile
):
# This can happen in not normal case. We just
# disable the cython code. If we are here the user
# didn't disabled the compiler, so print a warning.
warnings
.
warn
(
"The file scan_perform.c is not available. This do"
"not happen normally. You are probably in a strange"
"setup. This mean Theano can not use the cython code for "
"scan. If you"
"want to remove this warning, use the Theano flag"
"'cxx=' (set to an empty string) to disable all c"
"code generation."
)
raise
ImportError
(
"The file lazylinker_c.c is not available."
)
code
=
open
(
cfile
)
.
read
()
loc
=
os
.
path
.
join
(
config
.
compiledir
,
dirname
)
if
not
os
.
path
.
exists
(
loc
):
try
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论