|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.common.SimulatedAnnealing
at.dms.kjc.spacetime.AnnealedLayout
public class AnnealedLayout
This class calculates the assignment of filters of slices to tiles of the Raw chip by using simulated annealing. At each annealing step, it selects a random slice and finds a new random tile assignment for the filters of the slice. The cost function is still in development and is changing frequently. See the asplos submission for more details.
Field Summary |
---|
Fields inherited from class at.dms.kjc.common.SimulatedAnnealing |
---|
ANNEALITERATIONS, assignment, MAXTEMPITERATIONS, MINTEMPITERATIONS, TFACTR |
Constructor Summary | |
---|---|
AnnealedLayout(SpaceTimeSchedule spaceTime)
Create a new Annealed layout object that will assign filters of the slices of the slice graph of spaceTime to tiles of the Raw Chip. |
Method Summary | |
---|---|
void |
dumpLayout()
|
RawTile |
getComputeNode(SliceNode filter)
Get the raw tile that was assigned to filter in the layout. |
void |
initialize()
This method initalizes the simulated annealing algorithm. |
void |
initialPlacement()
Create the initial assignment of filters of slices to tiles. |
protected boolean |
keepNewEqualMin()
Decide if we should keep a configuration that has a cost that is EQUAL to the current minimum of the search. |
boolean |
otherSplitFiltersMapped(FilterSliceNode node,
ComputeNode tile)
Return true if other filters that this filter's upstream slice splits to are mapped to tile. |
double |
placementCost(boolean debug)
Return the cost function evaluated on the current assignment. |
void |
printLayoutStats()
Print some statistics to the screen for the layout. |
void |
run()
Calculate the assignment of filters of slices to tiles. |
void |
setAssignment(HashMap newAssignment)
Set the underlying assigment of FilterSliceNode's -> RawTiles to the newAssignment HashMap. |
void |
setComputeNode(SliceNode node,
RawTile tile)
Set the assignment of node to tile in the layout. |
static double |
standardDeviation(int[] vals)
Calculate the standard deviation of the values in vals. |
void |
swapAssignment()
This function will perturb the configuration by moving something around. |
void |
swapAssignmentLegal()
perturb the configuration by finding a new layout for a single slice. |
Methods inherited from class at.dms.kjc.common.SimulatedAnnealing |
---|
getRandom, setConstants, simAnnealAssign |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnealedLayout(SpaceTimeSchedule spaceTime)
spaceTime
- The spaceTime compilation up till now.Method Detail |
---|
public void run()
run
in interface Layout<RawTile>
public RawTile getComputeNode(SliceNode filter)
run()
first.
getComputeNode
in interface Layout<RawTile>
filter
- : the SliceNode
to look up.
ComputeNode
that should execute the SliceNode
.public void setAssignment(HashMap newAssignment)
setAssignment
in class SimulatedAnnealing
newAssignment
- The assignment to use.public void dumpLayout()
public void printLayoutStats()
printLayoutStats
in class SimulatedAnnealing
public void swapAssignment()
swapAssignment
in class SimulatedAnnealing
public void swapAssignmentLegal()
public void initialPlacement()
initialPlacement
in class SimulatedAnnealing
public void setComputeNode(SliceNode node, RawTile tile)
setComputeNode
in interface Layout<RawTile>
node
- The node that will be assigned to tile.tile
- The tile to assign node to.protected boolean keepNewEqualMin()
SimulatedAnnealing
keepNewEqualMin
in class SimulatedAnnealing
public double placementCost(boolean debug)
placementCost
in class SimulatedAnnealing
debug
- Might want to do some debugging...
public void initialize()
initialize
in class SimulatedAnnealing
public static double standardDeviation(int[] vals)
vals
- An array of ints.
vals.
public boolean otherSplitFiltersMapped(FilterSliceNode node, ComputeNode tile)
node
- tile
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |