Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
fd0b1f00
提交
fd0b1f00
authored
8月 11, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
numpydoc for theano/sandbox/gpuarray/basic_ops.py
上级
1e7b212f
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
6 行删除
+20
-6
basic_ops.py
theano/sandbox/gpuarray/basic_ops.py
+20
-6
没有找到文件。
theano/sandbox/gpuarray/basic_ops.py
浏览文件 @
fd0b1f00
...
@@ -47,7 +47,9 @@ def as_gpuarray(x):
...
@@ -47,7 +47,9 @@ def as_gpuarray(x):
class
Kernel
(
object
):
class
Kernel
(
object
):
"""
"""
This class groups together all the attributes of a gpu kernel.
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
...
@@ -113,9 +115,9 @@ class Kernel(object):
...
@@ -113,9 +115,9 @@ class Kernel(object):
class
GpuKernelBase
(
object
):
class
GpuKernelBase
(
object
):
def
gpu_kernels
(
self
,
node
,
name
):
def
gpu_kernels
(
self
,
node
,
name
):
"""
"""
This is the method to override.
This should return an
This is the method to override.
This should return an iterable of Kernel
iterable of Kernel objects that describe the kernels this op
objects that describe the kernels this op will need.
will need.
"""
"""
raise
MethodNotDefined
(
'gpu_kernels'
)
raise
MethodNotDefined
(
'gpu_kernels'
)
...
@@ -552,13 +554,20 @@ cuda_from_gpu = CudaFromGpu()
...
@@ -552,13 +554,20 @@ cuda_from_gpu = CudaFromGpu()
class
GpuAlloc
(
HideC
,
Alloc
):
class
GpuAlloc
(
HideC
,
Alloc
):
"""
Parameters
----------
memset_0
It's only an optimized version. True, it means the
value is always 0, so the c code call memset as it is faster.
"""
__props__
=
(
'memset_0'
,)
__props__
=
(
'memset_0'
,)
_f16_ok
=
True
_f16_ok
=
True
def
__init__
(
self
,
memset_0
=
False
):
def
__init__
(
self
,
memset_0
=
False
):
"""memset_0 is only an optimized version. True, it mean the
value is always 0, so the c code call memset as it is faster.
"""
self
.
memset_0
=
memset_0
self
.
memset_0
=
memset_0
def
__str__
(
self
):
def
__str__
(
self
):
...
@@ -777,7 +786,9 @@ class GpuContiguous(Op):
...
@@ -777,7 +786,9 @@ class GpuContiguous(Op):
"""
"""
Always return a c contiguous output. Copy the input only if it is
Always return a c contiguous output. Copy the input only if it is
not already c contiguous.
not already c contiguous.
"""
"""
__props__
=
()
__props__
=
()
view_map
=
{
0
:
[
0
]}
view_map
=
{
0
:
[
0
]}
_f16_ok
=
True
_f16_ok
=
True
...
@@ -835,7 +846,9 @@ gpu_contiguous = GpuContiguous()
...
@@ -835,7 +846,9 @@ gpu_contiguous = GpuContiguous()
class
GpuReshape
(
HideC
,
tensor
.
Reshape
):
class
GpuReshape
(
HideC
,
tensor
.
Reshape
):
"""
"""
Implement Reshape on the gpu.
Implement Reshape on the gpu.
"""
"""
_f16_ok
=
True
_f16_ok
=
True
# __hash__, __eq__, __str__ come from tensor.Reshape
# __hash__, __eq__, __str__ come from tensor.Reshape
...
@@ -951,6 +964,7 @@ class GpuReshape(HideC, tensor.Reshape):
...
@@ -951,6 +964,7 @@ class GpuReshape(HideC, tensor.Reshape):
class
GpuJoin
(
HideC
,
Join
):
class
GpuJoin
(
HideC
,
Join
):
_f16_ok
=
True
_f16_ok
=
True
def
make_node
(
self
,
axis
,
*
tensors
):
def
make_node
(
self
,
axis
,
*
tensors
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论