def prefer_gpu():
    """Use GPU if it's available. Returns True if so, False otherwise."""
    from ._classes.model import Model
    from .ops import CupyOps

    if CupyOps.xp is not None:
        Model.Ops = CupyOps
        Model.ops = CupyOps()
        return True
    else:
        return False
Use GPU if it's available. Returns True if so, False otherwise.