(self)
| 32 | |
| 33 | class TMAHelper: |
| 34 | def __init__(self): |
| 35 | self.libcuda = ctypes.CDLL("libcuda.so.1") |
| 36 | self.libcuda.cuTensorMapEncodeTiled.argtypes = [ |
| 37 | ctypes.POINTER(CUtensorMap), ctypes.c_int, ctypes.c_uint32, |
| 38 | CUdeviceptr, ctypes.POINTER(cuuint64_t), ctypes.POINTER(cuuint64_t), |
| 39 | ctypes.POINTER(cuuint32_t), ctypes.POINTER(cuuint32_t), |
| 40 | ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, |
| 41 | ] |
| 42 | self.libcuda.cuTensorMapEncodeTiled.restype = CUresult |
| 43 | self.libcuda.cuGetErrorString.argtypes = [CUresult, ctypes.POINTER(ctypes.c_char_p)] |
| 44 | self.libcuda.cuGetErrorString.restype = CUresult |
| 45 | |
| 46 | def check_error(self, err, name): |
| 47 | if err != 0: |
nothing calls this directly
no outgoing calls
no test coverage detected