Class LowerImpl
Defined in File lower_impl.h
Class Documentation
-
class
cinn::lang::detail
::
LowerImpl
Public Functions
-
LowerImpl
(const std::string &fn_name, StageMap stages, const std::vector<Tensor> &tensor_args, const std::vector<Var> &scalar_args, const std::vector<Tensor> &temp_tensor_args = {}, const Target &target = common::DefaultHostTarget()) The
tensor_args
contains both input and output tensors.- Parameters
fn_name
: the name of the final output function.tensor_args
: the tensor arguments for the functionscalar_args
: the scalar arguments for the functiontemp_tensor_args
: the extra temporary tensor arguments
-
std::vector<ir::LoweredFunc>
operator()
()
-
const common::Graph *
comp_graph
() const Get the computational graph.
-
std::vector<ir::Argument>
GenerateFunctionArgumentList
(Expr fn_body) generate the argument list of the final output function. We put the scalar_args in front of tensor_args, e.g. get tensor_args{A,B}, scalar_args{m}, the final argument list is {m, A, B}, the input and output tensor can be mixed in the tensor_args, the kInput and kOutput token will deduce from their usage in the computation.
-
std::vector<ir::Argument>
GenFuncArgForSplitKernel
(Expr func_iterator, std::vector<ir::Tensor> temp_tensors)
-
std::vector<Expr>
GenerateFunctionBody
(const poly::Schedule *schedule) generate the body expression of the final output function.
-