ot.gpu

GPU implementation for several OT solvers and utility functions.

The GPU backend in handled by cupy.

Warning

This module is now deprecated and will be removed in future releases. POT now privides a backend mechanism that allows for solving prolem on GPU wth the pytorch backend.

Warning

Note that by default the module is not imported in ot. In order to use it you need to explicitely import ot.gpu .

By default, the functions in this module accept and return numpy arrays in order to proide drop-in replacement for the other POT function but the transfer between CPU en GPU comes with a significant overhead.

In order to get the best performances, we recommend to give only cupy arrays to the functions and desactivate the conversion to numpy of the result of the function with parameter to_numpy=False.