MCPcopy Create free account
hub / github.com/KnowingNothing/MatmulTutorial / __init__

Method __init__

examples/matmul/this-sm90/test_v3.py:34–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33class 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:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected