inducer / pytato

Lazily evaluated arrays in Python
Other
8 stars 16 forks source link

Implement fancy placeholder focused data-flow viz #439

Closed kaushikcfd closed 1 year ago

kaushikcfd commented 1 year ago
A = pt.make_placeholder("A", shape=(10, 4), dtype=np.float64)
x1 = pt.make_placeholder("x1", shape=4, dtype=np.float64)
x2 = pt.make_placeholder("x2", shape=4, dtype=np.float64)

y = A @ (2*x1 + 3*x2)

pt.show_fancy_placeholder_data_flow(y)

plots the graph:

kaushikcfd commented 1 year ago

Tried visualizing the wave operator from inducer/grudge. Looks like:

image

kaushikcfd commented 1 year ago

Thanks, I will fix these ASAP.

inducer commented 1 year ago

Thx!

inducer commented 1 year ago

Generalized the test a bit, added a graphviz dep. I think the arraycontext failure was down to flakiness, but I don't have time to dig right now. Filed as https://github.com/inducer/arraycontext/issues/233.