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`): 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)}")