This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
00-theano-advancedinctensor.patch
60 lines (54 loc) · 2.63 KB
/
00-theano-advancedinctensor.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- theano/sandbox/cuda/opt.py 2017-03-21 18:45:53.532335945 +0100
+++ theano/sandbox/cuda/opt.py 2017-03-21 18:45:53.532335945 +0100
@@ -1111,7 +1111,7 @@
gpu_op = GpuAdvancedIncSubtensor1(**props_dict)
else:
- gpu_op = GpuAdvancedIncSubtensor1_dev20(**props_dict)
+ gpu_op = GpuAdvancedIncSubtensor1(**props_dict)
return [gpu_op(as_cuda_ndarray_variable(x),
as_cuda_ndarray_variable(y), *coords)]
@@ -1149,7 +1149,7 @@
if (compute_capability < 2 or y.ndim != 2 or x.ndim != 2):
gpu_op = GpuAdvancedIncSubtensor1(**node.op._props_dict())
else:
- gpu_op = GpuAdvancedIncSubtensor1_dev20(**node.op._props_dict())
+ gpu_op = GpuAdvancedIncSubtensor1(**node.op._props_dict())
return [host_from_gpu(gpu_op(gpu_x, gpu_y, *coords))]
return False
--- theano/gpuarray/opt.py 2017-03-21 18:42:35.589317691 +0100
+++ theano/gpuarray/opt.py 2017-03-21 18:42:35.589317691 +0100
@@ -68,8 +68,7 @@
from .subtensor import (GpuIncSubtensor, GpuSubtensor,
GpuAdvancedSubtensor,
GpuAdvancedSubtensor1,
- GpuAdvancedIncSubtensor1,
- GpuAdvancedIncSubtensor1_dev20)
+ GpuAdvancedIncSubtensor1)
from .opt_util import alpha_merge, output_merge, pad_dims, unpad_dims
from .reduction import GpuMaxAndArgmax
from .linalg import (GpuCusolverSolve, cusolver_available)
@@ -1056,7 +1055,7 @@
if compute_capability >= 2 and x.ndim == 1 and y.ndim == 0:
x = x.dimshuffle(0, 'x')
y = y.dimshuffle('x', 'x')
- ret = GpuAdvancedIncSubtensor1_dev20(
+ ret = GpuAdvancedIncSubtensor1(
set_instead_of_inc=set_instead_of_inc)(x, y, ilist)
ret = GpuDimShuffle(ret.type.broadcastable, [0])(ret)
return ret
@@ -1064,15 +1063,14 @@
return GpuAdvancedIncSubtensor1(
set_instead_of_inc=set_instead_of_inc)
else:
- return GpuAdvancedIncSubtensor1_dev20(
+ return GpuAdvancedIncSubtensor1(
set_instead_of_inc=set_instead_of_inc)
@register_inplace()
-@local_optimizer([GpuAdvancedIncSubtensor1, GpuAdvancedIncSubtensor1_dev20])
+@local_optimizer([GpuAdvancedIncSubtensor1])
def local_advincsub1_gpua_inplace(node):
- if isinstance(node.op, (GpuAdvancedIncSubtensor1,
- GpuAdvancedIncSubtensor1_dev20)):
+ if isinstance(node.op, (GpuAdvancedIncSubtensor1,)):
if not node.op.inplace:
return [node.op.clone_inplace()(*node.inputs)]