Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5be14f49
提交
5be14f49
authored
7月 22, 2014
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use new numpy interface
上级
74a47a54
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
11 行删除
+12
-11
GpuConvGrad3D.py
theano/sandbox/cuda/GpuConvGrad3D.py
+1
-1
blas.py
theano/sandbox/cuda/blas.py
+9
-9
rng_curand.py
theano/sandbox/cuda/rng_curand.py
+2
-1
没有找到文件。
theano/sandbox/cuda/GpuConvGrad3D.py
浏览文件 @
5be14f49
...
@@ -125,7 +125,7 @@ class GpuConvGrad3D(GpuOp):
...
@@ -125,7 +125,7 @@ class GpuConvGrad3D(GpuOp):
}
}
{ //for fail
{ //for fail
dtype_
%(WShape)
s * WShape = (dtype_
%(WShape)
s *)
%(WShape)
s->data
;
dtype_
%(WShape)
s * WShape = (dtype_
%(WShape)
s *)
PyArray_DATA(
%(WShape)
s)
;
const int outputChannels = WShape[0];
const int outputChannels = WShape[0];
const int inputChannels = CudaNdarray_HOST_DIMS(
%(V)
s)[4];
const int inputChannels = CudaNdarray_HOST_DIMS(
%(V)
s)[4];
if (WShape[4] != inputChannels)
if (WShape[4] != inputChannels)
...
...
theano/sandbox/cuda/blas.py
浏览文件 @
5be14f49
...
@@ -124,8 +124,8 @@ class GpuDot22Scalar(GpuOp):
...
@@ -124,8 +124,8 @@ class GpuDot22Scalar(GpuOp):
return
"""
return
"""
#define REAL float
#define REAL float
float
%(name)
s_a = (PyArray_TYPE(
%(a)
s) == NPY_FLOAT)
float
%(name)
s_a = (PyArray_TYPE(
%(a)
s) == NPY_FLOAT)
? (REAL)(((float*)
%(a)
s->data
)[0])
? (REAL)(((float*)
PyArray_DATA(
%(a)
s)
)[0])
: (REAL)(((double*)
%(a)
s->data
)[0]);
: (REAL)(((double*)
PyArray_DATA(
%(a)
s)
)[0]);
#undef REAL
#undef REAL
if (
%(x)
s->nd != 2)
if (
%(x)
s->nd != 2)
{
{
...
@@ -232,12 +232,12 @@ class GpuGemm(GpuOp):
...
@@ -232,12 +232,12 @@ class GpuGemm(GpuOp):
#define REAL float
#define REAL float
float
%(name)
s_a = (PyArray_TYPE(
%(a)
s) == NPY_FLOAT)
float
%(name)
s_a = (PyArray_TYPE(
%(a)
s) == NPY_FLOAT)
? (REAL)(((float*)
%(a)
s->data
)[0])
? (REAL)(((float*)
PyArray_DATA(
%(a)
s)
)[0])
: (REAL)(((double*)
%(a)
s->data
)[0]);
: (REAL)(((double*)
PyArray_DATA(
%(a)
s)
)[0]);
float
%(name)
s_b = (PyArray_TYPE(
%(b)
s) == NPY_FLOAT) ?
float
%(name)
s_b = (PyArray_TYPE(
%(b)
s) == NPY_FLOAT) ?
(REAL)(((float*)
%(b)
s->data
)[0])
(REAL)(((float*)
PyArray_DATA(
%(b)
s)
)[0])
: (REAL)(((double*)
%(b)
s->data
)[0]);
: (REAL)(((double*)
PyArray_DATA(
%(b)
s)
)[0]);
#undef REAL
#undef REAL
if (
%(inplace)
s
if (
%(inplace)
s
...
@@ -344,8 +344,8 @@ class GpuGemv(GpuOp):
...
@@ -344,8 +344,8 @@ class GpuGemv(GpuOp):
sio
=
StringIO
()
sio
=
StringIO
()
print
>>
sio
,
"""
print
>>
sio
,
"""
float
%(name)
s_alpha = ((dtype_
%(a)
s*)(
%(a)
s->data
))[0];
float
%(name)
s_alpha = ((dtype_
%(a)
s*)(
PyArray_DATA(
%(a)
s)
))[0];
float
%(name)
s_beta = ((dtype_
%(b)
s*)(
%(b)
s->data
))[0];
float
%(name)
s_beta = ((dtype_
%(b)
s*)(
PyArray_DATA(
%(b)
s)
))[0];
if (
%(inplace)
s
if (
%(inplace)
s
&& ((CudaNdarray_HOST_STRIDES(
%(z_in)
s)[0] > 0)
&& ((CudaNdarray_HOST_STRIDES(
%(z_in)
s)[0] > 0)
...
@@ -441,7 +441,7 @@ class GpuGer(GpuOp):
...
@@ -441,7 +441,7 @@ class GpuGer(GpuOp):
sio
=
StringIO
()
sio
=
StringIO
()
print
>>
sio
,
"""
print
>>
sio
,
"""
float
%(name)
s_alpha = ((dtype_
%(a)
s*)(
%(a)
s->data
))[0];
float
%(name)
s_alpha = ((dtype_
%(a)
s*)(
PyArray_DATA(
%(a)
s)
))[0];
if (
%(inplace)
s
if (
%(inplace)
s
&& (CudaNdarray_HOST_STRIDES(
%(z_in)
s)[0] >= 0)
&& (CudaNdarray_HOST_STRIDES(
%(z_in)
s)[0] >= 0)
...
...
theano/sandbox/cuda/rng_curand.py
浏览文件 @
5be14f49
...
@@ -168,7 +168,8 @@ class CURAND_Base(GpuOp):
...
@@ -168,7 +168,8 @@ class CURAND_Base(GpuOp):
}
}
for (int i = 0; i <
%(ndim)
s; ++i)
for (int i = 0; i <
%(ndim)
s; ++i)
{
{
odims[i] = ((npy_int32*)(
%(size)
s->data +
%(size)
s->strides[0] * i))[0];
odims[i] = ((npy_int32*)(PyArray_DATA(
%(size)
s) +
PyArray_STRIDES(
%(size)
s)[0] * i))[0];
n_elements *= odims[i];
n_elements *= odims[i];
must_alloc_sample = (must_alloc_sample
must_alloc_sample = (must_alloc_sample
|| CudaNdarray_HOST_DIMS(
%(o_sample)
s)[i] != odims[i]);
|| CudaNdarray_HOST_DIMS(
%(o_sample)
s)[i] != odims[i]);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论