NVIDIA / NVIDIA/TensorRT

Logger sends messages to stdout rather than stderr

Open
#4,306 3 comments 0 reactions 1 assignee View on GitHub

@pranavm-nvidia is already working on this.

Since Jan 3, 2025.

Module:Documentation triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Description

https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/infer/Core/Logger.html said the log method logs a message to stderr. But the message is sent to stdout instead.

Environment

TensorRT Version: 10.7.0

NVIDIA GPU: GeForce RTX 4060 Ti

NVIDIA Driver Version: 566.36

CUDA Version: 12.6

CUDNN Version:

Operating System: Ubuntu 24.04.1 LTS in WSL2

Python Version (if applicable): 3.12.3

Tensorflow Version (if applicable):

PyTorch Version (if applicable):

Baremetal or Container (if so, version):

Steps To Reproduce

Commands or scripts:

(trt_test) holywu@HOLYWU:~$ pip3 list
Package                  Version
------------------------ -------
nvidia-cuda-runtime-cu12 12.6.77
packaging                24.2
pip                      24.3.1
setuptools               75.6.0
tensorrt                 10.7.0
tensorrt_cu12            10.7.0
tensorrt-cu12-bindings   10.7.0
tensorrt-cu12-libs       10.7.0
wheel                    0.45.1
(trt_test) holywu@HOLYWU:~$ python3 -c "import tensorrt as trt; logger = trt.Logger(); logger.log(trt.Logger.WARNING, 'Hello World')" 2>/dev/null
[12/30/2024-22:40:08] [TRT] [W] Hello World

Have you tried the latest release?: Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.