Skip to content

Commit d199188

Browse files
committed
Remove unnecessary test
1 parent acf8cb5 commit d199188

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tests/link/pytorch/test_blockwise.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,12 @@
33

44
import pytensor
55
import pytensor.tensor as pt
6-
from pytensor.graph.replace import vectorize_node
7-
from pytensor.tensor import tensor
8-
from pytensor.tensor.blockwise import Blockwise
9-
from pytensor.tensor.nlinalg import MatrixInverse
106
from pytensor.tensor.shape import specify_broadcastable
117

128

139
torch = pytest.importorskip("torch")
1410

1511

16-
def test_vectorize_blockwise():
17-
mat = tensor(shape=(None, None))
18-
tns = tensor(shape=(None, None, None))
19-
20-
# Something that falls back to Blockwise
21-
node = MatrixInverse()(mat).owner
22-
vect_node = vectorize_node(node, tns)
23-
assert isinstance(vect_node.op, Blockwise) and isinstance(
24-
vect_node.op.core_op, MatrixInverse
25-
)
26-
assert vect_node.op.signature == ("(m,m)->(m,m)")
27-
assert vect_node.inputs[0] is tns
28-
29-
# Useless blockwise
30-
tns4 = tensor(shape=(5, None, None, None))
31-
new_vect_node = vectorize_node(vect_node, tns4)
32-
assert new_vect_node.op is vect_node.op
33-
assert isinstance(new_vect_node.op, Blockwise) and isinstance(
34-
new_vect_node.op.core_op, MatrixInverse
35-
)
36-
assert new_vect_node.inputs[0] is tns4
37-
38-
3912
def test_blockwise_broadcast():
4013
_x = np.random.rand(5, 1, 2, 3)
4114
_y = np.random.rand(3, 3, 2)

0 commit comments

Comments
 (0)