From 53eda47aa98aa54b780d5823a1471b5940cc0fa6 Mon Sep 17 00:00:00 2001 From: Eran Geva <19514940+MrGeva@users.noreply.github.com> Date: Wed, 10 Sep 2025 23:07:54 +0300 Subject: [PATCH 1/2] added capture to the bug template (#4576) Signed-off-by: Eran Geva <19514940+MrGeva@users.noreply.github.com> Signed-off-by: Gr0ly --- .github/ISSUE_TEMPLATE/bug_report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 89573c943..927dcc668 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -64,4 +64,6 @@ Baremetal or Container (if so, version): **Have you tried [the latest release](https://developer.nvidia.com/tensorrt)?**: +**Attach the captured .json and .bin files from [TensorRT's API Capture tool](https://docs.nvidia.com/deeplearning/tensorrt/latest/inference-library/capture-replay.html) if you're on an x86_64 Unix system** + **Can this model run on other frameworks?** For example run ONNX model with ONNXRuntime (`polygraphy run --onnxrt`): From 4eb81b1ea17c2c41863c3c585aacbe96a5e4d161 Mon Sep 17 00:00:00 2001 From: Gr0ly Date: Sat, 1 Nov 2025 15:24:41 +0100 Subject: [PATCH 2/2] Issue #4612 - add checks for error return types cudart.cudaMemcpyAsync and cudart.cudaStreamSynchronize return a tuple which leads to AttributeError as cudart.cudaGetErrorString(err) expects a cudaError_t. This is solved by adding type check before passing it to the raise function. Signed-off-by: Gr0ly --- quickstart/IntroNotebooks/onnx_helper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quickstart/IntroNotebooks/onnx_helper.py b/quickstart/IntroNotebooks/onnx_helper.py index afa950cc3..b9abecb8f 100644 --- a/quickstart/IntroNotebooks/onnx_helper.py +++ b/quickstart/IntroNotebooks/onnx_helper.py @@ -86,6 +86,7 @@ def predict(self, batch): # result gets copied into output err = cudart.cudaMemcpyAsync( self.d_input, batch.ctypes.data, batch.nbytes, cudart.cudaMemcpyKind.cudaMemcpyHostToDevice, self.stream ) + err = err[0] if isinstance(err, tuple) else err if err != cudart.cudaError_t.cudaSuccess: raise RuntimeError(f"Failed to copy input to device: {cudart.cudaGetErrorString(err)}") @@ -100,11 +101,13 @@ def predict(self, batch): # result gets copied into output cudart.cudaMemcpyKind.cudaMemcpyDeviceToHost, self.stream, ) + err = err[0] if isinstance(err, tuple) else err if err != cudart.cudaError_t.cudaSuccess: raise RuntimeError(f"Failed to copy output from device: {cudart.cudaGetErrorString(err)}") # synchronize threads err = cudart.cudaStreamSynchronize(self.stream) + err = err[0] if isinstance(err, tuple) else err if err != cudart.cudaError_t.cudaSuccess: raise RuntimeError(f"Failed to synchronize stream: {cudart.cudaGetErrorString(err)}")