MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __init__

Method __init__

imperative/python/megengine/utils/profile_analyzer.py:138–151  ·  view source on GitHub ↗
(self, time: float, info: dict, footprint: dict)

Source from the content-addressed store, hash-verified

136 ]
137
138 def __init__(self, time: float, info: dict, footprint: dict):
139 assert isinstance(footprint, dict)
140 self.time = time
141 self.info = collections.OrderedDict(copy.deepcopy(info))
142 self.computation = footprint["computation"] or NonExistNum()
143 self.memory = footprint["memory"]
144 self.in_shapes = footprint["in_shapes"]
145 self.in_layouts = footprint.get("in_layouts")
146 self.out_shapes = footprint["out_shapes"]
147 self.flops = self.computation / self.time
148 self.bandwidth = self.memory / self.time
149 self.opr_id = info.get("id")
150 if isinstance(self.opr_id, str) and self.opr_id != "N/A":
151 self.opr_id = int(self.opr_id)
152
153 def get_column_by_name(self, name: str = None):
154 r"""Extracts column value by its column name.

Callers

nothing calls this directly

Calls 2

NonExistNumClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected