Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
179e4085
提交
179e4085
authored
10月 03, 2016
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make GpuOp(old back-end) and GpuElemwise(new back-end) use prepare_node
上级
0e107ac0
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
6 行增加
和
8 行删除
+6
-8
elemwise.py
theano/gpuarray/elemwise.py
+1
-3
__init__.py
theano/sandbox/cuda/__init__.py
+1
-5
blas.py
theano/sandbox/cuda/blas.py
+2
-0
dnn.py
theano/sandbox/cuda/dnn.py
+2
-0
没有找到文件。
theano/gpuarray/elemwise.py
浏览文件 @
179e4085
...
...
@@ -2640,11 +2640,9 @@ class GpuCAReduceCPY(GpuKernelBase, HideC, CAReduceDtype):
def
get_params
(
self
,
node
):
return
node
.
outputs
[
0
]
.
type
.
context
def
make_thunk
(
self
,
node
,
storage_map
,
compute_map
,
no_recycling
):
def
prepare_node
(
self
,
node
,
storage_map
,
compute_map
):
# cache the kernel object
self
.
get_kernel_cache
(
node
)
return
super
(
GpuCAReduceCPY
,
self
)
.
make_thunk
(
node
,
storage_map
,
compute_map
,
no_recycling
)
def
get_kernel_cache
(
self
,
node
):
attr
=
'@cache_reduction_k'
...
...
theano/sandbox/cuda/__init__.py
浏览文件 @
179e4085
...
...
@@ -246,18 +246,14 @@ class GpuOp(theano.gof.Op):
"""
def
make_thunk
(
self
,
node
,
storage_map
,
compute_map
,
no_recycling
):
def
prepare_node
(
self
,
node
,
storage_map
,
compute_map
):
if
use
.
device_number
is
None
:
use
(
"gpu"
,
force
=
True
,
default_to_move_computation_to_gpu
=
False
,
move_shared_float32_to_gpu
=
False
,
enable_cuda
=
False
)
return
super
(
GpuOp
,
self
)
.
make_thunk
(
node
,
storage_map
,
compute_map
,
no_recycling
)
theano
.
compile
.
debugmode
.
default_make_thunk
.
append
(
get_unbound_function
(
GpuOp
.
make_thunk
))
# We must do those import to be able to create the full doc when
# nvcc is not available
...
...
theano/sandbox/cuda/blas.py
浏览文件 @
179e4085
...
...
@@ -2120,6 +2120,8 @@ class GpuConv(GpuOp):
return
flops
def
prepare_node
(
self
,
node
,
storage_map
,
compute_map
):
super
(
GpuConv
,
self
)
.
prepare_node
(
node
,
storage_map
,
compute_map
,
impl
)
if
node
.
op
.
max_threads_dim0
is
None
:
cuda
=
theano
.
sandbox
.
cuda
device_id
=
cuda
.
use
.
device_number
...
...
theano/sandbox/cuda/dnn.py
浏览文件 @
179e4085
...
...
@@ -1513,6 +1513,8 @@ class GpuDnnPool(DnnBase):
self
.
mode
=
mode
def
prepare_node
(
self
,
node
,
storage_map
,
compute_map
):
super
(
GpuDnnPool
,
self
)
.
prepare_node
(
node
,
storage_map
,
compute_map
)
if
len
(
node
.
inputs
)
==
2
:
warnings
.
warn
(
"Theano GPUDnnPoolGrad internal changed."
,
stacklevel
=
3
)
# Old interface
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论