Internals
Contents
Index
Latte.BatchLatte.JuliaTaskLatte.TaskSetLatte.UpdateTaskLatte.add_forward_data_tasksLatte.add_forward_julia_tasksLatte.add_recv_exprLatte.add_send_exprsLatte.check_dimensions_fixedLatte.check_one_to_oneLatte.gen_copy_blockLatte.gen_neuron_backwardLatte.gen_neuron_forwardLatte.generate_c_functionLatte.get_inner_loop_tilerLatte.get_src_idxLatte.get_tile_fusion_factor_backwardLatte.get_tile_fusion_factor_forwardLatte.get_tile_loopsLatte.init_backwardLatte.init_backwardLatte.init_backwardLatte.init_forwardLatte.init_forwardLatte.init_forwardLatte.inner_loop_tilerLatte.is_tiled_loopLatte.optimizeLatte.push_compute_tasks!Latte.tile_size_inlinerLatte.unpack_tiled_loopLatte.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 Phases
Fields
- tasks – a dictionary containing a
Vectorof 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