Skip to content

Commit 8df9789

Browse files
committed
.wip
1 parent 453746f commit 8df9789

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

pytensor/scalar/basic.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,19 +1302,7 @@ def __hash__(self):
13021302
def __str__(self):
13031303
if hasattr(self, "name") and self.name:
13041304
return self.name
1305-
else:
1306-
param = [
1307-
(k, v)
1308-
for k, v in self.__dict__.items()
1309-
if k
1310-
not in ("name", "_op_use_c_code", "bool", "output_types_preference")
1311-
]
1312-
if param:
1313-
classname = self.__class__.__name__
1314-
args = ", ".join(f"{k}={v}" for k, v in param)
1315-
return f"{classname}{{{args}}}"
1316-
else:
1317-
return self.__class__.__name__
1305+
return self.__class__.__name__
13181306

13191307
def c_code_cache_version(self):
13201308
return (4,)

tests/scalar/test_loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def test_elemwise_inplace(mutate_arg_idx):
285285
[xv, yv],
286286
mode=get_default_mode().including("inplace"),
287287
)
288+
fn.dprint()
288289
elem_op = fn.maker.fgraph.outputs[0].owner.op
289290
assert isinstance(elem_op, Elemwise) and isinstance(elem_op.scalar_op, ScalarLoop)
290291
destroy_map = elem_op.destroy_map

tests/tensor/test_math_scipy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ def test_hyp2f1_grad_stan_cases(self):
994994
hyp2f1_out = pt.hyp2f1(a1, a2, b1, z)
995995
hyp2f1_grad = pt.grad(hyp2f1_out, [a1, a2, b1, z])
996996
f_grad = function([a1, a2, b1, z], hyp2f1_grad)
997+
f_grad.dprint(print_memory_map=True)
997998

998999
rtol = 1e-9 if config.floatX == "float64" else 2e-3
9991000
for (
@@ -1128,6 +1129,7 @@ def test_benchmark(self, case, wrt, benchmark):
11281129
hyp2f1_out = pt.hyp2f1(a1, a2, b1, z)
11291130
hyp2f1_grad = pt.grad(hyp2f1_out, wrt=a1 if wrt == "a" else [a1, a2, b1, z])
11301131
f_grad = function([a1, a2, b1, z], hyp2f1_grad)
1132+
f_grad.dprint(print_memory_map=True)
11311133

11321134
(test_a1, test_a2, test_b1, test_z, *expected_dds) = case
11331135

0 commit comments

Comments
 (0)