... | ... | @@ -12,7 +12,7 @@ The script can make predictions for any platform by utilizing the python script |
|
|
|
|
|
The script energy_estimation.py can be executed as follows:
|
|
|
```
|
|
|
`python energy_estimation.py <fileout> <data1> <data2> <data3> <storefile>`
|
|
|
python energy_estimation.py <fileout> <data1> <data2> <data3> <storefile>
|
|
|
```
|
|
|
where <fileout> is a random file that contains some temporary data about the source files of the application (useful for debugging), <data1>,<data2> and <data3> are files that contain data collected from a specific platform and <storefile> the file where the results of the energy predictions are stored.
|
|
|
<data2> contains the execution time and energy_consumption of each program in the training set. The execution time and energy_consumption of a specific program differ across platforms so there are different <data2> files for making predictions for each platform. In order for the user to add a new platform, the execution time and the energy consumption of the programs of the training-set in the specific new platform must be computed and included in the <data2> file.
|
... | ... | @@ -46,15 +46,15 @@ For adding the new platform on the Front-end, the file EnergyDashPage.js contain |
|
|
The Acceleration sub-component calculates a number of Acceleration Specific indicators based on which, a classification model is used to estimate the potential Energy Consumption gains of using a specific acceleration unit. For deomnstration purposes Nvidia Jetson TX1, which incorporates a CPU-GPU SoC is already added. The step-by-step guidelines provided below show how to provide predictions for GPU architectures other than Tegra-X1. A prerequisite for being able to achieve this is again that the new device must include an integrated energy sensor:
|
|
|
|
|
|
- **Step 1:** Download the dataset benchmarks from the git repo in the new device/system that will be added to the Toolbox:
|
|
|
`git clone `
|
|
|
```git clone ```
|
|
|
|
|
|
- **Step 2:** Compile the dataset in the new device:
|
|
|
`make`
|
|
|
```make```
|
|
|
|
|
|
- **Step 3:** Run the dataset in the new device:
|
|
|
- **Step 3a:** The developer has to update the script `get-power.py` providing the files (/dev) that monitor the power sensors of the new device. For example, we provide also the `get-power-nano.sh` which is used for the Nvidia Jetson Nano, that also includes a Tegra X1 SoC with less GPU-cores. If needed (if the new device follows a completely different strategy on monitoring power the user can also make any additional changes needed on `measure_time_energy.sh`)
|
|
|
- **Step 3b:** Generate the dataset
|
|
|
`cd real-life-dataset && python generate_dataset_script.py energy`
|
|
|
```cd real-life-dataset && python generate_dataset_script.py energy```
|
|
|
Notes: The script `generate_dataset_script.py` runs all the benchmarks automatically. If the user wants to run a specific benchmark the `run_rataset.py` can be used `python run_dataset.py <app_hotspot_name> <energy|time>` The app_hotspot_name is retrieved from the config.txt, while the second argument is energy for measuring energy and time for measuring time.
|
|
|
|
|
|
- **Step 4:** Step 3 generates a file `final_dataset.csv`. This file has to be added in the toolbox backend and more precisely in the `src/predict_acceleration_class.py` file line 33. This procedure will replace Tegra X1. If the user needs to keep both accelerating devices, two `src/predict_acceleration_class.py` files can be added one for each device replacing the 'Acceleration' word in lines 93 and 95 with 'Acceleration on device name'. Then in `src/sdk4ed_energy.py` in lines 655 and 687 an additional call to the new predict_acceleration_class python file must be added. |
|
|
\ No newline at end of file |