Skip to content

Commit ffbc853

Browse files
authored
Update CPU export manifest test for delegated max pooling (#24278)
Summary: Max pooling now lowers through the CPU XNNPACK provider, so the `Conv2d` → `MaxPool2d` → `Conv2d` model in `test_manifest_lists_nodes_from_every_cpu_delegate` partitions into one `CpuBackend` delegate instead of two. Update the expected delegate count and semantic node list, which now includes `aten_max_pool2d_with_indices_default` between the two convolutions. Authored with Claude Code. Differential Revision: D128166591
1 parent a12abb9 commit ffbc853

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎backends/cpu/test/test_export_torchvision.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ def test_manifest_lists_nodes_from_every_cpu_delegate(self) -> None:
123123
manifest = json.loads((path / "export.json").read_text())
124124

125125
self.assertEqual("capture", manifest["model"])
126-
self.assertEqual({"CpuBackend": 2}, manifest["delegates"])
126+
self.assertEqual({"CpuBackend": 1}, manifest["delegates"])
127127
self.assertEqual(
128-
["aten_convolution_default", "aten_convolution_default_1"],
128+
[
129+
"aten_convolution_default",
130+
"aten_max_pool2d_with_indices_default",
131+
"aten_convolution_default_1",
132+
],
129133
manifest["semantic_nodes"],
130134
)

0 commit comments

Comments
 (0)