tvm
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
schedule_pass.h
Go to the documentation of this file.
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 
28 #ifndef TVM_TE_SCHEDULE_PASS_H_
29 #define TVM_TE_SCHEDULE_PASS_H_
30 
31 #include <tvm/te/schedule.h>
32 #include <tvm/tir/function.h>
33 
34 namespace tvm {
35 namespace te {
36 
42 void AutoInlineElemWise(Schedule sch);
43 
49 void AutoInlineBroarcast(Schedule sch);
50 
59 TVM_DLL void AutoInlineInjective(Schedule sch);
60 
67 Map<IterVar, Range> InferBound(const Schedule& sch);
68 
76 bool VerifyCompactBuffer(const Stmt& stmt);
77 
89 Stmt ScheduleOps(Schedule s, Map<IterVar, Range> dom_map, bool debug_keep_trivial_loop);
90 
107 PrimFunc SchedulePostProcToPrimFunc(Array<ObjectRef> arg_list, Stmt body,
108  Optional<Map<Tensor, Buffer>> bindings);
109 
110 } // namespace te
111 } // namespace tvm
112 #endif // TVM_TE_SCHEDULE_PASS_H_
bool VerifyCompactBuffer(const Stmt &stmt)
Verify if there is any argument bound to compact buffer.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
PrimFuncFrame PrimFunc()
The primitive function statement.
TIR Function.
PrimFunc SchedulePostProcToPrimFunc(Array< ObjectRef > arg_list, Stmt body, Optional< Map< Tensor, Buffer >> bindings)
Postprocessing the Stmt generated by ScheduleOps to create a PrimFunc that can then be used for furth...
Map< IterVar, Range > InferBound(const Schedule &sch)
Infer the bound of all iteration variables relates to the schedule.
Stmt ScheduleOps(Schedule s, Map< IterVar, Range > dom_map, bool debug_keep_trivial_loop)
Schedule s&#39; dependent operations.
void AutoInlineInjective(Schedule sch)
To automatically inline operations with injective writes (i.e. writes without reduction or sequential...
void AutoInlineElemWise(Schedule sch)
To automatically inline the element-wise operations.
Define a schedule.
void AutoInlineBroarcast(Schedule sch)
To automatically inline the broadcast operations.