forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcuda_partitioner.py
More file actions
25 lines (20 loc) · 847 Bytes
/
cuda_partitioner.py
File metadata and controls
25 lines (20 loc) · 847 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.cuda.cuda_backend import CudaBackend # usort: skip
from executorch.exir._warnings import experimental
from executorch.exir.backend.compile_spec_schema import CompileSpec
@final
@experimental(
"This API and all of cuda backend related functionality are experimental."
)
class CudaPartitioner(AotiPartitioner):
"""
CUDA partitioner driven by AOTInductor backend.
"""
def __init__(self, compile_spec: List[CompileSpec]) -> None:
super().__init__(CudaBackend.__name__, compile_spec)