def select_device_by_load(wproc=0.5, wmem=0.5):
    """Set the current device for cupy as the device with the lowest
    weighted average of processor and memory load.
    """

    ids = device_by_load(wproc=wproc, wmem=wmem)
    cp.cuda.Device(ids[0]).use()
    return ids[0]
Set the current device for cupy as the device with the lowest
    weighted average of processor and memory load.