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