pytorch / pytorch/TensorRT

✨[Feature] Route FP16 Layer Norm properly

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

@narendasan is already working on this.

Since Jan 30, 2026.

feature request story: Quantization & Precision
Dominant language
Python
Stars
3k
Forks
410
Avg merge
3d 18h
Merged PRs (30d)
78

Description

Is your feature request related to a problem? Please describe.

We now see these warnings:

WARNING:torch_tensorrt [TensorRT Conversion Context]:Detected layernorm nodes in FP16.
WARNING:torch_tensorrt [TensorRT Conversion Context]:Running layernorm after self-attention with FP16 Reduce or Pow may cause overflow. Forcing Reduce or Pow Layers in FP32 precision, or exporting the model to use INormalizationLayer (available with ONNX opset >= 17) can help preserving accuracy.

Describe the solution you'd like

Add a lowering pass to detect this case and properly route the subgraph to the right converters

Describe alternatives you've considered

Additional context

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.