1 #ifndef _H_TIRAMISU_CORE_     2 #define _H_TIRAMISU_CORE_     6 #include <isl/union_map.h>     7 #include <isl/union_set.h>     8 #include <isl/ast_build.h>     9 #include <isl/schedule.h>    10 #include <isl/schedule_node.h>    11 #include <isl/space.h>    12 #include <isl/constraint.h>    17 #include <unordered_map>    18 #include <unordered_set>    22 #include <tiramisu/debug.h>    36 class computation_tester;
    52                         const std::map<std::string, tiramisu::constant *> &constants,
    53                         const std::map<std::string, tiramisu::buffer *> &buffers)
    54         : computation_list(computations), constant_list(constants), output_buffers(buffers) {}
    58     Halide::Internal::Stmt s,
    59     const std::vector<Halide::Internal::Function> &outputs,
    60     const std::map<std::string, Halide::Internal::Function> &env,
    61     const std::map<std::string, std::vector<int32_t>> &output_buffers_size,
    69 void split_string(std::string str, std::string delimiter, std::vector<std::string> &vector);
    95 typedef std::tuple<int, tiramisu::expr, tiramisu::expr, tiramisu::expr> 
collapse_group;
   106 void init(std::string name);
   123 void codegen(
const std::vector<tiramisu::buffer *> &arguments, 
const std::string obj_filename, 
const bool gen_cuda_stmt = 
false);
   152     bool _needs_rank_call;
   163     std::vector<tiramisu::buffer *> function_arguments;
   170     std::vector<tiramisu::constant> invariants;
   192     std::vector<std::pair<std::string, int>> parallel_dimensions;
   203     std::vector<std::tuple<std::string, int, int>> vector_dimensions;
   214     std::vector<std::pair<std::string, int>> distributed_dimensions;
   230     std::vector<std::pair<std::string, std::tuple<int, int, int>>> gpu_block_dimensions;
   236     std::vector<std::pair<std::string, std::tuple<int, int, int>>> gpu_thread_dimensions;
   246     std::vector<std::pair<std::string, int>> unroll_dimensions;
   255     std::vector<computation *> body;
   262     Halide::Internal::Stmt halide_stmt;
   269     std::map<std::string, tiramisu::buffer *> buffers_list;
   276     isl_set *context_set;
   281     std::vector<std::string> iterator_names;
   286     std::unordered_map<isl_ast_node*, cuda_ast::kernel_ptr> iterator_to_kernel_map;
   288     std::shared_ptr<cuda_ast::compiler> nvcc_compiler;
   296     void add_parallel_dimension(std::string computation_name, 
int vec_dim);
   304     void add_vector_dimension(std::string computation_name, 
int vec_dim, 
int len);
   312     void add_distributed_dimension(std::string computation_name, 
int dim);
   320     void add_unroll_dimension(std::string stmt_name, 
int L);
   326     std::vector<tiramisu::computation *> get_live_in_computations();
   327     std::vector<tiramisu::computation *> get_live_out_computations();
   334                               std::unordered_set<tiramisu::computation *> &);
   340                                  std::unordered_set<tiramisu::computation *> &);
   346     int get_max_iteration_domains_dim() 
const;
   354     int get_max_schedules_range_dim() 
const;
   361     int get_max_identity_schedules_range_dim() 
const;
   375     isl_union_set *get_trimmed_time_processor_domain() 
const;
   385     isl_union_map *get_aligned_identity_schedules() 
const;
   396     void rename_computations();
   411     void add_buffer(std::pair<std::string, tiramisu::buffer *> buf);
   436     void add_gpu_block_dimensions(std::string stmt_name, 
int dim0, 
int dim1 = -1, 
int dim2 = -1);
   453     void add_gpu_thread_dimensions(std::string stmt_name, 
int dim0, 
int dim1 = -1, 
int dim2 = -1);
   463     void add_iterator_name(
const std::string &it_name);
   482     isl_union_map *compute_dep_graph();
   487     const std::vector<tiramisu::buffer *> &get_arguments() 
const;
   496     const std::map<std::string, tiramisu::buffer *> &get_buffers() 
const;
   505     const std::vector<computation *> &get_computations() 
const;
   511     std::vector<computation *> get_computation_by_name(std::string str) 
const;
   519     std::string get_gpu_block_iterator(
const std::string &comp, 
int lev0) 
const;
   527     std::string get_gpu_thread_iterator(
const std::string &comp, 
int lev0) 
const;
   536     isl_ctx *get_isl_ctx() 
const;
   545     Halide::Internal::Stmt get_halide_stmt() 
const;
   556     const std::vector<tiramisu::constant> &get_invariants() 
const;
   557     const std::vector<std::string> get_invariant_names() 
const;
   567     isl_ast_node *get_isl_ast() 
const;
   573     isl_union_set *get_iteration_domain() 
const;
   578     const std::vector<std::string> &get_iterator_names() 
const;
   583     const std::string &get_name() 
const;
   596     isl_set *get_program_context() 
const;
   602     isl_union_map *get_schedule() 
const;
   611     isl_union_map *get_trimmed_schedule() 
const;
   620     isl_union_set *get_time_processor_domain() 
const;
   626     int get_vector_length(
const std::string &comp, 
int lev) 
const;
   636     bool is_sched_graph_tree();
   645     void gen_ordering_schedules();
   664     std::unordered_map<tiramisu::computation *,
   671     void set_iterator_names(
const std::vector<std::string> &it_names);
   677     bool should_map_to_gpu_block(
const std::string &comp, 
int lev0) 
const;
   683     bool should_map_to_gpu_thread(
const std::string &comp, 
int lev0) 
const;
   689     bool should_parallelize(
const std::string &comp, 
int lev) 
const;
   695     bool should_unroll(
const std::string &comp, 
int lev) 
const;
   701     bool should_vectorize(
const std::string &comp, 
int lev) 
const;
   707     bool should_distribute(
const std::string &comp, 
int lev) 
const;
   712     bool needs_rank_call() 
const;
   717     void lift_mpi_comp(tiramisu::computation *comp);
   722     void lift_dist_comps();
   745     function(std::string name);
   766     void add_context_constraints(
const std::string &new_context);
   779     void align_schedules();
   792     void allocate_and_map_buffers_automatically();
   844     void compute_bounds();
   853     void dump(
bool exhaustive) 
const;
   860     void dump_dep_graph();
   867     void dump_halide_stmt() 
const;
   873     void dump_iteration_domain() 
const;
   881     void dump_schedule() 
const;
   889     void dump_sched_graph();
   898     void dump_time_processor_domain() 
const;
   911     void dump_trimmed_time_processor_domain() 
const;
   919     void gen_c_code() 
const;
   940     void gen_halide_obj(
const std::string &obj_file_name, Halide::Target::OS os,
   941                         Halide::Target::Arch arch, 
int bits) 
const;
   946     void gen_halide_obj(
const std::string &obj_file_name) 
const;
   951     void gen_halide_stmt();
   953     void gen_cuda_stmt();
   967     void gen_time_space_domain();
   978     void set_arguments(
const std::vector<tiramisu::buffer *> &buffer_vec);
   984     void codegen(
const std::vector<tiramisu::buffer *> &arguments, 
const std::string obj_filename, 
const bool gen_cuda_stmt = 
false);
   998     void set_context_set(
const std::string &context);
  1005     void set_context_set(isl_set *context);
  1052     std::vector<tiramisu::expr> dim_sizes;
  1092     bool get_auto_allocate();
  1097     void set_dim_size(
int dim, 
int size);
  1155     buffer(std::string name, std::vector<tiramisu::expr> dim_sizes,
  1227     void dump(
bool exhaustive) 
const;
  1246     const std::string &get_name() 
const;
  1251     int get_n_dims() 
const;
  1261     const std::vector<tiramisu::expr> &get_dim_sizes() 
const;
  1266     void set_auto_allocate(
bool auto_allocation);
  1272     bool has_constant_extents();
  1278     const bool is_allocated() 
const;
  1283     void mark_as_allocated();
  1286     void tag_gpu_global();
  1289     void tag_gpu_register();
  1291     void tag_gpu_shared();
  1293     void tag_gpu_local();
  1295     void tag_gpu_constant();
  1328     friend computation_tester;
  1352     std::vector<std::pair<std::string, tiramisu::expr>> associated_let_stmts;
  1374     int definitions_number;
  1389     int duplicate_number;
  1412     std::vector<isl_ast_expr *> index_expr;
  1427     std::map<std::string, isl_ast_expr *> iterators_map;
  1463     bool is_first_definition();
  1473     isl_set *iteration_domain;
  1509     bool schedule_this_computation;
  1516     Halide::Internal::Stmt stmt;
  1524     isl_set *time_processor_domain;
  1529     bool _is_nonblock_or_async;
  1534     bool _drop_rank_iter;
  1545     std::vector<tiramisu::expr> library_call_args;
  1552     int lhs_argument_idx;
  1553     int rhs_argument_idx;
  1560     int wait_argument_idx;
  1566     isl_map *wait_access_map = 
nullptr;
  1588     void apply_transformation_on_schedule_domain(std::string map_str);
  1598     void add_schedule_constraint(std::string domain_constraints, std::string range_constraints);
  1604     void assert_names_not_assigned(std::vector<std::string> dimensions);
  1611     bool buffer_already_allocated();
  1627     void check_dimensions_validity(std::vector<int> dimensions);
  1651     std::vector<isl_set *> compute_needed_and_produced(
computation &consumer, 
int L,
  1652                                                        std::vector<std::string> ¶m_names);
  1661     std::string construct_iteration_domain(std::string name, std::vector<var> iterator_variables);
  1672     void create_halide_assignment();
  1680     std::pair<expr, expr> create_tiramisu_assignment(std::vector<isl_ast_expr *> &index_expr);
  1698     void create_duplication_transformation(std::string map_str);
  1761              std::string range_constraints);
  1766     isl_map *get_access_relation() 
const;
  1775     isl_map *get_access_relation_adapted_to_time_processor_domain() 
const;
  1788     const std::vector<std::pair<std::string, tiramisu::expr>> &get_associated_let_stmts() 
const;
  1794     std::string get_dimension_name_for_loop_level(
int loop_level);
  1802     int get_duplicates_number() 
const;
  1820     Halide::Internal::Stmt get_generated_halide_stmt() 
const;
  1826     std::vector<isl_ast_expr *> &get_index_expr();
  1833     isl_set *get_iteration_domains_of_all_definitions();
  1849     std::map<std::string, isl_ast_expr *> get_iterators_map();
  1854     std::vector<std::string> get_iteration_domain_dimension_names();
  1860     int get_iteration_domain_dimensions_number();
  1866     std::vector<std::string> get_loop_level_names();
  1871     int get_loop_levels_number();
  1877     expr get_span(
int level);
  1894     int get_time_space_dimensions_number();
  1903     isl_map *get_trimmed_union_of_schedules() 
const;
  1911     isl_set *get_time_processor_domain() 
const;
  1925     isl_set *get_trimmed_time_processor_domain();
  1933     isl_map *gen_identity_schedule_for_iteration_domain();
  1941     isl_map *gen_identity_schedule_for_time_space_domain();
  1947     std::vector<computation*>& get_updates();
  1958     std::vector<int> get_loop_level_numbers_from_dimension_names(std::vector<std::string> dim_names);
  1966     bool has_accesses() 
const;
  1981     bool is_let_stmt() 
const;
  1987     bool is_library_call() 
const;
  1992     bool should_drop_rank_iter() 
const;
  1994     int get_level_to_drop();
  1999     void name_unnamed_iteration_domain_dimensions();
  2004     void name_unnamed_time_space_dimensions();
  2016     void set_identity_schedule_based_on_iteration_domain();
  2022     bool should_schedule_this_computation() 
const;
  2028     isl_set *intersect_set_with_context(isl_set *
set);
  2029     isl_map *intersect_map_domain_with_context(isl_map *map);
  2042     void rename_computation(std::string new_name);
  2081     void separate_at(
var level, std::vector<tiramisu::expr> _separate_points, 
tiramisu::expr _max);
  2096     bool separateAndSplit(
int L0, 
int sizeX);
  2116     void set_loop_level_names(std::vector<int> loop_levels, std::vector<std::string> names);
  2124     void set_loop_level_names(std::vector<std::string> names);
  2131     void set_schedule_domain_dim_names(std::vector<int> loop_levels, std::vector<std::string> names);
  2136     void set_iteration_domain(isl_set *domain);
  2145     void set_has_multiple_definitions(
bool val);
  2160     void set_iterators_map(std::map<std::string, isl_ast_expr *> map);
  2166     void shift(
int L0, 
int n);
  2173     isl_set *simplify(isl_set *
set);
  2174     isl_map *simplify(isl_map *map);
  2190     void tag_gpu_level(
int L0, 
int L1);
  2191     void tag_gpu_level(
int L0, 
int L1, 
int L2, 
int L3);
  2192     void tag_gpu_level(
int L0, 
int L1, 
int L2, 
int L3, 
int L4, 
int L5);
  2202     void tag_gpu_block_level(
int L0);
  2203     void tag_gpu_block_level(
int L0, 
int L1);
  2204     void tag_gpu_block_level(
int L0, 
int L1, 
int L2);
  2214     void tag_gpu_thread_level(
int L0);
  2215     void tag_gpu_thread_level(
int L0, 
int L1);
  2216     void tag_gpu_thread_level(
int L0, 
int L1, 
int L2);
  2223     std::vector<tiramisu::computation *> updates;
  2249     void update_names(std::vector<std::string> original_loop_level_names, std::vector<std::string> new_names,
  2250                       int start_erasing, 
int nb_loop_levels_to_erase);
  2259     std::vector<std::pair<int, std::string>> access_variables;
  2295     std::vector<tiramisu::expr>* compute_buffer_size();
  2300     isl_ctx *get_ctx() 
const;
  2312     const std::string get_unique_name() 
const;
  2334     bool has_multiple_definitions();
  2341     void init_computation(std::string iteration_space_str,
  2344                           bool schedule_this_computation,
  2350     void set_name(
const std::string &n);
  2473     void set_schedule(isl_map *map);
  2474     void set_schedule(std::string map_str);
  2480     void full_loop_level_collapse(
int level, 
tiramisu::expr collapse_from_iter);
  2679         this->data_type = t;
  2680         this->expression.
dtype = t;
  2689         this->data_type = t;
  2690         this->expression.
dtype = t;
  2693     virtual bool is_send() 
const;
  2695     virtual bool is_recv() 
const;
  2697     virtual bool is_send_recv() 
const;
  2699     virtual bool is_wait() 
const;
  2709     void add_associated_let_stmt(std::string access_name, 
tiramisu::expr e);
  2714     void unschedule_this_computation();
  2757     virtual void add_definitions(std::string iteration_domain_str, 
tiramisu::expr e,
  2946     void after_low_level(
computation &comp, 
int level);
  2947     void after_low_level(
computation &comp, std::vector<int> levels);
  2982     void apply_transformation_on_schedule(std::string map_str);
  3084      void store_in(
buffer *buff);
  3085      void store_in(
buffer *buff, std::vector<expr> iterators);
  3136     int compute_maximal_AST_depth();
  3142     void dump_iteration_domain() 
const;
  3153     void dump_schedule() 
const;
  3234         this->after(comp, lev);
  3245     void gen_time_space_domain();
  3250     void drop_rank_iter(
var level);
  3267     isl_set *get_iteration_domain() 
const;
  3283         return this->get_loop_level_numbers_from_dimension_names({dim_name})[0];
  3289     const std::string &get_name() 
const;
  3307     isl_map *get_schedule() 
const;
  3350     void interchange(
int L0, 
int L1);
  3355     void mark_as_let_statement();
  3360     void mark_as_library_call();
  3385      void set_access(std::string access_str);
  3386      void set_access(isl_map *access);
  3389     void set_wait_access(std::string access_str);
  3390     void set_wait_access(isl_map *access);
  3405      void set_inline(
bool is_inline = 
true);
  3410     const bool is_inline_computation() 
const;
  3532      void set_low_level_schedule(isl_map *map);
  3533      void set_low_level_schedule(std::string map_str);
  3612     void skew(
int i, 
int j, 
int factor);
  3617     void skew(
int i, 
int j, 
int k, 
int factor);
  3622     void skew(
int i, 
int j, 
int k, 
int l, 
int factor);
  3641     void split(
int L0, 
int sizeX);
  3685     void tag_parallel_level(
int L);
  3707     void tag_vector_level(
int L, 
int len);
  3714     void tag_distribute_level(
int L);
  3728     void tag_unroll_level(
int L);
  3764               int sizeX, 
int sizeY);
  3766               int sizeX, 
int sizeY,
  3770               int sizeX, 
int sizeY, 
int sizeZ);
  3772               int sizeX, 
int sizeY, 
int sizeZ,
  3786     void tile(
int L0, 
int L1, 
int sizeX, 
int sizeY);
  3787     void tile(
int L0, 
int L1, 
int L2, 
int sizeX, 
int sizeY, 
int sizeZ);
  3997     const static int root_dimension = -1;
  4008         std::vector<tiramisu::expr> access_expressions{std::forward<Args>(args)...};
  4009         if (access_expressions.size() != number_of_dims)
  4011         tiramisu::str_dump(
"Error - Incorrect access: " + this->get_name() + 
"(");
  4012         for (
int i = 0; i < access_expressions.size(); i++)
  4016         if (i != access_expressions.size() - 1)
  4017             tiramisu::str_dump(
", ");
  4019         tiramisu::str_dump(
").\n");
  4020         tiramisu::str_dump(
"The number of access dimensions does not match that used in the declaration of " + this->get_name() + 
".\n\n");
  4024         if (this->is_inline_computation()) {
  4025             std::vector<std::pair<var, expr>> substitutions;
  4026             for (
auto const &variable: this->access_variables) {
  4028                 substitutions.push_back(std::make_pair(
var(variable.second, 
false),
  4029                                                        access_expressions[variable.first]));
  4032             return this->expression.
substitute(substitutions);
  4037                                   this->get_data_type());
  4043     static xfer create_xfer(std::string send_iter_domain, std::string recv_iter_domain, 
tiramisu::expr send_dest,
  4096         this->data_type = t;
  4097         this->expression.dtype = t;
  4104         input(generate_new_computation_name(), iterator_variables, t)
  4114     std::vector<var> iterator_variables;
  4116     for (
int s = 0; s < sizes.size(); s++)
  4119         iterator_variables.push_back(v);
  4122     return iterator_variables;
  4129     :
input(name, iterators_from_size_expressions(sizes), t)
  4268         return compute_with_computation;
  4279     void dump(
bool exhaustive) 
const;
  4312     static std::map<std::string, isl_ast_expr *>
  4318     static std::vector<tiramisu::computation *>
  4325     static std::vector<tiramisu::computation *> filter_computations_by_domain(std::vector<tiramisu::computation *> comp_vec,
  4326             isl_union_set *node_domain);
  4336                           std::vector<isl_map *> &accesses, 
bool return_buffer_accesses);
  4361     static isl_constraint *get_constraint_for_access(
int access_dimension,
  4363                                                      isl_map *access_relation,
  4364                                                      isl_constraint *cst,
  4383     static Halide::Internal::Stmt halide_stmt_from_isl_node(
const tiramisu::function &fct, isl_ast_node *node,
  4385                                                             std::vector<std::pair<std::string, std::string>> &tagged_stmts,
  4386                                                             bool is_a_child_block);
  4389     static Halide::Internal::Stmt make_halide_block(
const Halide::Internal::Stmt &first,
  4390             const Halide::Internal::Stmt &second);
  4392     static Halide::Internal::Stmt make_buffer_alloc(
buffer *b, 
const std::vector<Halide::Expr> &extents,
  4393                                                     Halide::Internal::Stmt &stmt);
  4394     static Halide::Internal::Stmt make_buffer_free(
buffer *b);
  4400             std::vector<isl_ast_expr *> &index_expr,
  4417     static Halide::Expr linearize_access(
int dims, 
const halide_dimension_t *shape, isl_ast_expr *index_expr);
  4418     static Halide::Expr linearize_access(
int dims, 
const halide_dimension_t *shape, std::vector<tiramisu::expr> index_expr);
  4419     static Halide::Expr linearize_access(
int dims, std::vector<Halide::Expr> &strides, std::vector<tiramisu::expr> index_expr);
  4420     static Halide::Expr linearize_access(
int dims, std::vector<Halide::Expr> &strides, isl_ast_expr *index_expr);
  4421     static tiramisu::expr linearize_access(
int dims, std::vector<tiramisu::expr> &strides, std::vector<tiramisu::expr> index_expr);
  4422     static tiramisu::expr linearize_access(
int dims, std::vector<tiramisu::expr> &strides, isl_ast_expr *index_expr);
  4429     static isl_ast_node *stmt_code_generator(isl_ast_node *node, isl_ast_build *build, 
void *user);
  4443                                             std::vector<isl_map *> &accesses,
  4444                                             bool return_buffer_accesses);
  4450     static void _update_producer_expr_name(
tiramisu::expr ¤t_exp, std::string name_to_replace,
  4451                                            std::string replace_with);
  4460                                           std::string replace_with);
  4480      static expr extract_bound_expression(isl_ast_node *ast, 
int dim, 
bool upper);
  4502     static tiramisu::expr get_bound(isl_set *
set, 
int dim, 
int upper);
  4514     static std::string get_parameters_list(isl_set *
set);
  4524     std::vector<tiramisu::xfer_attr> attrs;
  4541     static std::string attr_to_string(
xfer_attr attr);
  4545     int get_xfer_prop_id() 
const;
  4549     bool contains_attrs(std::vector<tiramisu::xfer_attr> attrs) 
const;
  4558     std::vector<tiramisu::expr> dims;
  4584     std::vector<communicator *> collapse(
int level, 
tiramisu::expr collapse_from_iter,
  4590     void collapse_many(std::vector<collapse_group> collapse_each);
  4599     recv *matching_recv = 
nullptr;
  4607     static int next_msg_tag;
  4612          xfer_prop prop, 
bool schedule_this_computation, std::vector<expr> dims,
  4615     virtual bool is_send() 
const override;
  4617     virtual void add_definitions(std::string iteration_domain_str, 
tiramisu::expr e,
  4643     send *matching_send = 
nullptr;
  4656     virtual bool is_recv() 
const override;
  4658     virtual void add_definitions(std::string iteration_domain_str, 
tiramisu::expr e,
  4687     virtual bool is_send_recv() 
const override;
  4703     virtual bool is_wait() 
const override;
  4705     virtual void add_definitions(std::string iteration_domain_str, 
tiramisu::expr e,
  4709     std::vector<tiramisu::computation *> get_op_to_wait_on() 
const;
  4718     const std::string &pipeline_name,
  4719     const Halide::Target &t,
  4720     const std::vector<Halide::Argument> &args,
  4721     const Halide::Internal::LoweredFunc::LinkageType linkage_type,
  4722     Halide::Internal::Stmt s);
 argument_t
Types of function arguments. 
 
static function * get_implicit_function()
Return the implicit function created during Tiramisu initialization. 
 
std::vector< tiramisu::computation * > automatically_allocated
Keeps track of allocation computations created using allocate_and_map_buffer_automatically() to sched...
 
A class that represents computations. 
 
Halide::Module lower_halide_pipeline(const std::string &pipeline_name, const Halide::Target &t, const std::vector< Halide::Argument > &args, const Halide::Internal::LoweredFunc::LinkageType linkage_type, Halide::Internal::Stmt s)
 
std::map< std::string, tiramisu::computation * > computation_list
 
primitive_t
tiramisu data types. 
 
tiramisu::primitive_t dtype
Data type. 
 
std::map< std::string, tiramisu::constant * > constant_list
 
int loop_level_into_static_dimension(int level)
 
void codegen(const std::vector< tiramisu::buffer * > &arguments, const std::string obj_filename, const bool gen_cuda_stmt=false)
Generate code. 
 
static std::set< int > xfer_prop_ids
 
Halide::Expr halide_expr_from_tiramisu_expr(const tiramisu::computation *comp, std::vector< isl_ast_expr * > &index_expr, const tiramisu::expr &tiramisu_expr)
Convert a Tiramisu expression into a Halide expression. 
 
isl_ast_expr * wait_index_expr
An index expression just for the request buffer. 
 
expr substitute(std::vector< std::pair< var, expr >> substitutions) const 
Returns a new expression where for every (var, sub) pair in substitutions, var in the original expres...
 
HalideCodegenOutput(const std::map< std::string, tiramisu::computation * > &computations, const std::map< std::string, tiramisu::constant * > &constants, const std::map< std::string, tiramisu::buffer * > &buffers)
 
void dump(bool exhaustive) const 
Dump the object on standard output (dump most of the fields of the expression class). 
 
view(std::string name, std::vector< var > iterator_variables, primitive_t t)
Constructor for a view. 
 
void init(std::string name)
Initialize the Tiramisu compiler and set Tiramisu options to default values. 
 
std::string library_call_name
If the computation represents a library call, this is the name of the function. 
 
A class that represents buffers. 
 
void fuse_after(tiramisu::var lev, computation &comp)
Fuse this computation with the computation passed as argument in the same loop. 
 
isl_map * isl_map_add_free_var(const std::string &free_var_name, isl_map *map, isl_ctx *ctx)
 
A class that represents a synchronization object. 
 
bool use_low_level_scheduling_commands
A boolean set to true if low level scheduling was used in the program. 
 
bool _is_library_call
True if this computation represents a library call. 
 
computation(std::string name, std::vector< var > iterator_variables, primitive_t t)
This is an overloaded member function, provided for convenience. It differs from the above function o...
 
int loop_level_into_dynamic_dimension(int level)
 
std::tuple< int, tiramisu::expr, tiramisu::expr, tiramisu::expr > collapse_group
Loop level, loop start, loop end, number of elements to collapse. 
 
A class to represent tiramisu expressions. 
 
A class to represent functions in Tiramisu. 
 
std::unordered_map< tiramisu::computation *, std::unordered_map< tiramisu::computation *, int > > sched_graph
Stores all high level scheduling instructions between computations; i.e. 
 
tiramisu::computation * get_computation_with_whom_this_is_computed()
Get the computation with whom this constant is computed. 
 
std::unordered_map< tiramisu::computation *, std::unordered_map< tiramisu::computation *, int > > sched_graph_reversed
Same as sched_graph, except in reverse order (from after to before). 
 
std::string generate_new_computation_name()
 
std::map< std::string, tiramisu::buffer * > output_buffers
 
A class that represents loop invariants. 
 
op_t
Types of tiramisu operators. 
 
computation(std::vector< var > iterator_variables, primitive_t t)
This is an overloaded member function, provided for convenience. It differs from the above function o...
 
const std::string & get_name() const 
Get the name of the ID or the variable represented by this expressions. 
 
void split_string(std::string str, std::string delimiter, std::vector< std::string > &vector)
 
int get_loop_level_number_from_dimension_name(std::string dim_name)
Search the time-space domain (the range of the schedule) and return the loop level number that corres...
 
HalideCodegenOutput halide_pipeline_to_tiramisu_function(Halide::Internal::Stmt s, const std::vector< Halide::Internal::Function > &outputs, const std::map< std::string, Halide::Internal::Function > &env, const std::map< std::string, std::vector< int32_t >> &output_buffers_size, tiramisu::function *func)
 
std::unordered_set< tiramisu::computation * > starting_computations
The set of all computations that have no computation scheduled before them. 
 
A class that represents constant variable references. 
 
tiramisu::expr operator()(Args...args)
Access operator: C0(i,j) represents an access to the element (i,j) of the computation C0...
 
A class containing utility functions. 
 
computation * get_computation_annotated_in_a_node(isl_ast_node *node)
 
void halide_stmt_dump(Halide::Internal::Stmt s)
 
static const var root
root_dimension is a number used to specify the dimension level known as root. 
 
A class for code generation.