tvm
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 
43 
50 
59 TVM_DLL void AutoInlineInjective(Schedule sch);
60 
68 
76 bool VerifyCompactBuffer(const Stmt& stmt);
77 
89 Stmt ScheduleOps(Schedule s, Map<IterVar, Range> dom_map, bool debug_keep_trivial_loop);
90 
108  Optional<Map<Tensor, Buffer>> bindings);
109 
110 } // namespace te
111 } // namespace tvm
112 #endif // TVM_TE_SCHEDULE_PASS_H_
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Map container of NodeRef->NodeRef in DSL graph. Map implements copy on write semantics,...
Definition: map.h:1271
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Global schedule container For operations and all the operations they depend on. The schedule per Oper...
Definition: schedule.h:326
Managed reference to PrimFuncNode.
Definition: function.h:145
Container of all statements.
Definition: stmt.h:59
void AutoInlineElemWise(Schedule sch)
To automatically inline the element-wise operations.
bool VerifyCompactBuffer(const Stmt &stmt)
Verify if there is any argument bound to compact buffer.
void AutoInlineBroarcast(Schedule sch)
To automatically inline the broadcast operations.
void AutoInlineInjective(Schedule sch)
To automatically inline operations with injective writes (i.e. writes without reduction or sequential...
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' dependent operations.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Define a schedule.
TIR Function.