Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Lower.h
Go to the documentation of this file.
1#ifndef HALIDE_INTERNAL_LOWER_H
2#define HALIDE_INTERNAL_LOWER_H
3
4/** \file
5 *
6 * Defines the function that generates a statement that computes a
7 * Halide function using its schedule.
8 */
9
10#include <string>
11#include <vector>
12
13#include "Argument.h"
14#include "Expr.h"
15#include "Module.h"
16
17namespace Halide {
18
19struct Target;
20
21namespace Internal {
22
23class Function;
24class IRMutator;
25
26/** Given a vector of scheduled halide functions, create a Module that
27 * evaluates it. Automatically pulls in all the functions f depends
28 * on. Some stages of lowering may be target-specific. The Module may
29 * contain submodules for computation offloaded to another execution
30 * engine or API as well as buffers that are used in the passed in
31 * Stmt. */
32Module lower(const std::vector<Function> &output_funcs,
33 const std::string &pipeline_name,
34 const Target &t,
35 const std::vector<Argument> &args,
36 LinkageType linkage_type,
37 const std::vector<Stmt> &requirements = std::vector<Stmt>(),
38 bool trace_pipeline = false,
39 const std::vector<IRMutator *> &custom_passes = std::vector<IRMutator *>());
40
41/** Given a halide function with a schedule, create a statement that
42 * evaluates it. Automatically pulls in all the functions f depends
43 * on. Some stages of lowering may be target-specific. Mostly used as
44 * a convenience function in tests that wish to assert some property
45 * of the lowered IR. */
46Stmt lower_main_stmt(const std::vector<Function> &output_funcs,
47 const std::string &pipeline_name,
48 const Target &t,
49 const std::vector<Stmt> &requirements = std::vector<Stmt>(),
50 bool trace_pipeline = false,
51 const std::vector<IRMutator *> &custom_passes = std::vector<IRMutator *>());
52
54
55} // namespace Internal
56} // namespace Halide
57
58#endif
Defines a type used for expressing the type signature of a generated halide pipeline.
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Defines Module, an IR container that fully describes a Halide program.
A halide module.
Definition Module.h:142
Module lower(const std::vector< Function > &output_funcs, const std::string &pipeline_name, const Target &t, const std::vector< Argument > &args, LinkageType linkage_type, const std::vector< Stmt > &requirements=std::vector< Stmt >(), bool trace_pipeline=false, const std::vector< IRMutator * > &custom_passes=std::vector< IRMutator * >())
Given a vector of scheduled halide functions, create a Module that evaluates it.
Stmt lower_main_stmt(const std::vector< Function > &output_funcs, const std::string &pipeline_name, const Target &t, const std::vector< Stmt > &requirements=std::vector< Stmt >(), bool trace_pipeline=false, const std::vector< IRMutator * > &custom_passes=std::vector< IRMutator * >())
Given a halide function with a schedule, create a statement that evaluates it.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
LinkageType
Type of linkage a function in a lowered Halide module can have.
Definition Module.h:52
@ Internal
Not visible externally, similar to 'static' linkage in C.
A reference-counted handle to a statement node.
Definition Expr.h:427
A struct representing a target machine and os to generate code for.
Definition Target.h:19