Skip to content

Commit 57601fd

Browse files
authored
fix: include graph outputs
1 parent f62df8c commit 57601fd

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

src/vgf_adapter_model_explorer/spirv/spirv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def build_function_graph(
7070
traversed_ops=traversed_ops,
7171
)
7272

73-
if "Tosa" not in operation.name:
73+
if "Tosa" not in operation.name and "GraphOutputs" not in operation.name:
7474
continue
7575

7676
function_graph.nodes.append(node)

src/vgf_adapter_model_explorer/tests/fixtures/mobilenet_v2/expected.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32129,6 +32129,39 @@
3212932129
"style": null,
3213032130
"config": null
3213132131
},
32132+
{
32133+
"id": "1583",
32134+
"label": "GraphOutputs",
32135+
"namespace": "graph_partition_0",
32136+
"subgraphIds": [],
32137+
"attrs": [
32138+
{
32139+
"key": "loc",
32140+
"value": "loc(\"-\":1589:5)"
32141+
}
32142+
],
32143+
"incomingEdges": [
32144+
{
32145+
"sourceNodeId": "1582",
32146+
"sourceNodeOutputId": "0",
32147+
"targetNodeInputId": "0"
32148+
}
32149+
],
32150+
"outputsMetadata": [],
32151+
"inputsMetadata": [
32152+
{
32153+
"id": "0",
32154+
"attrs": [
32155+
{
32156+
"key": "tensor_shape",
32157+
"value": "!spirv.arm.tensor<1x1001xi8>"
32158+
}
32159+
]
32160+
}
32161+
],
32162+
"style": null,
32163+
"config": null
32164+
},
3213232165
{
3213332166
"id": "mrt_115",
3213432167
"label": "VK_DESCRIPTOR_TYPE_TENSOR_ARM",
@@ -32178,7 +32211,7 @@
3217832211
"attrs": [],
3217932212
"incomingEdges": [
3218032213
{
32181-
"sourceNodeId": "1582",
32214+
"sourceNodeId": "1583",
3218232215
"sourceNodeOutputId": "0",
3218332216
"targetNodeInputId": "0"
3218432217
}

src/vgf_adapter_model_explorer/tests/fixtures/vww4/expected.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29998,6 +29998,39 @@
2999829998
"style": null,
2999929999
"config": null
3000030000
},
30001+
{
30002+
"id": "1523",
30003+
"label": "GraphOutputs",
30004+
"namespace": "graph_partition_0",
30005+
"subgraphIds": [],
30006+
"attrs": [
30007+
{
30008+
"key": "loc",
30009+
"value": "loc(\"-\":1529:5)"
30010+
}
30011+
],
30012+
"incomingEdges": [
30013+
{
30014+
"sourceNodeId": "1522",
30015+
"sourceNodeOutputId": "0",
30016+
"targetNodeInputId": "0"
30017+
}
30018+
],
30019+
"outputsMetadata": [],
30020+
"inputsMetadata": [
30021+
{
30022+
"id": "0",
30023+
"attrs": [
30024+
{
30025+
"key": "tensor_shape",
30026+
"value": "!spirv.arm.tensor<1x2xi8>"
30027+
}
30028+
]
30029+
}
30030+
],
30031+
"style": null,
30032+
"config": null
30033+
},
3000130034
{
3000230035
"id": "mrt_95",
3000330036
"label": "VK_DESCRIPTOR_TYPE_TENSOR_ARM",
@@ -30047,7 +30080,7 @@
3004730080
"attrs": [],
3004830081
"incomingEdges": [
3004930082
{
30050-
"sourceNodeId": "1522",
30083+
"sourceNodeId": "1523",
3005130084
"sourceNodeOutputId": "0",
3005230085
"targetNodeInputId": "0"
3005330086
}

0 commit comments

Comments
 (0)