-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add serialised data to ci #338
Changes from 10 commits
146f4d1
efdcb6c
a449d62
95d4533
32d8eca
2af5052
7872ae3
390721c
f1fb468
38adcce
3520d13
ac95551
1584e2c
f576f48
43fa823
3b9904f
a22537d
3f68853
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,13 +34,16 @@ variables: | |
- pyversion_no_dot="${PYTHON_VERSION//./}" | ||
- pip install tox clang-format | ||
- python -c "import cupy" | ||
- ls ${SERIALIZED_DATA_PATH} | ||
variables: | ||
SLURM_JOB_NUM_NODES: 1 | ||
SLURM_NTASKS: 1 | ||
SLURM_TIMELIMIT: '06:00:00' | ||
CRAY_CUDA_MPS: 1 | ||
NUM_PROCESSES: auto | ||
VIRTUALENV_SYSTEM_SITE_PACKAGES: 1 | ||
CSCS_NEEDED_DATA: icon4py | ||
SERIALIZED_DATA_PATH: "/apps/daint/UES/jenkssl/ciext/icon4py" | ||
|
||
build_job: | ||
extends: .build_template | ||
|
@@ -89,34 +92,34 @@ test_tools_job: | |
script: | ||
- tox -r -c tools/ --verbose | ||
|
||
benchmark_model_dace_cpu_simple_grid: | ||
benchmark_model_dace_cpu_icon_grid: | ||
extends: .test_template | ||
stage: benchmark | ||
script: | ||
- pip install dace==$DACE_VERSION | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=dace_cpu --grid=simple_grid | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=dace_cpu --grid=icon_grid | ||
only: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was wondering: does our (don't know how it works and currentlyit runs always all of the jobs and the benchmarks take quite long... once we add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure to be honest since @edopao added these dace jobs, maybe he can explain more. I would assume these benchmarks run only on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As commented in today's standup meeting, the intention of this setting was to run the dace benchmark on main after PR is merged. However, this setting is ignored in our setup, as also noted above. I agree that we could have a separate CI pipeline for benchmarking, automatically triggered after PR is merged or by a daily job. |
||
- main | ||
when: manual | ||
|
||
benchmark_model_dace_gpu_simple_grid: | ||
benchmark_model_dace_gpu_icon_grid: | ||
extends: .test_template | ||
stage: benchmark | ||
script: | ||
- pip install dace==$DACE_VERSION | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=dace_gpu --grid=simple_grid | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=dace_gpu --grid=icon_grid | ||
only: | ||
- main | ||
when: manual | ||
|
||
benchmark_model_gtfn_cpu_simple_grid: | ||
benchmark_model_gtfn_cpu_icon_grid: | ||
extends: .test_template | ||
stage: benchmark | ||
script: | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=gtfn_cpu --grid=simple_grid | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=gtfn_cpu --grid=icon_grid | ||
|
||
benchmark_model_gtfn_gpu_simple_grid: | ||
benchmark_model_gtfn_gpu_icon_grid: | ||
extends: .test_template | ||
stage: benchmark | ||
script: | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=gtfn_gpu --grid=simple_grid | ||
- tox -r -e stencil_tests -c model/ --verbose -- --benchmark-only --backend=gtfn_gpu --grid=icon_grid |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,12 @@ def reference( | |
return dict(theta_v=theta_v, exner=exner) | ||
|
||
@pytest.fixture | ||
def input_data(self, grid): | ||
def input_data(self, grid, uses_icon_grid_with_otf): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have merged the verification of the global (EXCLAIM Aquaplanet) run, that means there is an additional serialized dataset (which for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok sounds good, let's discuss it tomorrow, uploading to the server should be relatively straightforward, Andreas can help us. |
||
if uses_icon_grid_with_otf: | ||
pytest.skip( | ||
"Execution domain needs to be restricted or boundary taken into account in stencil." | ||
) | ||
|
||
kh_smag_e = random_field(grid, EdgeDim, KDim) | ||
inv_dual_edge_length = random_field(grid, EdgeDim) | ||
theta_v_in = random_field(grid, CellDim, KDim) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,25 +10,33 @@ | |
# distribution for a copy of the license or check <https://www.gnu.org/licenses/>. | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
import os | ||
from pathlib import Path | ||
|
||
from icon4py.model.common.decomposition.definitions import get_processor_properties | ||
|
||
|
||
TEST_UTILS_PATH = Path(__file__).parent | ||
MODEL_PATH = TEST_UTILS_PATH.parent.parent | ||
COMMON_PATH = MODEL_PATH.parent.parent.parent.parent | ||
BASE_PATH = COMMON_PATH.parent.joinpath("testdata") | ||
def get_serialized_data_path() -> Path: | ||
test_utils_path = Path(__file__).parent | ||
model_path = test_utils_path.parent.parent | ||
common_path = model_path.parent.parent.parent.parent | ||
env_base_path = os.getenv("SERIALIZED_DATA_PATH") | ||
|
||
if env_base_path: | ||
return Path(env_base_path) | ||
else: | ||
return common_path.parent.joinpath("serialized_data") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are changing the default path of serialized data (was There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch thanks, I've updated it. |
||
|
||
|
||
SERIALIZED_DATA_PATH = get_serialized_data_path() | ||
SERIALIZED_DATA_BASEPATH = SERIALIZED_DATA_PATH.joinpath("ser_icondata") | ||
|
||
# TODO: a run that contains all the fields needed for dycore, diffusion, interpolation fields needs to be consolidated | ||
DATA_URIS = { | ||
1: "https://polybox.ethz.ch/index.php/s/re46l1xnJZ4uCMx/download", | ||
2: "https://polybox.ethz.ch/index.php/s/YyC5qDJWyC39y7u/download", | ||
4: "https://polybox.ethz.ch/index.php/s/UIHOVJs6FVPpz9V/download", | ||
} | ||
SER_DATA_BASEPATH = BASE_PATH.joinpath("ser_icondata") | ||
|
||
|
||
def get_processor_properties_for_run(run_instance): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that we use the same test command (
stencil_tests
) for both test and benchmark stages. This test command was added in your previous PR and contains the flags--cov --cov-append
. I think that these coverage flags should not be used in benchmark mode. Maybe,--verbose
could also be skipped on this line.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a new command for benchmarks now.