Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5c9ae8ae
提交
5c9ae8ae
authored
4月 29, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Flake8 for gpuarray/opt.py
上级
8d0b398d
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
4 行增加
和
11 行删除
+4
-11
opt.py
theano/sandbox/gpuarray/opt.py
+4
-10
test_flake8.py
theano/tests/test_flake8.py
+0
-1
没有找到文件。
theano/sandbox/gpuarray/opt.py
浏览文件 @
5c9ae8ae
...
@@ -10,9 +10,7 @@ except ImportError:
...
@@ -10,9 +10,7 @@ except ImportError:
from
theano
import
tensor
,
scalar
,
gof
from
theano
import
tensor
,
scalar
,
gof
from
theano.compile
import
optdb
from
theano.compile
import
optdb
from
theano.gof
import
(
local_optimizer
,
EquilibriumDB
,
from
theano.gof
import
(
local_optimizer
,
EquilibriumDB
,
SequenceDB
,
ProxyDB
,
SequenceDB
,
Optimizer
,
toolbox
)
Optimizer
,
toolbox
,
InconsistencyError
,
EquilibriumOptimizer
)
from
theano.scan_module
import
scan_utils
,
scan_op
,
scan_opt
from
theano.scan_module
import
scan_utils
,
scan_op
,
scan_opt
...
@@ -28,10 +26,8 @@ from .conv import GpuConv
...
@@ -28,10 +26,8 @@ from .conv import GpuConv
from
.nnet
import
(
GpuCrossentropySoftmaxArgmax1HotWithBias
,
from
.nnet
import
(
GpuCrossentropySoftmaxArgmax1HotWithBias
,
GpuCrossentropySoftmax1HotWithBiasDx
,
GpuCrossentropySoftmax1HotWithBiasDx
,
GpuSoftmaxWithBias
,
GpuSoftmax
)
GpuSoftmaxWithBias
,
GpuSoftmax
)
from
.elemwise
import
(
GpuElemwise
,
_is_scalar
,
from
.elemwise
import
(
GpuElemwise
,
GpuDimShuffle
,
GpuCAReduceCuda
,
GpuDimShuffle
,
GpuCAReduceCuda
,
GpuCAReduceCPY
)
GpuCAReduceCPY
)
from
.
import
fp16_help
from
.subtensor
import
(
GpuIncSubtensor
,
GpuSubtensor
,
from
.subtensor
import
(
GpuIncSubtensor
,
GpuSubtensor
,
GpuAdvancedIncSubtensor1
,
GpuAdvancedIncSubtensor1
,
GpuAdvancedIncSubtensor1_dev20
)
GpuAdvancedIncSubtensor1_dev20
)
...
@@ -135,7 +131,7 @@ class InputToGpuOptimizer(Optimizer):
...
@@ -135,7 +131,7 @@ class InputToGpuOptimizer(Optimizer):
new_input
=
host_from_gpu
(
gpu_from_host
(
input
))
new_input
=
host_from_gpu
(
gpu_from_host
(
input
))
fgraph
.
replace_validate
(
input
,
new_input
,
fgraph
.
replace_validate
(
input
,
new_input
,
"InputToGpuOptimizer"
)
"InputToGpuOptimizer"
)
except
TypeError
as
e
:
except
TypeError
:
# This could fail if the inputs are not TensorTypes
# This could fail if the inputs are not TensorTypes
pass
pass
...
@@ -393,7 +389,6 @@ def local_gpua_advanced_incsubtensor(node):
...
@@ -393,7 +389,6 @@ def local_gpua_advanced_incsubtensor(node):
return
None
return
None
x
,
y
=
node
.
inputs
[
0
:
2
]
x
,
y
=
node
.
inputs
[
0
:
2
]
coords
=
node
.
inputs
[
2
:]
set_instead_of_inc
=
node
.
op
.
set_instead_of_inc
set_instead_of_inc
=
node
.
op
.
set_instead_of_inc
active_device_no
=
theano
.
sandbox
.
cuda
.
active_device_number
()
active_device_no
=
theano
.
sandbox
.
cuda
.
active_device_number
()
device_properties
=
theano
.
sandbox
.
cuda
.
device_properties
device_properties
=
theano
.
sandbox
.
cuda
.
device_properties
...
@@ -642,8 +637,7 @@ def local_gpu_elemwise_careduce(node):
...
@@ -642,8 +637,7 @@ def local_gpu_elemwise_careduce(node):
# automatically add more case, as some like trigonometic
# automatically add more case, as some like trigonometic
# operation with some reduction pattern will probably result
# operation with some reduction pattern will probably result
# to slow down.
# to slow down.
isinstance
(
node
.
inputs
[
0
]
.
owner
.
op
.
scalar_op
,
scalar
.
basic
.
Sqr
)
isinstance
(
node
.
inputs
[
0
]
.
owner
.
op
.
scalar_op
,
scalar
.
basic
.
Sqr
)):
):
op
=
node
.
op
op
=
node
.
op
inp
=
node
.
inputs
[
0
]
.
owner
.
inputs
[
0
]
inp
=
node
.
inputs
[
0
]
.
owner
.
inputs
[
0
]
return
[
GpuCAReduceCuda
(
scalar_op
=
op
.
scalar_op
,
return
[
GpuCAReduceCuda
(
scalar_op
=
op
.
scalar_op
,
...
...
theano/tests/test_flake8.py
浏览文件 @
5c9ae8ae
...
@@ -227,7 +227,6 @@ whitelist_flake8 = [
...
@@ -227,7 +227,6 @@ whitelist_flake8 = [
"sandbox/gpuarray/elemwise.py"
,
"sandbox/gpuarray/elemwise.py"
,
"sandbox/gpuarray/type.py"
,
"sandbox/gpuarray/type.py"
,
"sandbox/gpuarray/__init__.py"
,
"sandbox/gpuarray/__init__.py"
,
"sandbox/gpuarray/opt.py"
,
"sandbox/gpuarray/blas.py"
,
"sandbox/gpuarray/blas.py"
,
"sandbox/gpuarray/kernel_codegen.py"
,
"sandbox/gpuarray/kernel_codegen.py"
,
"sandbox/gpuarray/conv.py"
,
"sandbox/gpuarray/conv.py"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论