Skip to content

Commit

Permalink
minor fix: alloc plan vizualization
Browse files Browse the repository at this point in the history
  • Loading branch information
dboyliao committed Nov 25, 2020
1 parent c345e20 commit ce14b06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utensor_cgen/ir/misc/graph_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import matplotlib.pyplot as plt
from graphviz import Digraph
from matplotlib import cm as _cm

from utensor_cgen.logger import logger

plt.style.use('ggplot')
Expand Down Expand Up @@ -102,7 +103,7 @@ def _draw_figs(cls, topo_tensors, alloc_plan, cmap, figsize, fontsize, lw, split
xmins = [alloc_plan.plan[tensor_name].offset_start for tensor_name in topo_tensors]
xmaxs = [alloc_plan.plan[tensor_name].offset_end for tensor_name in topo_tensors]
colors = [cmap(random()) for _ in alloc_plan.plan]
labels = topo_tensors[:]
labels = [t.name for t in topo_tensors]
sizes = [alloc_plan.plan[tensor_name].size for tensor_name in topo_tensors]
if split_on_large_graph:
xmin_chunks = [xmins[i:i+num_tensors_per_split] for i in range(0, len(xmins), num_tensors_per_split)]
Expand Down

0 comments on commit ce14b06

Please sign in to comment.