Halide 22.0.0 Halide compiler and libraries

RealizationOrder.h
Go to the documentation of this file.
1#ifndef HALIDE_INTERNAL_REALIZATION_ORDER_H
2#define HALIDE_INTERNAL_REALIZATION_ORDER_H
3
4/** \file
5 *
6 * Defines the lowering pass that determines the order in which
7 * realizations are injected and groups functions with fused
8 * computation loops.
9 */
10
11#include <map>
12#include <string>
13#include <vector>
14
15namespace Halide {
16namespace Internal {
17
18class Function;
19
20/** Given a bunch of functions that call each other, determine an
21 * order in which to do the scheduling. This in turn influences the
22 * order in which stages are computed when there's no strict
23 * dependency between them. Currently just some arbitrary depth-first
24 * traversal of the call graph. In addition, determine grouping of functions
25 * with fused computation loops. The functions within the fused groups
26 * are sorted based on realization order. There should not be any dependencies
27 * among functions within a fused group. This pass will also populate the
28 * 'fused_pairs' list in the function's schedule. Return a pair of
29 * the realization order and the fused groups in that order.
30 */
31std::pair<std::vector<std::string>, std::vector<std::vector<std::string>>> realization_order(
32 const std::vector<Function> &outputs, std::map<std::string, Function> &env);
33
34/** Given a bunch of functions that call each other, determine a
35 * topological order which stays constant regardless of the schedule.
36 * This ordering adheres to the producer-consumer dependencies, i.e. producer
37 * will come before its consumers in that order */
38std::vector<std::string> topological_order(
39 const std::vector<Function> &outputs, const std::map<std::string, Function> &env);
40
41} // namespace Internal
42} // namespace Halide
43
44#endif
Halide::Internal::ArgInfoKind::Function
@ Function
Halide::Internal::topological_order
std::vector< std::string > topological_order(const std::vector< Function > &outputs, const std::map< std::string, Function > &env)
Given a bunch of functions that call each other, determine a topological order which stays constant r...
Halide::Internal::realization_order
std::pair< std::vector< std::string >, std::vector< std::vector< std::string > > > realization_order(const std::vector< Function > &outputs, std::map< std::string, Function > &env)
Given a bunch of functions that call each other, determine an order in which to do the scheduling.
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.