-
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
Simple MaskedArray implementation #554
Conversation
…s not implementd in cupy.
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.
Thanks a lot for the fix! Only one possible typo.
model/common/src/icon4py/model/common/decomposition/definitions.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/decomposition/definitions.py
Outdated
Show resolved
Hide resolved
def __init__(self, klevels: int): | ||
self._global_index:dict[Dimension, MaskedArray] = {} | ||
self._klevels = klevels | ||
|
||
class EntryType(IntEnum): | ||
ALL = 0 | ||
OWNED = 1 | ||
HALO = 2 | ||
|
||
@builder.builder | ||
def with_dimension(self, dim: Dimension, global_index: np.ndarray, owner_mask: np.ndarray): |
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.
xp.ndarray?
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.
samve
model/common/src/icon4py/model/common/decomposition/definitions.py
Outdated
Show resolved
Hide resolved
@@ -8,14 +8,14 @@ | |||
|
|||
from __future__ import annotations | |||
|
|||
import dataclasses | |||
import functools | |||
import logging | |||
from dataclasses import dataclass | |||
from enum import IntEnum |
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.
import statement
fix typo in dunder function
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
In case your change might affect downstream icon-exclaim, please consider running
For more detailed information please look at CI in the EXCLAIM universe. |
(FIX) poor man s implementation of a Masked Array as numpy.ma has no correspondence in cupy.
Additional fixes: