Skip to content

Commit 29c52b5

Browse files
authored
Add Group-Based Partitioner and Related Tests to Buck Targets (#12775)
Summary: Added group based partitioner and tests to bucks targets for build. Differential Revision: D78842785
1 parent 154994c commit 29c52b5

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

exir/backend/canonical_partitioners/TARGETS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,20 @@ runtime.python_library(
5454
"//executorch/exir/backend:partitioner",
5555
],
5656
)
57+
58+
runtime.python_library(
59+
name = "group_partitioner_lib",
60+
srcs = [
61+
"group_partitioner.py",
62+
],
63+
visibility = [
64+
"//executorch/...",
65+
"//executorch/exir/backend/...",
66+
"//executorch/test/...",
67+
"@EXECUTORCH_CLIENTS",
68+
],
69+
deps = [
70+
"//caffe2:torch",
71+
"//executorch/exir/backend:partitioner",
72+
],
73+
)

exir/backend/test/TARGETS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,14 @@ python_unittest(
447447
"//executorch/extension/pybindings:portable_lib", # @manual
448448
],
449449
)
450+
451+
python_unittest(
452+
name = "test_group_partitioner",
453+
srcs = [
454+
"test_group_partitioner.py",
455+
],
456+
deps = [
457+
"//caffe2:torch",
458+
"//executorch/exir/backend/canonical_partitioners:group_partitioner_lib",
459+
],
460+
)

exir/backend/test/test_group_partitioner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
from typing import List
99

1010
import torch
11-
from exir.backend.canonical_partitioners.group_partitioner import GroupBasedPartitioner
11+
from executorch.exir.backend.canonical_partitioners.group_partitioner import (
12+
GroupBasedPartitioner,
13+
)
1214

1315
from torch.fx.passes.infra.partitioner import CapabilityBasedPartitioner
1416
from torch.fx.passes.operator_support import OperatorSupportBase

0 commit comments

Comments
 (0)