Skip to content

Commit 2627a62

Browse files
eigen-kfacebook-github-bot
authored andcommitted
Add dependency for RemoveCatFromSliceCopyPass. (#15312)
Summary: This diff moves RemoveCatFromSliceCopyPass after MovePermuteAfterConcat because the latter pass may introduce the new cat-slice pairs. With this diff in, the unwanted cat ops described in task, get optimized: {F1982857385} Reviewed By: hsharma35, DrJessop Differential Revision: D85087930
1 parent 7f68c4f commit 2627a62

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

backends/cadence/aot/TARGETS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ runtime.python_library(
268268
],
269269
typing = True,
270270
deps = [
271+
":ops_registrations",
271272
"//caffe2:torch",
272273
"//executorch/backends/cadence/aot:pass_utils",
273274
"//executorch/backends/cadence/aot:simplify_ops",

backends/cadence/aot/remove_ops.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
from dataclasses import dataclass, field
1212
from typing import cast, List, Optional, Sequence, Set, Type
1313

14+
# Import these for the cadence function signatures.
15+
import executorch.backends.cadence.aot.ops_registrations # noqa: F401
16+
1417
import torch
1518
import torch.fx
1619
from executorch.backends.cadence.aot.pass_utils import (

0 commit comments

Comments
 (0)