vibeproj.runtime¶
GPU/CPU runtime detection and array module selection.
Functions¶
|
Return the array module (numpy or cupy) for the given array. |
|
Check if CuPy is available and a GPU is accessible. |
|
Ensure array x is on the device managed by xp. |
Module Contents¶
- vibeproj.runtime.get_array_module(x=None)¶
Return the array module (numpy or cupy) for the given array.
If x is None or not a CuPy array, returns numpy.
- vibeproj.runtime.gpu_available() bool¶
Check if CuPy is available and a GPU is accessible.
- vibeproj.runtime.to_device(x, xp)¶
Ensure array x is on the device managed by xp.