Would be useful to support these operations on GPUs as well. One way to do this might be to dispatch using CuPy.