Skip to content

Commit

Permalink
Merge branch 'main' into numpy-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun authored Oct 29, 2024
2 parents b89b33a + 2070d39 commit 2c9fcc6
Show file tree
Hide file tree
Showing 224 changed files with 12,620 additions and 4,894 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/fpga-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ name: FPGA Tests

on:
push:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
pull_request:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
merge_group:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
test-fpga:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/general-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: General Tests

on:
push:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
pull_request:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
merge_group:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]

jobs:
test:
Expand Down Expand Up @@ -85,4 +85,8 @@ jobs:
./tests/polybench_test.sh
./tests/xform_test.sh
coverage combine .; coverage report; coverage xml
./codecov
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
7 changes: 4 additions & 3 deletions .github/workflows/gpu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ name: GPU Tests

on:
push:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
pull_request:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
merge_group:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]

env:
CUDACXX: /usr/local/cuda/bin/nvcc
MKLROOT: /opt/intel/oneapi/mkl/latest/
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


jobs:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/heterogeneous-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ name: Heterogeneous Tests

on:
push:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
pull_request:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]
merge_group:
branches: [ master, ci-fix ]
branches: [ main, ci-fix ]

env:
CUDA_HOME: /usr/local/cuda
CUDACXX: nvcc
MKLROOT: /opt/intel/oneapi/mkl/latest/
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
test-heterogeneous:
Expand Down
75 changes: 0 additions & 75 deletions .github/workflows/pace-build-ci.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/pyFV3-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: NASA/NOAA pyFV3 repository build test

on:
push:
branches: [ main, ci-fix ]
pull_request:
branches: [ main, ci-fix ]
merge_group:
branches: [ main, ci-fix ]

defaults:
run:
shell: bash

jobs:
build_and_validate_pyFV3:
if: "!contains(github.event.pull_request.labels.*.name, 'no-ci')"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11.7]

steps:
- uses: actions/checkout@v2
with:
repository: 'NOAA-GFDL/PyFV3'
ref: 'ci/DaCe'
submodules: 'recursive'
path: 'pyFV3'
- uses: actions/checkout@v2
with:
path: 'dace'
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install library dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev libboost-all-dev
gcc --version
# Because Github doesn't allow us to do a git checkout in code
# we use a trick to checkout DaCe first (not using the external submodule)
# install the full suite via requirements_dev, then re-install the correct DaCe
- name: Install Python packages
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -e ./pyFV3[develop]
pip install -e ./dace
- name: Download data
run: |
cd pyFV3
mkdir -p test_data
cd test_data
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.D_SW.tar.gz
tar -xzvf 8.1.3_c12_6ranks_standard.D_SW.tar.gz
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.RiemSolver3.tar.gz
tar -xzvf 8.1.3_c12_6ranks_standard.RiemSolver3.tar.gz
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.Remapping.tar.gz
tar -xzvf 8.1.3_c12_6ranks_standard.Remapping.tar.gz
cd ../..
# Clean up caches between run for stale un-expanded SDFG to trip the build system (NDSL side issue)
- name: "Regression test: Riemman Solver on D-grid (RiemSolver3)"
env:
FV3_DACEMODE: BuildAndRun
PACE_CONSTANTS: GFS
PACE_LOGLEVEL: Debug
run: |
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=dace:cpu --which_modules=Riem_Solver3 \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/tests/savepoint
rm -r ./.gt_cache_FV3_A
- name: "Regression test: Shallow water lagrangian dynamics on D-grid (D_SW) (on rank 0 only)"
env:
FV3_DACEMODE: BuildAndRun
PACE_CONSTANTS: GFS
PACE_LOGLEVEL: Debug
run: |
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=dace:cpu --which_modules=D_SW --which_rank=0 \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/tests/savepoint
rm -r ./.gt_cache_FV3_A
- name: "Regression test: Remapping (on rank 0 only)"
env:
FV3_DACEMODE: BuildAndRun
PACE_CONSTANTS: GFS
PACE_LOGLEVEL: Debug
run: |
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=dace:cpu --which_modules=Remapping --which_rank=0 \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/tests/savepoint
rm -r ./.gt_cache_FV3_A
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ For automatic styling, we use the [yapf](https://github.com/google/yapf) file fo
We use [pytest](https://www.pytest.org/) for our testing infrastructure. All tests under the `tests/` folder
(and any subfolders within) are automatically read and run. The files must be under the right subfolder
based on the component being tested (e.g., `tests/sdfg/` for IR-related tests), and must have the right
suffix: either `*_test.py` or `*_cudatest.py`. See [pytest.ini](https://github.com/spcl/dace/blob/master/pytest.ini)
suffix: either `*_test.py` or `*_cudatest.py`. See [pytest.ini](https://github.com/spcl/dace/blob/main/pytest.ini)
for more information, and for the markers we use to specify software/hardware requirements.

The structure of the test file must follow `pytest` standards (i.e., free functions called `test_*`), and
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
[![FPGA Tests](https://github.com/spcl/dace/actions/workflows/fpga-ci.yml/badge.svg)](https://github.com/spcl/dace/actions/workflows/fpga-ci.yml)
[![Documentation Status](https://readthedocs.org/projects/spcldace/badge/?version=latest)](https://spcldace.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/dace.svg)](https://badge.fury.io/py/dace)
[![codecov](https://codecov.io/gh/spcl/dace/branch/master/graph/badge.svg)](https://codecov.io/gh/spcl/dace)
[![codecov](https://codecov.io/gh/spcl/dace/branch/main/graph/badge.svg)](https://codecov.io/gh/spcl/dace)


![D](dace.svg)aCe - Data-Centric Parallel Programming
=====================================================

_Decoupling domain science from performance optimization._

DaCe is a [fast](https://nbviewer.org/github/spcl/dace/blob/master/tutorials/benchmarking.ipynb) parallel programming
DaCe is a [fast](https://nbviewer.org/github/spcl/dace/blob/main/tutorials/benchmarking.ipynb) parallel programming
framework that takes code in Python/NumPy and other programming languages, and maps it to high-performance
**CPU, GPU, and FPGA** programs, which can be optimized to achieve state-of-the-art. Internally, DaCe
uses the Stateful DataFlow multiGraph (SDFG) *data-centric intermediate
Expand Down Expand Up @@ -61,13 +61,13 @@ be used in any C ABI compatible language (C/C++, FORTRAN, etc.).

For more information on how to use DaCe, see the [samples](samples) or tutorials below:

* [Getting Started](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/getting_started.ipynb)
* [Benchmarks, Instrumentation, and Performance Comparison with Other Python Compilers](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/benchmarking.ipynb)
* [Explicit Dataflow in Python](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/explicit.ipynb)
* [NumPy API Reference](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/numpy_frontend.ipynb)
* [SDFG API](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/sdfg_api.ipynb)
* [Using and Creating Transformations](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/transformations.ipynb)
* [Extending the Code Generator](https://nbviewer.jupyter.org/github/spcl/dace/blob/master/tutorials/codegen.ipynb)
* [Getting Started](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/getting_started.ipynb)
* [Benchmarks, Instrumentation, and Performance Comparison with Other Python Compilers](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/benchmarking.ipynb)
* [Explicit Dataflow in Python](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/explicit.ipynb)
* [NumPy API Reference](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/numpy_frontend.ipynb)
* [SDFG API](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/sdfg_api.ipynb)
* [Using and Creating Transformations](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/transformations.ipynb)
* [Extending the Code Generator](https://nbviewer.jupyter.org/github/spcl/dace/blob/main/tutorials/codegen.ipynb)

Publication
-----------
Expand Down
1 change: 1 addition & 0 deletions dace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from .frontend.operations import reduce, elementwise

from . import data, hooks, subsets
from .codegen.compiled_sdfg import CompiledSDFG
from .config import Config
from .sdfg import SDFG, SDFGState, InterstateEdge, nodes
from .sdfg.propagation import propagate_memlets_sdfg, propagate_memlet
Expand Down
Loading

0 comments on commit 2c9fcc6

Please sign in to comment.