Tiramisu Compiler
tiramisu Namespace Reference

Namespaces

 cuda_ast
 

Classes

class  buffer
 A class that represents buffers. More...
 
class  communicator
 
class  computation
 A class that represents computations. More...
 
class  constant
 A class that represents loop invariants. More...
 
class  expr
 A class to represent tiramisu expressions. More...
 
class  function
 A class to represent functions in Tiramisu. More...
 
class  generator
 A class for code generation. More...
 
class  global
 A class that holds all the global variables necessary for Tiramisu. More...
 
struct  HalideCodegenOutput
 
class  input
 
class  Input
 
struct  isl_ast_expr_deleter
 
struct  isl_ast_node_list_deleter
 
struct  isl_id_deleter
 
struct  isl_val_deleter
 
class  recv
 
class  send
 
class  send_recv
 
class  sync
 A class that represents a synchronization object. More...
 
class  utility
 A class containing utility functions. More...
 
class  var
 A class that represents constant variable references. More...
 
class  view
 
class  wait
 
struct  xfer
 
class  xfer_prop
 

Typedefs

typedef std::tuple< int, tiramisu::expr, tiramisu::expr, tiramisu::exprcollapse_group
 Loop level, loop start, loop end, number of elements to collapse. More...
 
typedef std::unique_ptr< isl_ast_expr, isl_ast_expr_deleterisl_ast_expr_ptr
 
typedef std::unique_ptr< isl_id, isl_id_deleterisl_id_ptr
 
typedef std::unique_ptr< isl_ast_node_list, isl_ast_node_list_deleterisl_ast_node_list_ptr
 
typedef std::unique_ptr< isl_val, isl_val_deleterisl_val_ptr
 
template<typename T >
using only_integral = typename std::enable_if< std::is_integral< T >::value, expr >::type
 

Enumerations

Functions

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)
 
computationget_computation_annotated_in_a_node (isl_ast_node *node)
 
std::string generate_new_computation_name ()
 
isl_map * isl_map_add_free_var (const std::string &free_var_name, isl_map *map, isl_ctx *ctx)
 
void split_string (std::string str, std::string delimiter, std::vector< std::string > &vector)
 
int loop_level_into_dynamic_dimension (int level)
 
int loop_level_into_static_dimension (int level)
 
void init (std::string name)
 Initialize the Tiramisu compiler and set Tiramisu options to default values. More...
 
void init ()
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void codegen (const std::vector< tiramisu::buffer * > &arguments, const std::string obj_filename, const bool gen_cuda_stmt=false)
 Generate code. More...
 
void halide_stmt_dump (Halide::Internal::Stmt s)
 
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::string generate_new_variable_name ()
 
std::string str_from_tiramisu_type_expr (tiramisu::expr_t type)
 
std::string str_tiramisu_type_op (tiramisu::op_t type)
 
std::string str_from_tiramisu_type_primitive (tiramisu::primitive_t type)
 
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. More...
 
template<typename cT >
expr value_cast (primitive_t tT, cT val)
 Takes in a primitive value val, and returns an expression of tiramisu type tT that represents val. More...
 
expr cast (primitive_t tT, const expr &e)
 Returns an expression that casts e to tT. More...
 
template<typename T >
only_integral< T > operator+ (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator+ (T val, const tiramisu::expr &e)
 
template<typename T >
only_integral< T > operator- (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator- (T val, const tiramisu::expr &e)
 
template<typename T >
only_integral< T > operator/ (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator/ (T val, const tiramisu::expr &e)
 
template<typename T >
only_integral< T > operator* (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator* (T val, const tiramisu::expr &e)
 
template<typename T >
only_integral< T > operator% (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator% (T val, const tiramisu::expr &e)
 
template<typename T >
only_integral< T > operator>> (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator>> (T val, const tiramisu::expr &e)
 
template<typename T >
only_integral< T > operator<< (const tiramisu::expr &e, T val)
 
template<typename T >
only_integral< T > operator<< (T val, const tiramisu::expr &e)
 
expr memcpy (const buffer &from, const buffer &to)
 
expr allocate (const buffer &b)
 
Halide::Type halide_type_from_tiramisu_type (tiramisu::primitive_t type)
 Convert a Tiramisu type into the equivalent Halide type (if it exists), otherwise show an error message (no automatic type conversion is performed). More...
 
tiramisu::primitive_t halide_type_to_tiramisu_type (Halide::Type type)
 Convert a Halide type into the equivalent Tiramisu type (if it exists), otherwise show an error message (no automatic type conversion is performed). More...
 

Typedef Documentation

Loop level, loop start, loop end, number of elements to collapse.

Definition at line 95 of file core.h.

typedef std::unique_ptr<isl_ast_expr, isl_ast_expr_deleter> tiramisu::isl_ast_expr_ptr

Definition at line 42 of file cuda_ast.h.

typedef std::unique_ptr<isl_ast_node_list, isl_ast_node_list_deleter> tiramisu::isl_ast_node_list_ptr

Definition at line 54 of file cuda_ast.h.

typedef std::unique_ptr<isl_id, isl_id_deleter> tiramisu::isl_id_ptr

Definition at line 48 of file cuda_ast.h.

typedef std::unique_ptr<isl_val, isl_val_deleter> tiramisu::isl_val_ptr

Definition at line 60 of file cuda_ast.h.

template<typename T >
using tiramisu::only_integral = typedef typename std::enable_if<std::is_integral<T>::value, expr>::type

Definition at line 41 of file expr.h.

Enumeration Type Documentation

Types of function arguments.

"a_" stands for argument.

Enumerator
a_input 
a_output 
a_temporary 

Definition at line 133 of file type.h.

The possible types of an expression.

"e_" stands for expression.

Enumerator
e_val 
e_var 
e_sync 
e_op 
e_none 

Definition at line 14 of file type.h.

Types of tiramisu operators.

If the expression is of type e_op then it should have an operator type. This is the operator type.

"o_" stands for operator.

Enumerator
o_minus 
o_floor 
o_sin 
o_cos 
o_tan 
o_asin 
o_acos 
o_atan 
o_sinh 
o_cosh 
o_tanh 
o_asinh 
o_acosh 
o_atanh 
o_abs 
o_sqrt 
o_expo 
o_log 
o_ceil 
o_round 
o_trunc 
o_allocate 
o_free 
o_cast 
o_address 
o_add 
o_sub 
o_mul 
o_div 
o_mod 
o_logical_and 
o_logical_or 
o_logical_not 
o_eq 
o_ne 
o_le 
o_lt 
o_ge 
o_gt 
o_max 
o_min 
o_right_shift 
o_left_shift 
o_memcpy 
o_select 
o_cond 
o_lerp 
o_call 
o_access 
o_address_of 
o_lin_index 
o_type 
o_dummy 
o_buffer 
o_none 

Definition at line 53 of file type.h.

tiramisu data types.

"p_" stands for primitive.

Enumerator
p_uint8 
p_uint16 
p_uint32 
p_uint64 
p_int8 
p_int16 
p_int32 
p_int64 
p_float32 
p_float64 
p_boolean 
p_async 
p_wait_ptr 
p_none 

Definition at line 27 of file type.h.

Enumerator
SYNC 
ASYNC 
BLOCK 
NONBLOCK 
MPI 
CUDA 
CPU2CPU 
CPU2GPU 
GPU2CPU 
GPU2GPU 

Definition at line 73 of file core.h.

Function Documentation

expr tiramisu::allocate ( const buffer b)

Referenced by operator<<().

expr tiramisu::cast ( primitive_t  tT,
const expr e 
)

Returns an expression that casts e to tT.

Referenced by value_cast().

void tiramisu::codegen ( const std::vector< tiramisu::buffer * > &  arguments,
const std::string  obj_filename,
const bool  gen_cuda_stmt = false 
)

Generate code.

This function generates the declared function and computations in an object file. obj_filename is the relative path of the object file to be generated. If gen_cuda_stmt is set to true, CUDA code is generated instead of code targeting CPU (i.e., instead of generating Halide IR then LLVM IR).

std::string tiramisu::generate_new_computation_name ( )
std::string tiramisu::generate_new_variable_name ( )
computation* tiramisu::get_computation_annotated_in_a_node ( isl_ast_node *  node)
Halide::Expr tiramisu::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.

Referenced by tiramisu::var::var().

HalideCodegenOutput tiramisu::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 
)
void tiramisu::halide_stmt_dump ( Halide::Internal::Stmt  s)
Halide::Type tiramisu::halide_type_from_tiramisu_type ( tiramisu::primitive_t  type)

Convert a Tiramisu type into the equivalent Halide type (if it exists), otherwise show an error message (no automatic type conversion is performed).

tiramisu::primitive_t tiramisu::halide_type_to_tiramisu_type ( Halide::Type  type)

Convert a Halide type into the equivalent Tiramisu type (if it exists), otherwise show an error message (no automatic type conversion is performed).

void tiramisu::init ( std::string  name)

Initialize the Tiramisu compiler and set Tiramisu options to default values.

fct_name is the name of the function to be generated by the Tiramisu compiler. This is the name that the user will call to execute the generated code.

void tiramisu::init ( )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

isl_map* tiramisu::isl_map_add_free_var ( const std::string &  free_var_name,
isl_map *  map,
isl_ctx *  ctx 
)
int tiramisu::loop_level_into_dynamic_dimension ( int  level)
int tiramisu::loop_level_into_static_dimension ( int  level)
Halide::Module tiramisu::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 
)
expr tiramisu::memcpy ( const buffer from,
const buffer to 
)

Referenced by operator<<().

template<typename T >
only_integral<T> tiramisu::operator% ( const tiramisu::expr e,
val 
)

Definition at line 1895 of file expr.h.

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator% ( val,
const tiramisu::expr e 
)

Definition at line 1901 of file expr.h.

template<typename T >
only_integral<T> tiramisu::operator* ( const tiramisu::expr e,
val 
)

Definition at line 1883 of file expr.h.

References tiramisu::expr::get_data_type(), and value_cast().

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator* ( val,
const tiramisu::expr e 
)

Definition at line 1889 of file expr.h.

References tiramisu::expr::get_data_type(), and value_cast().

template<typename T >
only_integral<T> tiramisu::operator+ ( const tiramisu::expr e,
val 
)

Definition at line 1847 of file expr.h.

References tiramisu::expr::get_data_type(), and value_cast().

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator+ ( val,
const tiramisu::expr e 
)

Definition at line 1853 of file expr.h.

References tiramisu::expr::get_data_type(), and value_cast().

template<typename T >
only_integral<T> tiramisu::operator- ( const tiramisu::expr e,
val 
)

Definition at line 1859 of file expr.h.

References tiramisu::expr::get_data_type(), and value_cast().

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator- ( val,
const tiramisu::expr e 
)

Definition at line 1865 of file expr.h.

References tiramisu::expr::get_data_type(), and value_cast().

template<typename T >
only_integral<T> tiramisu::operator/ ( const tiramisu::expr e,
val 
)

Definition at line 1871 of file expr.h.

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator/ ( val,
const tiramisu::expr e 
)

Definition at line 1877 of file expr.h.

template<typename T >
only_integral<T> tiramisu::operator<< ( const tiramisu::expr e,
val 
)

Definition at line 1919 of file expr.h.

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator<< ( val,
const tiramisu::expr e 
)

Definition at line 1925 of file expr.h.

References allocate(), and memcpy().

template<typename T >
only_integral<T> tiramisu::operator>> ( const tiramisu::expr e,
val 
)

Definition at line 1907 of file expr.h.

Referenced by tiramisu::expr::is_equal().

template<typename T >
only_integral<T> tiramisu::operator>> ( val,
const tiramisu::expr e 
)

Definition at line 1913 of file expr.h.

void tiramisu::split_string ( std::string  str,
std::string  delimiter,
std::vector< std::string > &  vector 
)
std::string tiramisu::str_from_tiramisu_type_expr ( tiramisu::expr_t  type)

Referenced by tiramisu::expr::dump().

std::string tiramisu::str_from_tiramisu_type_primitive ( tiramisu::primitive_t  type)

Referenced by tiramisu::expr::dump().

std::string tiramisu::str_tiramisu_type_op ( tiramisu::op_t  type)

Referenced by tiramisu::expr::dump().

template<typename cT >
expr tiramisu::value_cast ( primitive_t  tT,
cT  val 
)

Takes in a primitive value val, and returns an expression of tiramisu type tT that represents val.

Definition at line 1809 of file expr.h.

References cast(), p_float32, p_float64, p_int16, p_int32, p_int64, p_int8, p_uint16, p_uint32, p_uint64, and p_uint8.

Referenced by operator*(), operator+(), and operator-().