-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: low-level buffer allocation utilities for new storages #1303
Conversation
src/gt4py/_core/definitions.py
Outdated
NDArrayObject = Union[npt.NDArray, "CuPyNDArray", "JaxNDArray", NDArrayObjectProto] | ||
NDArrayObjectT = TypeVar( | ||
"NDArrayObjectT", npt.NDArray, "CuPyNDArray", "JaxNDArray", NDArrayObjectProto | ||
) |
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.
remove this if mypy works for
tmp: NDArrayObjectProto = np.asarray([])
Storages next hannes
cscs-ci run |
cscs-ci run |
1 similar comment
cscs-ci run |
cscs-ci run |
3 similar comments
cscs-ci run |
cscs-ci run |
cscs-ci run |
src/gt4py/_core/definitions.py
Outdated
class UnsignedIntegral(numbers.Integral): | ||
"""Abstract base class for unsigned integral types.""" |
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.
class UnsignedIntegral(numbers.Integral): | |
"""Abstract base class for unsigned integral types.""" | |
class PositiveIntegral(numbers.Integral): | |
"""Abstract base class representing positive integral numbers.""" |
src/gt4py/storage/allocators.py
Outdated
# class _NDArrayLike(Protocol): | ||
# def __array__(self, dtype: Optional[np.dtype] = None) -> np.ndarray: | ||
# ... | ||
|
||
# def __getitem__(self, item: core_defs.SliceLike) -> np.ndarray: | ||
# ... | ||
|
||
|
||
# class _NDArrayLikeArrayInterface(xtyping.ArrayInterface, _NDArrayLike): | ||
# ... | ||
|
||
|
||
# class _NDArrayLikeCUDAArrayInterface(xtyping.CUDAArrayInterface, _NDArrayLike): | ||
# ... | ||
|
||
|
||
# class _NDArrayLikeDLPackBuffer(xtyping.DLPackBuffer, _NDArrayLike): | ||
# ... |
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.
remove
Co-authored-by: Stefano Ubbiali <subbiali@phys.ethz.ch>
Can confirm that |
Description
Add new buffer allocation utilities and concepts definitions.
Main changes:
Pending