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

Simple MaskedArray implementation #554

Merged
merged 5 commits into from
Sep 25, 2024
Merged

Conversation

halungge
Copy link
Contributor

@halungge halungge commented Sep 19, 2024

(FIX) poor man s implementation of a Masked Array as numpy.ma has no correspondence in cupy.

Additional fixes:

  • add missing host to device copy for serialbox
  • fix imports

@halungge halungge mentioned this pull request Sep 19, 2024
Copy link
Contributor

@OngChia OngChia left a 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.

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):
Copy link
Contributor

Choose a reason for hiding this comment

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

xp.ndarray?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

samve

@@ -8,14 +8,14 @@

from __future__ import annotations

import dataclasses
import functools
import logging
from dataclasses import dataclass
from enum import IntEnum
Copy link
Contributor

Choose a reason for hiding this comment

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

import statement

Copy link

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 halungge merged commit d35fb0a into gpu_datatest Sep 25, 2024
1 check passed
@halungge halungge deleted the simple_masked_array branch September 25, 2024 08:09
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.

2 participants