(self, time: float, info: dict, footprint: dict)
| 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. |
nothing calls this directly
no test coverage detected