コード例 #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
ファイル: __init__.py プロジェクト: liuluyang530/gpt-pytorch
 def __init__(self, code):
     msg = _cudart.cudaGetErrorString(code).decode('utf-8')
     super(CudaError, self).__init__('{0} ({1})'.format(msg, code))