Loading...
Searching...
No Matches
Lower.h
Go to the documentation of this file.
#ifndef HALIDE_INTERNAL_LOWER_H
#define HALIDE_INTERNAL_LOWER_H
/** \file
*
* Defines the function that generates a statement that computes a
* Halide function using its schedule.
*/
#include <string>
#include <vector>
#include "Argument.h"
#include "Expr.h"
#include "Module.h"
namespace Halide {
struct Target;
namespace Internal {
class Function;
class IRMutator;
/** Given a vector of scheduled halide functions, create a Module that
* evaluates it. Automatically pulls in all the functions f depends
* on. Some stages of lowering may be target-specific. The Module may
* contain submodules for computation offloaded to another execution
* engine or API as well as buffers that are used in the passed in
* Stmt. */
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 halide function with a schedule, create a statement that
* evaluates it. Automatically pulls in all the functions f depends
* on. Some stages of lowering may be target-specific. Mostly used as
* a convenience function in tests that wish to assert some property
* of the lowered IR. */
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 *>());
void lower_test();
} // namespace Internal
} // namespace Halide
#endif
Argument.h
Defines a type used for expressing the type signature of a generated halide pipeline.
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Module.h
Defines Module, an IR container that fully describes a Halide program.
Halide::Internal::Function
A reference-counted handle to Halide's internal representation of a function.
Definition Function.h:39
Halide::Internal::IRMutator
A base class for passes over the IR which modify it (e.g.
Definition IRMutator.h:26
Halide::Module
A halide module.
Definition Module.h:142
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::lower
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.
Halide::Internal::lower_test
void lower_test()
Halide::Internal::lower_main_stmt
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.
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::LinkageType
LinkageType
Type of linkage a function in a lowered Halide module can have.
Definition Module.h:52
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427
Halide::Target
A struct representing a target machine and os to generate code for.
Definition Target.h:19