Run DG-FEM benchmarks for different
arraycontext implementations. These
benchmarks generate arraycontext
-based Python code for the operators' RHS to
avoid time spent in the setup phases of the driver (mesh gen, computing
geometry factors, etc.) and evaluate the performance of the generated code.
$ # Install Mirge-Com
$ git clone https://github.com/illinois-ceesd/emirge
$ cd emirge; ./install.sh
$ cd ..; source emirge/miniforge/bin/activate ceesd
$ git clone https://github.com/kaushikcfd/dg_benchmarks
$ cd dg_benchmarks; pip install -e .
Supporting literal data is made available via pickled files. Run the following commands to get the pickle blobs for the current suite.
$ cd dg_benchmarks
$ python download_pickled_files.py
WARNING: The above command downloads pickled files approx. 800MB in size. To avoid network
traffic and for better security practices, see dg_benchmarks/suite_generators.py
to generate
them.
$ cd dg_benchmarks
$ python -O run.py --equations "wave,euler,cns_without_chem" \
--degrees "1,2,3,4" \
--dims "3" \
--actxs "pyopencl,jax:jit,pytato:batched_einsum"
GFLOPS/s for 3D-wave:
╒════╤══════════╤═════════╤═══════════════════════╤══════════╕
│ │ pyopencl │ jax:jit │ pytato:batched_einsum │ Roofline │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P1 │ 5.3 │ 33.1 │ 112.1 │ 441.1 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P2 │ 5.1 │ 86.7 │ 224.5 │ 707.9 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P3 │ 5.5 │ 193.8 │ 428.5 │ 1163.9 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P4 │ 4.2 │ 377.2 │ 645.9 │ 1874.8 │
╘════╧══════════╧═════════╧═══════════════════════╧══════════╛
GFLOPS/s for 3D-euler:
╒════╤══════════╤═════════╤═══════════════════════╤══════════╕
│ │ pyopencl │ jax:jit │ pytato:batched_einsum │ Roofline │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P1 │ 23.0 │ 44.9 │ 225.8 │ 770.0 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P2 │ 25.8 │ 81.1 │ 281.6 │ 971.7 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P3 │ 31.7 │ 136.0 │ 355.9 │ 1326.4 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P4 │ 40.9 │ 217.7 │ 485.8 │ 1897.8 │
╘════╧══════════╧═════════╧═══════════════════════╧══════════╛
GFLOPS/s for 3D-cns_without_chem:
╒════╤══════════╤═════════╤═══════════════════════╤══════════╕
│ │ pyopencl │ jax:jit │ pytato:batched_einsum │ Roofline │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P1 │ 8.2 │ 35.1 │ 147.8 │ 510.3 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P2 │ 7.7 │ 80.5 │ 282.2 │ 722.0 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P3 │ 7.8 │ 160.6 │ 373.1 │ 1087.5 │
├────┼──────────┼─────────┼───────────────────────┼──────────┤
│ P4 │ 5.6 │ 283.3 │ 466.4 │ 1650.2 │
╘════╧══════════╧═════════╧═══════════════════════╧══════════╛
Update run.py
to include your arraycontext type. We are happy to accept PRs
for your arraycontext
type.
Implement the new operators in dg_benchmarks/suite/
, invoke
$ python -m suite_generators -h
usage: python -m suite_generators [-h] --equations E --dims D --degrees G
Generate DG-FEM benchmarks suite
optional arguments:
-h, --help show this help message and exit
--equations E comma separated strings representing which equations to time (for ex. 'wave,euler,cns_with_chem,cns_without_chem')
--dims D comma separated integers representing the topological dimensions to run the problems on (for ex. 2,3 to run 2D and 3D versions of the
problem)
--degrees G comma separated integers representing the polynomial degree of the discretizing function spaces to run the problems on (for ex. 1,2,3 to run
using P1,P2,P3 function spaces)
MIT (see LICENSE.txt)