Skip to content

Commit 5f84027

Browse files
lucianopazricardoV94
authored andcommitted
Make test_debugprint robust to environments without blas__ldflags
1 parent 90d8b9f commit 5f84027

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

tests/test_printing.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -272,29 +272,32 @@ def test_debugprint():
272272
print_view_map=True,
273273
)
274274
s = s.getvalue()
275+
Gemv_op_name = "CGemv" if pytensor.config.blas__ldflags else "Gemv"
275276
exp_res = dedent(
276277
r"""
277278
Composite{(i2 + (i0 - i1))} 4
278-
├─ ExpandDims{axis=0} v={0: [0]} 3
279-
│ └─ CGemv{inplace} d={0: [0]} 2
280-
│ ├─ AllocEmpty{dtype='float64'} 1
281-
│ │ └─ Shape_i{0} 0
282-
│ │ └─ B
283-
│ ├─ 1.0
284-
│ ├─ B
285-
│ ├─ <Vector(float64, shape=(?,))>
286-
│ └─ 0.0
287-
├─ D
288-
└─ A
279+
├─ ExpandDims{axis=0} v={0: [0]} 3
280+
"""
281+
f" │ └─ {Gemv_op_name}{{inplace}} d={{0: [0]}} 2"
282+
r"""
283+
│ ├─ AllocEmpty{dtype='float64'} 1
284+
│ │ └─ Shape_i{0} 0
285+
│ │ └─ B
286+
│ ├─ 1.0
287+
│ ├─ B
288+
│ ├─ <Vector(float64, shape=(?,))>
289+
│ └─ 0.0
290+
├─ D
291+
└─ A
289292
290293
Inner graphs:
291294
292295
Composite{(i2 + (i0 - i1))}
293-
← add 'o0'
296+
← add 'o0'
294297
├─ i2
295298
└─ sub
296-
├─ i0
297-
└─ i1
299+
├─ i0
300+
└─ i1
298301
"""
299302
).lstrip()
300303

0 commit comments

Comments
 (0)