You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My gut feeling would be: Always use numpy, except in cases where really something on the gpu is happening, like cp.max or so (so "real" cupy functions), but opening this to discuss this behaviour.
Toms inituition would be: numpy types for numpy functions and cupy types for cupy functions. Whoever reads the code is probably not that familiar with cupy to know this are only aliases and wonders that cupy takes numpy types.
But even so I do not have that strong of an opinion regards this topic, as long as we do it consequently.
The text was updated successfully, but these errors were encountered:
Currently, we use numpy/np and cp/cupy very inconsistently.
In fact, for example for the types, a lot of cupy types are just aliases to numpy.
https://docs.cupy.dev/en/stable/reference/comparison.html#numpy-cupy-apis
(search for numpy.float_)
cp.float_ is apparently only an alias to numpy.float_
My gut feeling would be: Always use numpy, except in cases where really something on the gpu is happening, like cp.max or so (so "real" cupy functions), but opening this to discuss this behaviour.
Toms inituition would be: numpy types for numpy functions and cupy types for cupy functions. Whoever reads the code is probably not that familiar with cupy to know this are only aliases and wonders that cupy takes numpy types.
But even so I do not have that strong of an opinion regards this topic, as long as we do it consequently.
The text was updated successfully, but these errors were encountered: