MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / draw_engine

Function draw_engine

tools/experimental/trt-engine-explorer/utils/draw_engine.py:34–50  ·  view source on GitHub ↗
(engine_json_fname: str)

Source from the content-addressed store, hash-verified

32
33
34def draw_engine(engine_json_fname: str):
35 graphviz_is_installed = shutil.which("dot") is not None
36 if not graphviz_is_installed:
37 print("graphviz is required but it is not installed.\n")
38 print("To install on Ubuntu:")
39 print("sudo apt --yes install graphviz")
40 exit()
41
42 plan = EnginePlan(engine_json_fname)
43 formatter = layer_type_formatter
44 display_regions = True
45 expand_layer_details = False
46
47 graph = to_dot(plan, formatter,
48 display_regions=display_regions,
49 expand_layer_details=expand_layer_details)
50 render_dot(graph, engine_json_fname, 'svg')
51
52
53if __name__ == "__main__":

Callers 2

generate_engine_svgFunction · 0.90
draw_engine.pyFile · 0.85

Calls 4

printFunction · 0.85
EnginePlanClass · 0.85
to_dotFunction · 0.85
render_dotFunction · 0.85

Tested by

no test coverage detected