forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetal_partitioner.py
More file actions
25 lines (20 loc) · 860 Bytes
/
metal_partitioner.py
File metadata and controls
25 lines (20 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from typing import final, List
from executorch.backends.aoti.aoti_partitioner import AotiPartitioner
from executorch.backends.apple.metal.metal_backend import MetalBackend # usort: skip
from executorch.exir._warnings import experimental
from executorch.exir.backend.compile_spec_schema import CompileSpec
@final
@experimental(
"This API and all of Metal backend related functionality are experimental."
)
class MetalPartitioner(AotiPartitioner):
"""
Metal partitioner driven by AOTInductor backend.
"""
def __init__(self, compile_spec: List[CompileSpec]) -> None:
super().__init__(MetalBackend.__name__, compile_spec)