Skip to content

Commit 3f50866

Browse files
committed
Handle CUDA Graph node zero annotations
1 parent 4bfbdda commit 3f50866

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

test/test_perfetto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _duration_events(trace):
2121
def test_cuda_graph_annotations_become_contiguous_gpu_boxes():
2222
graph_id = 2
2323
annotations = {
24-
(graph_id << 32) | 1: [{"name": "attention"}],
24+
(graph_id << 32) | 0: [{"name": "attention"}],
2525
(graph_id << 32) | 2: [{"name": "attention"}],
2626
(graph_id << 32) | 3: [{"name": "loss"}],
2727
}
@@ -35,7 +35,7 @@ def test_cuda_graph_annotations_become_contiguous_gpu_boxes():
3535
"tid": 7,
3636
"ts": 10,
3737
"dur": 3,
38-
"args": {"graph id": graph_id, "graph node id": 1},
38+
"args": {"graph id": graph_id, "graph node id": 0},
3939
},
4040
{
4141
"ph": "X",

transformer_nuggets/utils/perfetto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def add_cuda_graph_annotation_boxes(
128128
args = event.get("args", {})
129129
graph_id = args.get("graph id")
130130
graph_node_id = args.get("graph node id")
131-
if graph_id is None or not graph_node_id:
131+
if graph_id is None or graph_node_id is None:
132132
continue
133133

134134
entries = None

0 commit comments

Comments
 (0)