-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5ff98c
commit 6b427c8
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Shmoo | ||
|
||
This scripts directory contains shmoo sweeps of energy estimates across different dimensions. | ||
|
||
Fundamentally, the energysim combines an operator with an execution model to model the | ||
energy consumption of the combination. These combinations can then be shmoo'ed across | ||
different dimensions, such as, algorithm/data structure size. | ||
|
||
Metrics of interest are: | ||
|
||
- energy per operator as a function of algorithm size | ||
- operator per Watt | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Sweep energies per operator as a function of operator size | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
|
||
from energysim.database.energy import EnergyDatabase | ||
from energysim.operator.matvec import flat_mv_spm | ||
|
||
|
||
def sweep_operator_size(sizes): | ||
energies = [] | ||
|
||
energydb = EnergyDatabase() | ||
for size in sizes: | ||
energy = flat_mv_spm(size, size, energydb) | ||
energies.append(energy.total*1e-9) | ||
|
||
data = {'Size': sizes, 'Energy (mJ)': energies} | ||
df = pd.DataFrame(data) | ||
return df | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
# create the sweep sizes | ||
sizes = [16, 32, 64, 128, 256, 512, 1024] | ||
df = sweep_operator_size(sizes) | ||
print(df) | ||
df.plot(x='Size', y='Energy (mJ)', title='Flat Matvec Energy (mJ)', kind='line') | ||
plt.show() | ||
|
||
|