MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / free

Method free

tools/Polygraphy/polygraphy/cuda/cuda.py:412–425  ·  view source on GitHub ↗

Frees the GPU memory associated with this array. You can also use a context manager to ensure that memory is freed. For example: :: with DeviceArray(...) as arr: ...

(self)

Source from the content-addressed store, hash-verified

410 self.free()
411
412 def free(self):
413 """
414 Frees the GPU memory associated with this array.
415
416 You can also use a context manager to ensure that memory is freed. For example:
417 ::
418
419 with DeviceArray(...) as arr:
420 ...
421 """
422 wrapper().free(self.ptr)
423 self.shape = tuple()
424 self.allocated_nbytes = 0
425 self.ptr = 0
426
427 def copy_from(self, host_buffer, stream=None):
428 """

Callers 3

resizeMethod · 0.95
__exit__Method · 0.95

Calls 2

wrapperFunction · 0.70
freeMethod · 0.45

Tested by 1