We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01bd2dc commit ba5f3f1Copy full SHA for ba5f3f1
onnx_array_api/profiling.py
@@ -281,7 +281,12 @@ def align_text(text, size):
281
return text[:h] + "..." + text[-h + 1 :]
282
283
dicts = self.as_dict(filter_node=filter_node, sort_key=sort_key)
284
- max_nc = max(max(_["nc1"] for _ in dicts), max(_["nc2"] for _ in dicts))
+ set1 = [_["nc1"] for _ in dicts]
285
+ set2 = [_["nc1"] for _ in dicts]
286
+ if set1 or set2:
287
+ max_nc = max([*set1, *set2])
288
+ else:
289
+ max_nc = 1
290
dg = int(math.log(max_nc) / math.log(10) + 1.5)
291
line_format = (
292
"{indent}{fct} -- {nc1: %dd} {nc2: %dd} -- {tin:1.5f} {tall:1.5f}"
0 commit comments