Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalatino committed Mar 5, 2024
1 parent 1c8b4b9 commit a59736e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ndsl/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@

import ndsl.constants as constants
from ndsl.buffer import array_buffer, recv_buffer, send_buffer
from ndsl.comm import boundary as bd
from ndsl.comm.boundary import Boundary
from ndsl.halo.updater import HaloUpdater, HaloUpdateRequest, VectorInterfaceHaloUpdater
from ndsl.performance.timer import NullTimer, Timer
from ndsl.quantity import Quantity, QuantityHaloSpec, QuantityMetadata
from ndsl.types import NumpyModule
from ndsl.utils import device_synchronize
from ndsl.comm import boundary as bd


try:
import cupy
except ImportError:
cupy = None


def to_numpy(array, dtype=None) -> np.ndarray:
"""
Input array can be a numpy array or a cupy array. Returns numpy array.
Expand All @@ -40,11 +42,13 @@ def to_numpy(array, dtype=None) -> np.ndarray:
output = output.astype(dtype=dtype)
return output


class Checkpointer(abc.ABC):
@abc.abstractmethod
def __call__(self, savepoint_name, **kwargs):
...


class Communicator(abc.ABC):
def __init__(
self, comm, partitioner, force_cpu: bool = False, timer: Optional[Timer] = None
Expand Down Expand Up @@ -570,7 +574,8 @@ def boundaries(self) -> Mapping[int, Boundary]:
if boundary is not None:
self._boundaries[boundary_type] = boundary
return self._boundaries



class Partitioner(abc.ABC):
@abc.abstractmethod
def __init__(self):
Expand Down Expand Up @@ -645,4 +650,4 @@ def subtile_extent(
@property
@abc.abstractmethod
def total_ranks(self) -> int:
pass
pass

0 comments on commit a59736e

Please sign in to comment.