From d759d8332cf9543925c398f2e6642d84337ed62e Mon Sep 17 00:00:00 2001 From: luxi78 Date: Wed, 10 Dec 2025 06:58:39 +0000 Subject: [PATCH] Fixed a bug in samples/python/detectron2/infer.py where self.allocations was passed to the execution context instead of self.device_memories. This likely resulted from an incomplete refactor of the cuda memory allocation code. The sample now runs correctly. Signed-off-by: luxi78 --- samples/python/detectron2/infer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python/detectron2/infer.py b/samples/python/detectron2/infer.py index 45edaf3c..f4cba866 100644 --- a/samples/python/detectron2/infer.py +++ b/samples/python/detectron2/infer.py @@ -120,7 +120,7 @@ def infer(self, batch, scales=None, nms_threshold=None): self.inputs[0]["allocation"], np.ascontiguousarray(batch) ) - self.context.execute_v2(self.allocations) + self.context.execute_v2([d.device_ptr for d in self.device_memories]) for o in range(len(outputs)): common.memcpy_device_to_host(outputs[o], self.outputs[o]["allocation"])