Skip to content

Commit

Permalink
Merge pull request #17 from fmalatino/update/workflow
Browse files Browse the repository at this point in the history
Addition of dace:cpu orchestrated versions of unit tests in workflow and overrides for near-zero errors
  • Loading branch information
fmalatino authored May 28, 2024
2 parents 5a0846d + 4ee5b35 commit a9b5fcb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/translate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "Translate test"
on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

Expand All @@ -8,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8.12]
python: [3.8.12, 3.11.7]
steps:
- name: Checkout repository
uses: actions/[email protected]
Expand All @@ -32,10 +33,23 @@ jobs:
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_baroclinic.physics.tar.gz
tar -xzvf 8.1.3_c12_6ranks_baroclinic.physics.tar.gz
cd -
- name: Translate Tests
- name: Numpy Translate Test
run: |
pytest \
-v -s --data_path=./test_data/8.1.3/c12_6ranks_baroclinic/physics \
--backend=numpy \
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \
./tests/savepoint
- name: Orchestrated dace:cpu Translate Test
run: |
export FV3_DACEMODE=BuildAndRun
export PACE_FLOAT_PRECISION=64
export PACE_TEST_N_THRESHOLD_SAMPLES=0
export OMP_NUM_THREADS=10
export PACE_LOGLEVEL=Debug
pytest \
-vvv -x -s --data_path=./test_data/8.1.3/c12_6ranks_baroclinic/physics \
--backend=dace:cpu \
--threshold_overrides_file=./tests/savepoint/translate/overrides/standard.yaml \
./tests/savepoint
9 changes: 9 additions & 0 deletions tests/savepoint/translate/overrides/baroclinic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ Microph:
mph_qg_dt: 1e-18
mph_udt: 1e-8
mph_vdt: 1e-8
- backend: dace:cpu
max_error: 2.2e-8
cuda_no_fma: true
ignore_near_zero_errors:
mph_ql_dt: 1e-8
mph_qr_dt: 1e-9
mph_qg_dt: 1e-18
mph_udt: 1e-8
mph_vdt: 1e-8
18 changes: 18 additions & 0 deletions tests/savepoint/translate/overrides/standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,21 @@ Microph:
mph_ql_dt: 1e-8
mph_qr_dt: 1e-9
mph_qg_dt: 1e-18
- backend: dace:cpu
max_error: 2.2e-8
cuda_no_fma: true
ignore_near_zero_errors:
mph_ql_dt: 1e-8
mph_qr_dt: 1e-9
mph_qg_dt: 1e-18
mph_udt: 1e-8
mph_vdt: 1e-8
- backend: dace:gpu
max_error: 2.2e-8
cuda_no_fma: true
ignore_near_zero_errors:
mph_ql_dt: 1e-8
mph_qr_dt: 1e-9
mph_qg_dt: 1e-18
mph_udt: 1e-8
mph_vdt: 1e-8

0 comments on commit a9b5fcb

Please sign in to comment.