Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
ec5283b2
提交
ec5283b2
authored
5月 06, 2014
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fetch the kernel name from the Kernel object in the c_code and document what Kernel represents.
上级
2c49663e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
4 行删除
+7
-4
basic_ops.py
theano/sandbox/gpuarray/basic_ops.py
+4
-1
rng_mrg.py
theano/sandbox/rng_mrg.py
+3
-3
没有找到文件。
theano/sandbox/gpuarray/basic_ops.py
浏览文件 @
ec5283b2
...
@@ -62,6 +62,9 @@ class HideC(object):
...
@@ -62,6 +62,9 @@ class HideC(object):
class
Kernel
(
object
):
class
Kernel
(
object
):
"""
This class groups together all the attributes of a gpu kernel.
"""
def
__init__
(
self
,
code
,
params
,
name
,
flags
,
def
__init__
(
self
,
code
,
params
,
name
,
flags
,
codevar
=
None
,
binvar
=
None
,
objvar
=
None
):
codevar
=
None
,
binvar
=
None
,
objvar
=
None
):
self
.
code
=
code
self
.
code
=
code
...
@@ -833,7 +836,7 @@ KERNEL void k(GLOBAL_MEM %(ctype)s *a, ga_size n, ga_size m) {
...
@@ -833,7 +836,7 @@ KERNEL void k(GLOBAL_MEM %(ctype)s *a, ga_size n, ga_size m) {
fail
=
sub
[
'fail'
]
fail
=
sub
[
'fail'
]
typecode
=
pygpu
.
gpuarray
.
dtype_to_typecode
(
self
.
dtype
)
typecode
=
pygpu
.
gpuarray
.
dtype_to_typecode
(
self
.
dtype
)
sync
=
bool
(
config
.
gpuarray
.
sync
)
sync
=
bool
(
config
.
gpuarray
.
sync
)
kname
=
'k_eye_'
+
name
kname
=
self
.
gpu_kernels
()[
0
]
.
objvar
s
=
"""
s
=
"""
size_t dims[2] = {0, 0};
size_t dims[2] = {0, 0};
void *args[3];
void *args[3];
...
...
theano/sandbox/rng_mrg.py
浏览文件 @
ec5283b2
...
@@ -867,8 +867,8 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base):
...
@@ -867,8 +867,8 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base):
return
[
Kernel
(
code
=
code
,
name
=
"mrg_uniform"
,
return
[
Kernel
(
code
=
code
,
name
=
"mrg_uniform"
,
params
=
[
gpuarray
.
GpuArray
,
gpuarray
.
GpuArray
,
params
=
[
gpuarray
.
GpuArray
,
gpuarray
.
GpuArray
,
'uint32'
,
'uint32'
],
'uint32'
,
'uint32'
],
flags
=
Kernel
.
get_flags
(
self
.
output_type
.
dtype
,
'int32'
)
,
flags
=
Kernel
.
get_flags
(
self
.
output_type
.
dtype
,
'int32'
)
)
objvar
=
'k_mrg_uniform'
)
]
]
def
c_code
(
self
,
node
,
nodename
,
inp
,
out
,
sub
):
def
c_code
(
self
,
node
,
nodename
,
inp
,
out
,
sub
):
rstate
,
size
=
inp
rstate
,
size
=
inp
...
@@ -877,7 +877,7 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base):
...
@@ -877,7 +877,7 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base):
ndim
=
self
.
output_type
.
ndim
ndim
=
self
.
output_type
.
ndim
o_type_num
=
numpy
.
asarray
(
0
,
dtype
=
self
.
output_type
.
dtype
)
.
dtype
.
num
o_type_num
=
numpy
.
asarray
(
0
,
dtype
=
self
.
output_type
.
dtype
)
.
dtype
.
num
fail
=
sub
[
'fail'
]
fail
=
sub
[
'fail'
]
kname
=
'k_mrg_uniform'
kname
=
self
.
gpu_kernels
()[
0
]
.
objvar
if
self
.
output_type
.
dtype
==
'float32'
:
if
self
.
output_type
.
dtype
==
'float32'
:
otype
=
'float'
otype
=
'float'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论