|
| 1 | +# ---------------------------------------------------------------------- |
| 2 | +# |
| 3 | +# File: Deployer.py |
| 4 | +# |
| 5 | +# Last edited: 08.05.2025 |
| 6 | +# |
| 7 | +# Copyright (C) 2024, ETH Zurich and University of Bologna. |
| 8 | +# |
| 9 | +# Author: Run Wang, ETH Zurich |
| 10 | +# |
| 11 | +# ---------------------------------------------------------------------- |
| 12 | +# SPDX-License-Identifier: Apache-2.0 |
| 13 | +# |
| 14 | +# Licensed under the Apache License, Version 2.0 (the License); you may |
| 15 | +# not use this file except in compliance with the License. |
| 16 | +# You may obtain a copy of the License at |
| 17 | +# |
| 18 | +# www.apache.org/licenses/LICENSE-2.0 |
| 19 | +# |
| 20 | +# Unless required by applicable law or agreed to in writing, software |
| 21 | +# distributed under the License is distributed on an AS IS BASIS, WITHOUT |
| 22 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 23 | +# See the License for the specific language governing permissions and |
| 24 | +# limitations under the License. |
| 25 | + |
| 26 | +from typing import Callable, Dict, Type |
| 27 | + |
| 28 | +import onnx_graphsurgeon as gs |
| 29 | + |
| 30 | +from Deeploy.AbstractDataTypes import Pointer |
| 31 | +from Deeploy.DeeployTypes import DeploymentPlatform, TopologyOptimizer |
| 32 | +from Deeploy.Targets.PULPOpen.Deployer import PULPDeployer |
| 33 | + |
| 34 | + |
| 35 | +class RedmuleDeployer(PULPDeployer): |
| 36 | + |
| 37 | + def __init__(self, |
| 38 | + graph: gs.Graph, |
| 39 | + deploymentPlatform: DeploymentPlatform, |
| 40 | + inputTypes: Dict[str, Type[Pointer]], |
| 41 | + loweringOptimizer: TopologyOptimizer, |
| 42 | + scheduler: Callable = lambda graph: list(graph.nodes), |
| 43 | + name: str = 'DeeployNetwork', |
| 44 | + default_channels_first = False, |
| 45 | + deeployStateDir: str = "DeeployStateDir", |
| 46 | + inputOffsets = {}): |
| 47 | + super().__init__(graph, deploymentPlatform, inputTypes, loweringOptimizer, scheduler, name, |
| 48 | + default_channels_first, deeployStateDir, inputOffsets) |
0 commit comments