Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e2fb6451
提交
e2fb6451
authored
5月 17, 2016
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix direct uses of ops.
上级
ff71803f
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
18 行增加
和
20 行删除
+18
-20
blockgemv.c
theano/gpuarray/blockgemv.c
+1
-2
blockger.c
theano/gpuarray/blockger.c
+1
-2
dnn_fwd.c
theano/gpuarray/dnn_fwd.c
+3
-3
dnn_gi.c
theano/gpuarray/dnn_gi.c
+3
-3
dnn_gw.c
theano/gpuarray/dnn_gw.c
+3
-3
extra_ops.py
theano/gpuarray/extra_ops.py
+3
-3
gemm16.c
theano/gpuarray/gemm16.c
+1
-1
subtensor.py
theano/gpuarray/subtensor.py
+3
-3
没有找到文件。
theano/gpuarray/blockgemv.c
浏览文件 @
e2fb6451
...
...
@@ -27,8 +27,7 @@ int APPLY_SPECIFIC(blockgemv)(PyGpuArrayObject *o, PyGpuArrayObject *W,
gpuarray_blas_ops
*
blas_ops
;
int
err
;
err
=
ctx
->
ops
->
property
(
ctx
->
ctx
,
NULL
,
NULL
,
GA_CTX_PROP_BLAS_OPS
,
&
blas_ops
);
err
=
gpucontext_property
(
ctx
->
ctx
,
GA_CTX_PROP_BLAS_OPS
,
&
blas_ops
);
if
(
err
!=
GA_NO_ERROR
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"Can't get blas ops"
);
return
-
1
;
...
...
theano/gpuarray/blockger.c
浏览文件 @
e2fb6451
...
...
@@ -15,8 +15,7 @@ int APPLY_SPECIFIC(blockger)(PyGpuArrayObject *o, PyGpuArrayObject *x,
gpuarray_blas_ops
*
blas_ops
;
int
err
;
err
=
ctx
->
ops
->
property
(
ctx
->
ctx
,
NULL
,
NULL
,
GA_CTX_PROP_BLAS_OPS
,
&
blas_ops
);
err
=
gpucontext_property
(
ctx
->
ctx
,
GA_CTX_PROP_BLAS_OPS
,
&
blas_ops
);
if
(
err
!=
GA_NO_ERROR
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"Can't get blas ops"
);
return
-
1
;
...
...
theano/gpuarray/dnn_fwd.c
浏览文件 @
e2fb6451
...
...
@@ -105,7 +105,7 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns,
algo
=
choice
.
algo
;
#else
size_t
free
;
int
err2
=
c
->
ops
->
property
(
c
->
ctx
,
NULL
,
NULL
,
GA_CTX_PROP_FREE_GMEM
,
&
free
);
int
err2
=
gpucontext_property
(
c
->
ctx
,
GA_CTX_PROP_FREE_GMEM
,
&
free
);
if
(
err2
!=
GA_NO_ERROR
)
{
PyErr_Format
(
PyExc_RuntimeError
,
"Error when trying to find the "
...
...
@@ -234,7 +234,7 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns,
* to place a nice get_work_mem() function in.
*/
if
(
worksize
!=
0
)
{
workspace
=
c
->
ops
->
buffer
_alloc
(
c
->
ctx
,
worksize
,
NULL
,
0
,
NULL
);
workspace
=
gpudata
_alloc
(
c
->
ctx
,
worksize
,
NULL
,
0
,
NULL
);
if
(
workspace
==
NULL
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"Could not allocate working memory"
);
...
...
@@ -258,7 +258,7 @@ APPLY_SPECIFIC(conv_fwd)(PyGpuArrayObject *input, PyGpuArrayObject *kerns,
APPLY_SPECIFIC
(
output
),
PyGpuArray_DEV_DATA
(
*
output
));
if
(
worksize
!=
0
)
c
->
ops
->
buffer
_release
(
workspace
);
gpudata
_release
(
workspace
);
cuda_record
(
input
->
ga
.
data
,
GPUARRAY_CUDA_WAIT_READ
);
cuda_record
(
kerns
->
ga
.
data
,
GPUARRAY_CUDA_WAIT_READ
);
...
...
theano/gpuarray/dnn_gi.c
浏览文件 @
e2fb6451
...
...
@@ -106,7 +106,7 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output,
algo
=
choice
.
algo
;
#else
size_t
free
;
int
err2
=
c
->
ops
->
property
(
c
->
ctx
,
NULL
,
NULL
,
GA_CTX_PROP_FREE_GMEM
,
&
free
);
int
err2
=
gpucontext_property
(
c
->
ctx
,
GA_CTX_PROP_FREE_GMEM
,
&
free
);
if
(
err2
!=
GA_NO_ERROR
)
{
PyErr_Format
(
PyExc_RuntimeError
,
"Error when trying to find the "
...
...
@@ -204,7 +204,7 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output,
}
if
(
worksize
!=
0
)
{
workspace
=
c
->
ops
->
buffer
_alloc
(
c
->
ctx
,
worksize
,
NULL
,
0
,
NULL
);
workspace
=
gpudata
_alloc
(
c
->
ctx
,
worksize
,
NULL
,
0
,
NULL
);
if
(
workspace
==
NULL
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"Could not allocate working memory"
);
...
...
@@ -227,7 +227,7 @@ APPLY_SPECIFIC(conv_gi)(PyGpuArrayObject *kerns, PyGpuArrayObject *output,
APPLY_SPECIFIC
(
input
),
PyGpuArray_DEV_DATA
(
*
input
));
if
(
worksize
!=
0
)
c
->
ops
->
buffer
_release
(
workspace
);
gpudata
_release
(
workspace
);
cuda_record
(
kerns
->
ga
.
data
,
GPUARRAY_CUDA_WAIT_READ
);
cuda_record
(
output
->
ga
.
data
,
GPUARRAY_CUDA_WAIT_READ
);
...
...
theano/gpuarray/dnn_gw.c
浏览文件 @
e2fb6451
...
...
@@ -107,7 +107,7 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output,
algo
=
choice
.
algo
;
#else
size_t
free
;
int
err2
=
c
->
ops
->
property
(
c
->
ctx
,
NULL
,
NULL
,
GA_CTX_PROP_FREE_GMEM
,
&
free
);
int
err2
=
gpucontext_property
(
c
->
ctx
,
GA_CTX_PROP_FREE_GMEM
,
&
free
);
if
(
err2
!=
GA_NO_ERROR
)
{
PyErr_Format
(
PyExc_RuntimeError
,
"Error when trying to find the "
...
...
@@ -192,7 +192,7 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output,
}
if
(
worksize
!=
0
)
{
workspace
=
c
->
ops
->
buffer
_alloc
(
c
->
ctx
,
worksize
,
NULL
,
0
,
NULL
);
workspace
=
gpudata
_alloc
(
c
->
ctx
,
worksize
,
NULL
,
0
,
NULL
);
if
(
workspace
==
NULL
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"Could not allocate working memory"
);
cuda_exit
(
c
->
ctx
);
...
...
@@ -214,7 +214,7 @@ APPLY_SPECIFIC(conv_gw)(PyGpuArrayObject *input, PyGpuArrayObject *output,
APPLY_SPECIFIC
(
kerns
),
PyGpuArray_DEV_DATA
(
*
kerns
));
if
(
worksize
!=
0
)
c
->
ops
->
buffer
_release
(
workspace
);
gpudata
_release
(
workspace
);
cuda_record
(
input
->
ga
.
data
,
GPUARRAY_CUDA_WAIT_READ
);
cuda_record
(
output
->
ga
.
data
,
GPUARRAY_CUDA_WAIT_READ
);
...
...
theano/gpuarray/extra_ops.py
浏览文件 @
e2fb6451
...
...
@@ -249,17 +249,17 @@ class GpuCumsum(GpuKernelBase, Op):
size_t max_grid_size1;
size_t max_grid_size2;
int err;
err =
%(ctx)
s->ops->property(
%(ctx)
s->ctx, NULL, NULL
, GA_CTX_PROP_MAXLSIZE0, &max_threads_dim0);
err =
gpucontext_property(
%(ctx)
s->ctx
, GA_CTX_PROP_MAXLSIZE0, &max_threads_dim0);
if (err != GA_NO_ERROR){
PyErr_SetString(PyExc_RuntimeError, "Could not fetch max_threads_dims0");
%(fail)
s;
}
err =
%(ctx)
s->ops->property(
%(ctx)
s->ctx, NULL, NULL
, GA_CTX_PROP_MAXGSIZE1, &max_grid_size1);
err =
gpucontext_property(
%(ctx)
s->ctx
, GA_CTX_PROP_MAXGSIZE1, &max_grid_size1);
if (err != GA_NO_ERROR){
PyErr_SetString(PyExc_RuntimeError, "Could not fetch max_grid_size1");
%(fail)
s;
}
err =
%(ctx)
s->ops->property(
%(ctx)
s->ctx, NULL, NULL
, GA_CTX_PROP_MAXGSIZE2, &max_grid_size2);
err =
gpucontext_property(
%(ctx)
s->ctx
, GA_CTX_PROP_MAXGSIZE2, &max_grid_size2);
if (err != GA_NO_ERROR){
PyErr_SetString(PyExc_RuntimeError, "Could not fetch max_grid_size2");
%(fail)
s;
...
...
theano/gpuarray/gemm16.c
浏览文件 @
e2fb6451
...
...
@@ -117,7 +117,7 @@ int gemm16(PyGpuArrayObject *C, float alpha,
if
(
48
<
n128
&&
n128
<=
64
)
{
n64
=
n
/
64
;
if
(
nprocs
==
0
)
if
(
A
->
ga
.
ops
->
property
(
A
->
context
->
ctx
,
NULL
,
NULL
,
if
(
gpucontext_property
(
A
->
context
->
ctx
,
GA_CTX_PROP_NUMPROCS
,
&
nprocs
))
{
nprocs
=
0
;
res
=
1
;
...
...
theano/gpuarray/subtensor.py
浏览文件 @
e2fb6451
...
...
@@ -757,7 +757,7 @@ __device__ ga_half atomicAdd(ga_half *addr, ga_half val) {
int err, kerr = 0;
if (threads_per_block[0] > 0 && n_blocks[0] > 0) {
err =
py_self->ga.ops->property(NULL, py_self->ga.data, NULL
,
err =
gpudata_property(py_self->ga.data
,
GA_CTX_PROP_ERRBUF, &errbuf);
if (err != GA_NO_ERROR) {
PyErr_SetString(PyExc_RuntimeError, "Can't fetch error buffer");
...
...
@@ -793,7 +793,7 @@ __device__ ga_half atomicAdd(ga_half *addr, ga_half val) {
GpuKernel_error(&
%(k_var)
s, err));
return 1;
}
err =
py_self->ga.ops->buffer
_read(&kerr, errbuf, 0, sizeof(int));
err =
gpudata
_read(&kerr, errbuf, 0, sizeof(int));
if (err != GA_NO_ERROR) {
PyErr_SetString(PyExc_RuntimeError, "Can't read error buffer");
return 1;
...
...
@@ -801,7 +801,7 @@ __device__ ga_half atomicAdd(ga_half *addr, ga_half val) {
if (kerr != 0) {
PyErr_SetString(PyExc_IndexError, "Index out of bounds");
kerr = 0;
py_self->ga.ops->buffer
_write(errbuf, 0, &kerr, sizeof(int));
gpudata
_write(errbuf, 0, &kerr, sizeof(int));
return 1;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论