提交 487148a8 authored 作者: Frederic's avatar Frederic 提交者: Arnaud Bergeron

cache the cudnn version

上级 705d0f28
...@@ -159,9 +159,12 @@ def version(): ...@@ -159,9 +159,12 @@ def version():
This only check the header version, the the library we link with. This only check the header version, the the library we link with.
""" """
if version.v is None:
f = theano.function([], DnnVersion()(), f = theano.function([], DnnVersion()(),
theano.Mode(optimizer=None)) theano.Mode(optimizer=None))
return f() version.v = f()
return version.v
version.v = None
class GpuDnnConvDesc(GpuOp): class GpuDnnConvDesc(GpuOp):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论