Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8e371199
提交
8e371199
authored
10月 11, 2017
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move V100/cuDNN check at the same place as other cudnn check.
上级
b4f39855
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
12 行删除
+7
-12
__init__.py
theano/gpuarray/__init__.py
+0
-11
dnn.py
theano/gpuarray/dnn.py
+7
-1
没有找到文件。
theano/gpuarray/__init__.py
浏览文件 @
8e371199
...
@@ -99,17 +99,6 @@ def init_dev(dev, name=None, preallocate=None):
...
@@ -99,17 +99,6 @@ def init_dev(dev, name=None, preallocate=None):
MB
=
(
1024
*
1024
)
MB
=
(
1024
*
1024
)
if
dev
.
startswith
(
'cuda'
):
if
dev
.
startswith
(
'cuda'
):
avail
=
dnn
.
dnn_available
(
name
)
avail
=
dnn
.
dnn_available
(
name
)
# On V100, cuDNN lower then 7002 don't raise error but
# takes hours to load! So raise a good user error.
if
avail
and
dnn
.
version
()
<
7002
:
bin_id
=
context
.
bin_id
assert
bin_id
.
startswith
(
"compute_"
),
context_bin_id
if
int
(
bin_id
[
8
:])
>=
70
:
raise
RuntimeError
(
"You have cuDNN version
%
d, while the GPU is a Volta"
" genaration or more recent. This cause extreme"
" slowness, so we disable it."
" Use cuDNN 7.0.2 or higher."
%
(
dnn
.
version
()))
# If we try to enable cudnn and there isn't enough GPU
# If we try to enable cudnn and there isn't enough GPU
# memory, there will be an unclear error message. So do
# memory, there will be an unclear error message. So do
# not even try a clear error.
# not even try a clear error.
...
...
theano/gpuarray/dnn.py
浏览文件 @
8e371199
...
@@ -222,10 +222,16 @@ def dnn_available(context_name):
...
@@ -222,10 +222,16 @@ def dnn_available(context_name):
# This is a hack because bin_id is in the from of
# This is a hack because bin_id is in the from of
# "<something>_<major><minor>" for cuda devices.
# "<something>_<major><minor>" for cuda devices.
if
ctx
.
bin_id
[
-
2
:]
<
b
'30'
:
if
int
(
ctx
.
bin_id
[
-
2
:])
<
30
:
dnn_available
.
msg
=
"Device not supported"
dnn_available
.
msg
=
"Device not supported"
return
False
return
False
# On V100, cuDNN lower then 7002 don't raise error but
# takes hours to load or execute! So raise a good user error.
if
version
()
<
7002
:
if
int
(
ctx
.
bin_id
[
-
2
:])
>=
70
:
dnn_available
.
msg
=
"Use cuDNN 7.0.2 or higher for Volta."
return
False
return
True
return
True
dnn_available
.
msg
=
None
dnn_available
.
msg
=
None
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论