pytorch / pytorch/TensorRT

🐛 [Bug] The lower_example.py Is Broken In nvcr.io/nvidia/pytorch:25.10-py3

Open
#3,901 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug story: Documentation & Examples
Dominant language
Python
Stars
3k
Forks
410
Avg merge
3d 18h
Merged PRs (30d)
78

Description

Bug Description

The lower_example.py Is Broken In nvcr.io/nvidia/pytorch:25.10-py3.

To Reproduce

  1. Run NVIDIA PyTorch Docker container using docker run -it --rm --gpus all -v $(pwd):/mnt -w /mnt nvcr.io/nvidia/pytorch:25.10-py3.
  2. Run lower_example.py copied from the main branch (https://github.com/pytorch/TensorRT/blob/a834c02c67b6f4727ad269fe94c5005c759ddb69/examples/fx/lower_example.py).
  3. Got the error: AttributeError: 'tensorrt.tensorrt.INetworkDefinition' object has no attribute 'has_explicit_precision'.

Expected behavior

There shall be no error when running the examples in NVIDIA PyTorch Docker container.

Environment

Build information about Torch-TensorRT can be found by turning on debug messages

See the NVIDIA PyTorch Docker container.

Additional context

N/A

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.

Research direction

Start with examples/fx/lower_example.py at the linked main-branch revision and reproduce the failure in nvcr.io/nvidia/pytorch:25.10-py3 using the provided docker run command. Investigate the TensorRT network API at the point that accesses has_explicit_precision. Done means the example runs in that container without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python, pytorch
Domain
devops, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.