()
return drv.Device(cuda.cudaGetDevice())
Get the device in use by the current context.

    Returns
    -------
    d : pycuda.driver.Device
        Device in use by current context.
Get the device in use by the current context.
Get the device in use by the current context .
def get_current_device():
    """
    Get the device in use by the current context.

    Returns
    -------
    d : pycuda.driver.Device
        Device in use by current context.
    """

    return drv.Device(cuda.cudaGetDevice())
def get_current_device ( ) : return drv . Device ( cuda . cudaGetDevice ( ) )