Issue #4612 - add checks for error return types by grolysaini · Pull Request #4613 · NVIDIA/TensorRT

Signed-off-by: Eran Geva <19514940+MrGeva@users.noreply.github.com>
Signed-off-by: Gr0ly <charanjit.singh@dstream.de>
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 <charanjit.singh@dstream.de>