Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4e13c84a
提交
4e13c84a
authored
5月 21, 2021
作者:
Hector
提交者:
Thomas Wiecki
6月 07, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert `resize` to `ressize`
上级
44942c71
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
12 行删除
+12
-12
dnn_rnn_fwd.c
aesara/gpuarray/c_code/dnn_rnn_fwd.c
+4
-4
dnn_rnn_gi.c
aesara/gpuarray/c_code/dnn_rnn_gi.c
+5
-5
dnn_rnn_gw.c
aesara/gpuarray/c_code/dnn_rnn_gw.c
+3
-3
没有找到文件。
aesara/gpuarray/c_code/dnn_rnn_fwd.c
浏览文件 @
4e13c84a
...
@@ -17,7 +17,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
...
@@ -17,7 +17,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
cudnnTensorDescriptor_t
*
xl
=
NULL
;
cudnnTensorDescriptor_t
*
xl
=
NULL
;
cudnnTensorDescriptor_t
*
yl
=
NULL
;
cudnnTensorDescriptor_t
*
yl
=
NULL
;
gpudata
*
workspace
=
NULL
;
gpudata
*
workspace
=
NULL
;
size_t
worksize
,
resize
;
size_t
worksize
,
res
s
ize
;
size_t
seqLength
=
PyGpuArray_DIM
(
x
,
0
);
size_t
seqLength
=
PyGpuArray_DIM
(
x
,
0
);
size_t
miniBatch
=
PyGpuArray_DIM
(
x
,
1
);
size_t
miniBatch
=
PyGpuArray_DIM
(
x
,
1
);
...
@@ -162,7 +162,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
...
@@ -162,7 +162,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
}
}
err
=
cudnnGetRNNTrainingReserveSize
(
_handle
,
desc
,
(
int
)
seqLength
,
err
=
cudnnGetRNNTrainingReserveSize
(
_handle
,
desc
,
(
int
)
seqLength
,
xl
,
&
resize
);
xl
,
&
res
s
ize
);
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
PyErr_Format
(
PyExc_RuntimeError
,
PyErr_Format
(
PyExc_RuntimeError
,
"Could not get reserve size: %s"
,
"Could not get reserve size: %s"
,
...
@@ -170,7 +170,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
...
@@ -170,7 +170,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
goto
fail
;
goto
fail
;
}
}
*
reserve
=
gpudata_alloc
(
c
->
ctx
,
resize
,
NULL
,
0
,
NULL
);
*
reserve
=
gpudata_alloc
(
c
->
ctx
,
res
s
ize
,
NULL
,
0
,
NULL
);
if
(
*
reserve
==
NULL
)
{
if
(
*
reserve
==
NULL
)
{
PyErr_Format
(
PyExc_RuntimeError
,
"Could not allocate reserve"
);
PyErr_Format
(
PyExc_RuntimeError
,
"Could not allocate reserve"
);
goto
fail
;
goto
fail
;
...
@@ -185,7 +185,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
...
@@ -185,7 +185,7 @@ int dnn_rnn_fwd(cudnnRNNDescriptor_t desc, uint32_t numDirs,
hydesc
,
PyGpuArray_DEV_DATA
(
*
hy
),
hydesc
,
PyGpuArray_DEV_DATA
(
*
hy
),
cydesc
,
cy
?
PyGpuArray_DEV_DATA
(
*
cy
)
:
NULL
,
cydesc
,
cy
?
PyGpuArray_DEV_DATA
(
*
cy
)
:
NULL
,
*
(
void
**
)
workspace
,
worksize
,
*
(
void
**
)
workspace
,
worksize
,
*
(
void
**
)(
*
reserve
),
resize
);
*
(
void
**
)(
*
reserve
),
res
s
ize
);
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
PyErr_Format
(
PyExc_RuntimeError
,
PyErr_Format
(
PyExc_RuntimeError
,
"Could run RNN: %s"
,
"Could run RNN: %s"
,
...
...
aesara/gpuarray/c_code/dnn_rnn_gi.c
浏览文件 @
4e13c84a
...
@@ -21,7 +21,7 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
...
@@ -21,7 +21,7 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
cudnnTensorDescriptor_t
*
yl
=
NULL
;
cudnnTensorDescriptor_t
*
yl
=
NULL
;
cudnnTensorDescriptor_t
*
dxl
=
NULL
;
cudnnTensorDescriptor_t
*
dxl
=
NULL
;
gpudata
*
workspace
=
NULL
;
gpudata
*
workspace
=
NULL
;
size_t
worksize
,
resize
;
size_t
worksize
,
res
s
ize
;
size_t
seqLength
=
PyGpuArray_DIM
(
y
,
0
);
size_t
seqLength
=
PyGpuArray_DIM
(
y
,
0
);
size_t
miniBatch
=
PyGpuArray_DIM
(
y
,
1
);
size_t
miniBatch
=
PyGpuArray_DIM
(
y
,
1
);
...
@@ -170,7 +170,7 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
...
@@ -170,7 +170,7 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
}
}
err
=
cudnnGetRNNTrainingReserveSize
(
_handle
,
desc
,
(
int
)
seqLength
,
err
=
cudnnGetRNNTrainingReserveSize
(
_handle
,
desc
,
(
int
)
seqLength
,
dxl
,
&
resize
);
dxl
,
&
res
s
ize
);
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
PyErr_Format
(
PyExc_RuntimeError
,
PyErr_Format
(
PyExc_RuntimeError
,
"Could not get reserve size: %s"
,
"Could not get reserve size: %s"
,
...
@@ -178,13 +178,13 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
...
@@ -178,13 +178,13 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
goto
fail
;
goto
fail
;
}
}
*
oreserve
=
gpudata_alloc
(
c
->
ctx
,
resize
,
NULL
,
0
,
NULL
);
*
oreserve
=
gpudata_alloc
(
c
->
ctx
,
res
s
ize
,
NULL
,
0
,
NULL
);
if
(
*
oreserve
==
NULL
)
{
if
(
*
oreserve
==
NULL
)
{
PyErr_Format
(
PyExc_RuntimeError
,
"Could not allocate reserve"
);
PyErr_Format
(
PyExc_RuntimeError
,
"Could not allocate reserve"
);
goto
fail
;
goto
fail
;
}
}
if
(
gpudata_move
(
*
oreserve
,
0
,
reserve
,
0
,
resize
)
!=
GA_NO_ERROR
)
{
if
(
gpudata_move
(
*
oreserve
,
0
,
reserve
,
0
,
res
s
ize
)
!=
GA_NO_ERROR
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"could not copy reserve"
);
PyErr_SetString
(
PyExc_RuntimeError
,
"could not copy reserve"
);
goto
fail
;
goto
fail
;
}
}
...
@@ -202,7 +202,7 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
...
@@ -202,7 +202,7 @@ int dnn_rnn_gi(cudnnRNNDescriptor_t desc, npy_uint64 xshp,
dhxdesc
,
PyGpuArray_DEV_DATA
(
*
dhx
),
dhxdesc
,
PyGpuArray_DEV_DATA
(
*
dhx
),
dcxdesc
,
dcx
?
PyGpuArray_DEV_DATA
(
*
dcx
)
:
NULL
,
dcxdesc
,
dcx
?
PyGpuArray_DEV_DATA
(
*
dcx
)
:
NULL
,
*
(
void
**
)
workspace
,
worksize
,
*
(
void
**
)
workspace
,
worksize
,
*
(
void
**
)(
*
oreserve
),
resize
);
*
(
void
**
)(
*
oreserve
),
res
s
ize
);
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
PyErr_Format
(
PyExc_RuntimeError
,
PyErr_Format
(
PyExc_RuntimeError
,
"Could run RNN grad inputs: %s"
,
"Could run RNN grad inputs: %s"
,
...
...
aesara/gpuarray/c_code/dnn_rnn_gw.c
浏览文件 @
4e13c84a
...
@@ -12,7 +12,7 @@ int dnn_rnn_gw(cudnnRNNDescriptor_t desc, npy_uint64 _wsize,
...
@@ -12,7 +12,7 @@ int dnn_rnn_gw(cudnnRNNDescriptor_t desc, npy_uint64 _wsize,
cudnnTensorDescriptor_t
*
xl
=
NULL
;
cudnnTensorDescriptor_t
*
xl
=
NULL
;
cudnnTensorDescriptor_t
*
yl
=
NULL
;
cudnnTensorDescriptor_t
*
yl
=
NULL
;
gpudata
*
workspace
=
NULL
;
gpudata
*
workspace
=
NULL
;
size_t
worksize
,
resize
;
size_t
worksize
,
res
s
ize
;
size_t
iters
=
PyGpuArray_DIM
(
x
,
0
);
size_t
iters
=
PyGpuArray_DIM
(
x
,
0
);
size_t
wsize
=
_wsize
;
size_t
wsize
=
_wsize
;
...
@@ -132,7 +132,7 @@ int dnn_rnn_gw(cudnnRNNDescriptor_t desc, npy_uint64 _wsize,
...
@@ -132,7 +132,7 @@ int dnn_rnn_gw(cudnnRNNDescriptor_t desc, npy_uint64 _wsize,
}
}
err
=
cudnnGetRNNTrainingReserveSize
(
_handle
,
desc
,
(
int
)
iters
,
err
=
cudnnGetRNNTrainingReserveSize
(
_handle
,
desc
,
(
int
)
iters
,
xl
,
&
resize
);
xl
,
&
res
s
ize
);
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
PyErr_Format
(
PyExc_RuntimeError
,
PyErr_Format
(
PyExc_RuntimeError
,
"Could not get reserve size: %s"
,
"Could not get reserve size: %s"
,
...
@@ -146,7 +146,7 @@ int dnn_rnn_gw(cudnnRNNDescriptor_t desc, npy_uint64 _wsize,
...
@@ -146,7 +146,7 @@ int dnn_rnn_gw(cudnnRNNDescriptor_t desc, npy_uint64 _wsize,
yl
,
PyGpuArray_DEV_DATA
(
y
),
yl
,
PyGpuArray_DEV_DATA
(
y
),
*
(
void
**
)
workspace
,
worksize
,
*
(
void
**
)
workspace
,
worksize
,
dwdesc
,
PyGpuArray_DEV_DATA
(
*
dw
),
dwdesc
,
PyGpuArray_DEV_DATA
(
*
dw
),
*
(
void
**
)
reserve
,
resize
);
*
(
void
**
)
reserve
,
res
s
ize
);
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
if
(
err
!=
CUDNN_STATUS_SUCCESS
)
{
PyErr_Format
(
PyExc_RuntimeError
,
PyErr_Format
(
PyExc_RuntimeError
,
"Could run RNN grad weights: %s"
,
"Could run RNN grad weights: %s"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论