def __init__(self, code: int) -> None: msg = _cudart.cudaGetErrorString(_cudart.cudaError(code)) super(CudaError, self).__init__('{0} ({1})'.format(msg, code))
def __init__(self, code): msg = _cudart.cudaGetErrorString(code).decode('utf-8') super(CudaError, self).__init__('{0} ({1})'.format(msg, code))