-
Notifications
You must be signed in to change notification settings - Fork 26
The Spatial Use Case
This page explains how to run HyperMapper with the Spatial language (https://github.com/stanford-ppl/spatial-lang). Here Spatial is the program that calls HyperMapper. HyperMapper replies with the points that have to be run by Spatial. Both software are writing on stdio and stdout and following a precise protocol of communication, like explained here. This is what in HyperMapper terminology is called "interactive mode". The developer responsible for Spatial is David Koeplinger ([email protected]).
This page supposes that we are working on the Stanford machine "london" and using the login "lnardi".
Install Spatial and checkout the dse branch:
git clone https://github.com/stanford-ppl/spatial-lang.git
cd spatial-lang
git checkout dse
git submodule update --init
make apps
This runs Spatial on the benchmark BlackScholes, DotProduct and OuterProduct, using a heuristic based on pruning and random sampling design space exploration (DSE) which is the technique used to do DSE before HyperMapper. So this is the so called "previous approach". Previous approach runs 100000 random samples. The commands will generate 10 trials of data with timestamp, the pruning is counted in the timestamp calculation so the clock starts at the time Spatial starts the pruning.
./bin/spatial BlackScholes --experiment
./bin/spatial DotProduct --experiment
./bin/spatial OuterProduct --experiment
The data generated is in:
./results
Set HyperMapper environment variable and then run Spatial with HyperMapper:
export HYPERMAPPER_HOME=/home/lnardi/hypermapper
./bin/spatial DotProduct --hypermapper
This launches HyperMapper via the script hypermapper.py from $HYPERMAPPER/hypermapper.py.
For small Spatial benchmarks it is possible to generate the ground-truth exhaustive search.
./bin/spatial BlackScholes --bruteforce
./bin/spatial OuterProduct --bruteforce
./bin/spatial DotProduct --bruteforce
After running this commands a csv file for each benchmark is generated that will contain the exhaustive search. Now you can modify the json file to use the exhaustive mode like explained here.
App | Total Space | Pruned Space | Description |
---|---|---|---|
BlackScholes | 76,800 | 672 | Financial option pricing |
DotProduct | Dot product | ||
OuterProduct | 31068 | Outer product | |
GDA | 30,049,566,720 | 4,630,528 | Gaussian Discriminant Analysis |
MatMult_outer | 262,144,000 | 143,724 | GEMM |
Kmeans | 2,080,800 | 18,720 | k-means |
SW | 2,097,152 | 32,768 | Smith-Waterman DNA sequence alignment |
TPCHQ6 | 3,538,944,000 | 2,265,600 | Filter reduce database query |
Experiments on the Stanford machines.
Machine | Max ALMs | Type of machine |
---|---|---|
Tucson | 524800 | TBD |
London | 262400 | TBD |
Note on the name of the parameters and their meaning for the DotProduct benchmark:
Parameter name | What it is | In/Out | More explanation |
---|---|---|---|
B | tile-sizeX_DP | input | TBD |
x439 | meta-pipe_DP | input | TBD |
P1 | outer-par_DP | input | TBD |
P2 | inner-par_DP | input | TBD |
P3 | burst-par_DP | input | TBD |
DSPs | DSPs | output | TBD |
Valid | Valid | output | TBD |
ALMs | ALMs | output | TBD |
BRAM | BRAMs | output | TBD |
Cycles | Cycles | output | TBD |
Channels | Channels | output | TBD |
Reg | Regs | output | TBD |
Timestamp | Timestamp | output | TBD |
And for the BlackScholes benchmark:
Parameter name | What it is | In/Out | More explanation |
---|---|---|---|
B | tile-sizeX_BS | input | TBD |
OP | outer-par_BS | input | TBD |
IP | inner-par_BS | input | TBD |
x1873 | meta-pipe_BS | input | TBD |
DSPs | DSPs | output | TBD |
Valid | Valid | output | TBD |
ALMs | ALMs | output | TBD |
BRAM | BRAMs | output | TBD |
Cycles | Cycles | output | TBD |
Timestamp | Timestamp | output | TBD |