1 | /* |
2 | * Licensed to the Apache Software Foundation (ASF) under one |
3 | * or more contributor license agreements. See the NOTICE file |
4 | * distributed with this work for additional information |
5 | * regarding copyright ownership. The ASF licenses this file |
6 | * to you under the Apache License, Version 2.0 (the |
7 | * "License"); you may not use this file except in compliance |
8 | * with the License. You may obtain a copy of the License at |
9 | * |
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
11 | * |
12 | * Unless required by applicable law or agreed to in writing, |
13 | * software distributed under the License is distributed on an |
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
15 | * KIND, either express or implied. See the License for the |
16 | * specific language governing permissions and limitations |
17 | * under the License. |
18 | */ |
19 | |
20 | /*! |
21 | * \file src/driver/driver_api.h |
22 | * \brief Internal compiler driver APIs to drive the compilation. |
23 | * |
24 | * This module provides functionality that may be called internally |
25 | * within TVM, but is not part of the public-facing API. |
26 | */ |
27 | #ifndef TVM_DRIVER_INTERNAL_DRIVER_API_H_ |
28 | #define TVM_DRIVER_INTERNAL_DRIVER_API_H_ |
29 | |
30 | #include <tvm/ir/module.h> |
31 | #include <tvm/target/target.h> |
32 | |
33 | namespace tvm { |
34 | |
35 | /*! |
36 | * \brief Build a device and host module for a specific target from a map |
37 | * contains target to IRModule. This function is used |
38 | * for heterogeneous build. |
39 | * \param input The map contains target to an IRModule. |
40 | * \param target_host The target for building host code. To use the default, |
41 | * pass Target(). |
42 | * \return The built module that contains code for different processors. |
43 | */ |
44 | runtime::Module TIRToRuntime(const Map<Target, IRModule>& input, const Target& target_host); |
45 | |
46 | } // namespace tvm |
47 | |
48 | #endif // TVM_DRIVER_INTERNAL_DRIVER_API_H_ |
49 | |