提交 5f881d53 authored 作者: James Bergstra's avatar James Bergstra

Added a function to cmodule to detect the architecture bit width

上级 085a8064
...@@ -12,6 +12,9 @@ AddConfigVar('cmodule.mac_framework_link', ...@@ -12,6 +12,9 @@ AddConfigVar('cmodule.mac_framework_link',
"If set to true, breaks certain mac installations with the infamous Bus Error", "If set to true, breaks certain mac installations with the infamous Bus Error",
BoolParam(False)) BoolParam(False))
def local_bitwidth():
"""Return 32 for 32bit arch, 64 for 64bit arch"""
return len('%x' % sys.maxint) * 4
_logger=logging.getLogger("theano.gof.cmodule") _logger=logging.getLogger("theano.gof.cmodule")
_logger.setLevel(logging.WARN) _logger.setLevel(logging.WARN)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论