Skip to content
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

settings elements migration #575

Merged
merged 146 commits into from
Dec 6, 2024
Merged

settings elements migration #575

merged 146 commits into from
Dec 6, 2024

Conversation

nfarabullini
Copy link
Contributor

@nfarabullini nfarabullini commented Oct 24, 2024

  • moved the following elements from model/common/src/icon4py/model/common/settings.pyto tools/src/icon4pytools/py2fgen/wrappers/settings.py:
config = Icon4PyConfig()
backend = config.gt4py_runner
dace_orchestration = config.icon4py_dace_orchestration
xp = config.array_ns
device = config.device
limited_area = config.limited_area
  • subsequent edit of imports and related in the code
  • cleanup of left-over stencils backend specification on program definition

@nfarabullini nfarabullini marked this pull request as draft October 24, 2024 12:54
@nfarabullini nfarabullini changed the title first set of change settings elements migration Oct 24, 2024
@nfarabullini nfarabullini requested a review from halungge December 6, 2024 10:13
@nfarabullini
Copy link
Contributor Author

cscs-ci run default

Copy link
Contributor

@halungge halungge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rerun without those hasattr calls in grid/icon.py and grid/base.py Otherwise I think it is good to go, the rest we can fine tune in another PR.

self.connectivities.update({d: k.astype(gtx.int32) for d, k in connectivity.items()})
self.connectivities.update(
{
d: k.ndarray.astype(gtx.int32) if hasattr(k, "ndarray") else k.astype(gtx.int32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you still remove and rerun without the hasattr?

Suggested change
d: k.ndarray.astype(gtx.int32) if hasattr(k, "ndarray") else k.astype(gtx.int32)
self.connectivities.update({d: k.astype(gtx.int32) for d, k in connectivity.items()})

model/common/src/icon4py/model/common/grid/icon.py Outdated Show resolved Hide resolved
model/common/src/icon4py/model/common/grid/icon.py Outdated Show resolved Hide resolved
model/common/src/icon4py/model/common/grid/icon.py Outdated Show resolved Hide resolved
nfarabullini and others added 2 commits December 6, 2024 13:54
Copy link

github-actions bot commented Dec 6, 2024

Mandatory Tests

Please make sure you run these tests via comment before you merge!

  • cscs-ci run default
  • launch jenkins spack

Optional Tests

To run benchmarks you can use:

  • cscs-ci run benchmark

To run tests and benchmarks with the DaCe backend you can use:

  • cscs-ci run dace

In case your change might affect downstream icon-exclaim, please consider running

  • launch jenkins icon

For more detailed information please look at CI in the EXCLAIM universe.

@halungge
Copy link
Contributor

halungge commented Dec 6, 2024

cscs-ci run default

@nfarabullini
Copy link
Contributor Author

launch jenkins spack

@halungge halungge self-requested a review December 6, 2024 15:20
@nfarabullini nfarabullini merged commit 3068bd7 into main Dec 6, 2024
4 of 5 checks passed
jcanton pushed a commit that referenced this pull request Dec 9, 2024
- moved the following elements from
`model/common/src/icon4py/model/common/settings.py`to
`tools/src/icon4pytools/py2fgen/wrappers/settings.py`:
 ```
config = Icon4PyConfig()
backend = config.gt4py_runner
dace_orchestration = config.icon4py_dace_orchestration
xp = config.array_ns
device = config.device
limited_area = config.limited_area
```
- subsequent edit of imports and related in the code
- cleanup of left-over stencils backend specification on program definition
jcanton pushed a commit that referenced this pull request Dec 9, 2024
- moved the following elements from
`model/common/src/icon4py/model/common/settings.py`to
`tools/src/icon4pytools/py2fgen/wrappers/settings.py`:
 ```
config = Icon4PyConfig()
backend = config.gt4py_runner
dace_orchestration = config.icon4py_dace_orchestration
xp = config.array_ns
device = config.device
limited_area = config.limited_area
```
- subsequent edit of imports and related in the code
- cleanup of left-over stencils backend specification on program definition
@halungge halungge deleted the settings_elements_migration branch December 12, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants