SessionMemMgr - aka "Session Memory Manager" is responsible for allocating, managing, and deallocating memory used during SameDiff execution.
Object dependency tracker.
AbstractSession is a SameDiff graph execution class that inference and training it built upon It walks through the graph, dynamically executing operations that can be executed next, but (again, dynamically) only executing the subset of the graph that is actually required to get the requested outputs.
ExecStep represents a single execution step, for a single op (or variable/constant etc) at a specific frame/iteration
VarId: identifies the value of a variable in a specific frame and frame iteration
Note that frames can be nested - which generally represents nested loop situations.
A list of dependencies, used in
FrameIter: Identifies a frame + iteration (but not a specific op or variable).
Object dependency tracker, using object identity (not object equality) for the Ys (of type T)
InferenceSession: Performs inference (forward pass) on a SameDiff instance to get the outputs of the requested nodes.
TrainingSession extends InferenceSession, to add training-specific functionality:
- Application of regularization (L1, L2, weight decay etc)
- Inline updating of variables, using updater/optimizer (Adam, Nesterov, SGD, etc)
- Calculation of regularization scores (Score for L1, L2, etc)
ExecType: Execution type, as used in ExecStep
OP: Operation execution
VARIABLE: Variable "execution", mainly used to trigger ops that depend on the variable
CONSTANT: As per variable
PLACEHOLDER: As per variable
SWITCH_L and SWITCH_R: This is a bit of a hack to account for the fact that only one of the switch branches (left or right) will ever be available; without this, once the switch op is executed, we'll (incorrectly) conclude that *both* branches can be executed
EXEC_START: Start of execution
CONTROL_DEP: Control dependency for op.
Copyright © 2020. All rights reserved.