You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone, i'm checking this code about which allocates all buffers required for an engine:
def allocate_buffers(engine):
inputs = []
outputs = []
bindings = []
stream = cuda.Stream()
for binding in engine:
size = trt.volume(engine.get_binding_shape(binding)) * engine.max_batch_size
dtype = trt.nptype(engine.get_binding_dtype(binding))
# Allocate host and device buffers
host_mem = cuda.pagelocked_empty(size, dtype)
device_mem = cuda.mem_alloc(host_mem.nbytes)
# Append the device buffer to device bindings.
bindings.append(int(device_mem))
# Append to the appropriate list.
if engine.binding_is_input(binding):
inputs.append(HostDeviceMem(host_mem, device_mem))
else:
outputs.append(HostDeviceMem(host_mem, device_mem))
return inputs, outputs, bindings, stream
My problem is that it works in an environment with TensorRT 8.X., and I'm trying to run it in TensorRT 10.2. where get_binding_shape(binding), get_binding_dtype(binding) and binding_is_input(binding) functions were eliminated. Does equivalents of these functions exist? Or in any case, Is there a way to use tensor functions to obtain the same outputs? Thanks for your attention. Btw the class is tensorrt.ICudaEngine
The text was updated successfully, but these errors were encountered:
Hi everyone, i'm checking this code about which allocates all buffers required for an engine:
My problem is that it works in an environment with TensorRT 8.X., and I'm trying to run it in TensorRT 10.2. where get_binding_shape(binding), get_binding_dtype(binding) and binding_is_input(binding) functions were eliminated. Does equivalents of these functions exist? Or in any case, Is there a way to use tensor functions to obtain the same outputs? Thanks for your attention. Btw the class is tensorrt.ICudaEngine
The text was updated successfully, but these errors were encountered: