Skip to content

Commit 632ed77

Browse files
author
George Bisbas
committed
advisor: Enhance docs
1 parent 0abf350 commit 632ed77

1 file changed

Lines changed: 47 additions & 22 deletions

File tree

benchmarks/user/advisor/README.md

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
Example runs:
1+
# Intel Advisor roofline profiling on Devito
22

3-
* `python3 run_advisor.py --name isotropic --path <path-to-devito>/examples/seismic/acoustic/acoustic_example.py`
4-
* `python3 run_advisor.py --name tti_so8 --path <path-to-devito>/examples/seismic/tti/tti_example.py --exec-args "-so 8"`
5-
* `python3 run_advisor.py --name iso_ac_so4 --path <path-to-devito>/benchmarks/user/benchmark.py --exec-args "run -P acoustic -so 4 --tn 200 -d 100 100 100"`
3+
This README aims to help users derive rooflines through using Devito with [Intel Advisor](https://www.intel.com/content/www/us/en/developer/tools/oneapi/advisor.html).
4+
We recommend going through tutorial [02_advisor_roofline.ipynb](https://github.com/devitocodes/devito/blob/master/examples/performance/02_advisor_roofline.ipynb) for a more detailed step-by-step guidance.
65

7-
After the run has finished you should be able to save a .json and plot the
8-
roofline with the results:
9-
* `python3 roofline.py --name Roofline --project <advisor-project-name>`
10-
11-
To create a read-only snapshot for use with Intel Advisor GUI, use:
12-
* `advixe-cl --snapshot --project-dir=<advisor-project-name> pack -- /<new-snapshot-name>`
13-
14-
Prerequisites:
6+
### Prerequisites:
157
* Support is guaranteed only for Intel oneAPI 2025; earlier versions may not work.
168
You may download Intel oneAPI [here](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?packages=oneapi-toolkit&oneapi-toolkit-os=linux&oneapi-lin=apt).
179

18-
* Add Advisor (advixe-cl) and compilers (icx) in the path. It should be along the lines of:
10+
* Add Advisor (advixe-cl) and compilers (icx) in the path. The right env variables should be sourced along the lines of (depending on your isntallation folder):
1911
```sh
2012
source /opt/intel/oneapi/advisor/latest/env/vars.sh
2113
source /opt/intel/oneapi/compiler/latest/env/vars.sh
2214
```
23-
depending on where you installed oneAPI
2415

2516
* In Linux systems you may need to enable system-wide profiling by setting:
2617

@@ -38,26 +29,60 @@ sudo apt-get install numactl
3829
pip install pandas matplotlib
3930
```
4031

41-
Limitations:
4232

43-
* Untested with more complicated examples.
33+
### Example runs:
34+
35+
```bash
36+
# The isotropic acoustic example
37+
python3 run_advisor.py --name isotropic --path <path-to-devito>/examples/seismic/acoustic/acoustic_example.py
38+
# The isotropic elastic example
39+
python3 run_advisor.py --name iso_elastic --path <path-to-devito>/examples/seismic/elastic/elastic_example.py --exec-args "-so 4"
40+
# The anisotropic acoustic (TTI) example
41+
python3 run_advisor.py --name tti_so8 --path <path-to-devito>/examples/seismic/tti/tti_example.py --exec-args "-so 8"
42+
```
43+
44+
After the run has finished you should be able to save a `.json` and plot the
45+
roofline with the results:
46+
```bash
47+
python3 roofline.py --name Roofline --project <advisor-project-name>
48+
```
49+
50+
To create a read-only snapshot for use with Intel Advisor GUI, use:
51+
```bash
52+
advixe-cl --snapshot --project-dir=<advisor-project-name> pack -- /<new-snapshot-name>
53+
```
54+
### Limitations:
55+
56+
* Not tested with all possible examples that Devito can support.
4457
* Running the `tripcounts` analysis is time-consuming, despite starting in paused
4558
mode. This analysis, together with the `survey` analysis, is necessary to
4659
generate a roofline. Both are run by `run_advisor.py`.
4760
* Requires Python3, untested in conda environments
4861
* Currently requires download of repository and running `pip install .`, the scripts
4962
are currently not included as a package with the user installation of Devito
5063

51-
TODO:
64+
### TODO:
5265

5366
* Give a name to the points in the roofline, otherwise it's challenging to
5467
relate loops (code sections) to data.
5568
* Emit a report summarizing the configuration used to run the analysis
5669
(threading, socket binding, ...).
5770

58-
Useful links:
71+
### Useful links:
72+
73+
* [ Intel® Advisor Performance Optimization Cookbook ](https://www.intel.com/content/www/us/en/docs/advisor/cookbook/2024-2/overview.html " Intel® Advisor Performance Optimization Cookbook ")
74+
75+
* [ Intel® Advisor User Guide ](https://www.intel.com/content/www/us/en/docs/advisor/cookbook/2024-2/overview.html " Intel® Advisor User Guide ")
76+
77+
* [ Roofline Resources for Intel® Advisor Users ](https://software.intel.com/content/www/us/en/develop/articles/advisor-roofline-resources.html " Roofline Resources for Intel® Advisor Users ")
78+
5979
* [ Memory-Level Roofline Analysis in Intel® Advisor ](https://software.intel.com/content/www/us/en/develop/articles/memory-level-roofline-model-with-advisor.html " Memory-Level Roofline Analysis in Intel® Advisor ")
60-
* [CPU / Memory Roofline Insights
61-
Perspective](https://software.intel.com/content/www/us/en/develop/documentation/advisor-user-guide/top/optimize-cpu-usage/cpu-roofline-perspective.html "CPU / Memory Roofline Insights
62-
Perspective")
63-
* [ Roofline Resources for Intel® Advisor Users ](https://software.intel.com/content/www/us/en/develop/articles/advisor-roofline-resources.html " Roofline Resources for Intel® Advisor Users ")
80+
81+
* [ Identify Bottlenecks Iteratively: Cache-Aware Roofline ](https://www.intel.com/content/www/us/en/docs/advisor/cookbook/2024-2/identify-bottlenecks-cache-aware-roofline.html " Identify Bottlenecks Iteratively: Cache-Aware Roofline ")
82+
83+
* [ Samuel Williams, Andrew Waterman, and David Patterson [2009]. Roofline: an insightful visual performance model for multicore architectures ](https://dl.acm.org/doi/10.1145/1498765.1498785 " Roofline: an insightful visual performance model for multicore architectures ")
84+
85+
* [ A. Ilic, F. Pratas and L. Sousa [2014]. Cache-aware Roofline model: Upgrading the loft ](https://ieeexplore.ieee.org/document/6506838 " Cache-aware Roofline model: Upgrading the loft ")
86+
87+
* [ Understanding the Roofline Model by Durganshu Mishra ](https://hackernoon.com/understanding-the-roofline-model " Understanding the Roofline Model ")
88+

0 commit comments

Comments
 (0)