Internals
Contents
Index
Latte.Batch
Latte.JuliaTask
Latte.TaskSet
Latte.UpdateTask
Latte.add_forward_data_tasks
Latte.add_forward_julia_tasks
Latte.add_recv_expr
Latte.add_send_exprs
Latte.check_dimensions_fixed
Latte.check_one_to_one
Latte.gen_copy_block
Latte.gen_neuron_backward
Latte.gen_neuron_forward
Latte.generate_c_function
Latte.get_inner_loop_tiler
Latte.get_src_idx
Latte.get_tile_fusion_factor_backward
Latte.get_tile_fusion_factor_forward
Latte.get_tile_loops
Latte.init_backward
Latte.init_backward
Latte.init_backward
Latte.init_forward
Latte.init_forward
Latte.init_forward
Latte.inner_loop_tiler
Latte.is_tiled_loop
Latte.optimize
Latte.push_compute_tasks!
Latte.tile_size_inliner
Latte.unpack_tiled_loop
Latte.update_tile_var
Net
The Net
datastructure is the main container used by the Latte compiler and runtime. When constructing a Net
a user adds ensembles and applies connections between them. This implicitly constructs a task graph with connections as data dependencies and ensembles as groups of comptue tasks. The init(net::Net)
routine is the main entry point for the Latte compiler. Inside this function, the Latte compiler consumes the implicit task graph, synthesizes functions to compute various tasks and optimizes these functions.
{docs} init(net::Net) init_buffer(net::Net, name::Symbol, shape; func=zeros) set_buffer(net::Net, name::Symbol, arr::Array; _copy=true) set_buffer(net::Net, name::Symbol, arr::Array, t::Int) get_buffer(net::Net, ens::AbstractEnsemble, name::Symbol) rand_values(net::Net) clear_values(net::Net) clear_∇(net::Net)
Connections
#
Latte.check_one_to_one
— Method.
TODO: doc
#
Latte.check_dimensions_fixed
— Method.
TODO: doc
Synthesis and Optimization
#
Latte.add_send_exprs
— Method.
TODO: doc
#
Latte.add_recv_expr
— Method.
TODO: doc
#
Latte.init_forward
— Method.
TODO: doc
TODO: doc
TODO: doc
#
Latte.init_forward
— Method.
TODO: doc
#
Latte.init_forward
— Method.
TODO: doc
#
Latte.init_backward
— Method.
TODO: doc
TODO: doc
TODO: doc
#
Latte.init_backward
— Method.
TODO: doc
#
Latte.init_backward
— Method.
TODO: doc
#
Latte.add_forward_data_tasks
— Method.
TODO: doc
#
Latte.add_forward_julia_tasks
— Method.
TODO: doc
#
Latte.push_compute_tasks!
— Method.
nothing
#
Latte.generate_c_function
— Method.
TODO: doc
#
Latte.gen_neuron_backward
— Method.
TODO: doc
#
Latte.gen_neuron_forward
— Method.
nothing
#
Latte.gen_copy_block
— Method.
Synthesize a loopnest to copy value or ∇ to the appropriate buffer
#
Latte.get_src_idx
— Method.
Extract the final expression of the mapping function to be used as an indexing expression. Handles cases where the final expression can be a Tuple or a single value.
Params
mapping
– an ast for a mapping function
#
Latte.optimize
— Method.
Optimize a function fn
Params
args
– an ordered vector of arguments (buffers)tile_fusion_factors
– factors for tile fusions determined by connection structurefn
– the ast of the function to be optimized
#
Latte.unpack_tiled_loop
— Function.
Convert from an internal Latte tiled_loop to a normal Julia :for expression
#
Latte.is_tiled_loop
— Function.
Check if node
is an internal Latte tiled_loop
#
Latte.get_tile_fusion_factor_forward
— Function.
TODO: doc
#
Latte.get_tile_fusion_factor_backward
— Function.
TODO: doc
#
Latte.update_tile_var
— Function.
Replace indexing expressions with tile_var
with the proper tiled expression When inputs
are not copied, the neuron transformer appends :NOTILE to the index expression to force Latte not to tile the expression.
#
Latte.inner_loop_tiler
— Function.
TODO: doc
#
Latte.get_inner_loop_tiler
— Function.
TODO: doc
#
Latte.tile_size_inliner
— Function.
TODO: doc
#
Latte.get_tile_loops
— Function.
Tile loop variables use _tile_idx
loopvars.
Utility Datastructures
#
Latte.TaskSet
— Type.
A container for tasks for multiple Phase
s
Fields
- tasks – a dictionary containing a
Vector
of tasks for eachPhase
#
Latte.JuliaTask
— Type.
A task that calls func
with args...
#
Latte.UpdateTask
— Type.
A task that updates parameter param_id
#
Latte.Batch
— Type.
Used in neuron definitions to mark a field to be unique per batch item