|
This page contains some advanced guidelines for adding new functionality to the SDK4ED Energy Toolbox
|
|
This page contains some advanced guidelines for adding new functionality to the SDK4ED Energy Toolbox. More specifically instructions for adding new embedded systems devices in the estimation models are provided.
|
|
|
|
|
|
**Guidelines for adding a new device in Energy Consumption Estimation (Static Analysis) component**
|
|
**Guidelines for adding a new device in Energy Consumption Estimation (Static Analysis) component**
|
|
|
|
|
... | @@ -40,3 +40,21 @@ The script sdk4edselector.py takes as input a set of source files from an applic |
... | @@ -40,3 +40,21 @@ The script sdk4edselector.py takes as input a set of source files from an applic |
|
For adding the new platform on the Front-end, the file EnergyDashPage.js contains the Energy toolbox page. The prediction results are shown in the static analysis panel and are taken from the json file sent by the back-end services. The user can choose a specific platform from a drop-down list to show the prediction results.
|
|
For adding the new platform on the Front-end, the file EnergyDashPage.js contains the Energy toolbox page. The prediction results are shown in the static analysis panel and are taken from the json file sent by the back-end services. The user can choose a specific platform from a drop-down list to show the prediction results.
|
|
|
|
|
|
- Step 3: There is a method named updateStaticData where given the name of the platform the prediction results for this platform are loaded into the page. If the user wants to show the results for an additional platform, an additional condition is needed to be added in the method that loads these results, including the name of the platform, which must be the same as it is defined in the back-end.
|
|
- Step 3: There is a method named updateStaticData where given the name of the platform the prediction results for this platform are loaded into the page. If the user wants to show the results for an additional platform, an additional condition is needed to be added in the method that loads these results, including the name of the platform, which must be the same as it is defined in the back-end.
|
|
|
|
|
|
|
|
**Guidelines for adding a new device in Acceleration component**
|
|
|
|
|
|
|
|
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 `
|
|
|
|
|
|
|
|
- Step 2: Compile the dataset in the new device:
|
|
|
|
`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`
|
|
|
|
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 |