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

Class HostDeviceMem

tools/tensorflow-quantization/examples/infer_engine.py:35–46  ·  view source on GitHub ↗

Simple helper data class to store Host and Device memory.

Source from the content-addressed store, hash-verified

33
34
35class HostDeviceMem(object):
36 """Simple helper data class to store Host and Device memory."""
37
38 def __init__(self, host_mem, device_mem):
39 self.host = host_mem
40 self.device = device_mem
41
42 def __str__(self):
43 return "Host:\n" + str(self.host) + "\nDevice:\n" + str(self.device)
44
45 def __repr__(self):
46 return self.__str__()
47
48
49def allocate_buffers(engine: trt.ICudaEngine, batch_size: int) -> [list, list, list]:

Callers 1

allocate_buffersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected