MCPcopy
hub / github.com/tinygrad/tinygrad / __del__

Method __del__

tinygrad/runtime/ops_cl.py:50–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 self.kernel = checked(cl.clCreateKernel(self.program, name.encode(), status := ctypes.c_int32()), status)
49
50 def __del__(self):
51 try: check(cl.clReleaseKernel(self.kernel))
52 except (TypeError, AttributeError): pass
53 try: check(cl.clReleaseProgram(self.program))
54 except (TypeError, AttributeError): pass
55
56 def __call__(self, *bufs:cl.cl_mem, global_size:tuple[int,int,int]=(1,1,1), local_size:tuple[int,int,int]|None=None, vals:tuple[int, ...]=(),
57 wait=False, **kw) -> float|None:

Callers

nothing calls this directly

Calls 1

checkFunction · 0.70

Tested by

no test coverage detected