Skip to content

4697 - #4724

Open
micwill755 wants to merge 1 commit into
mainfrom
4697
Open

4697#4724
micwill755 wants to merge 1 commit into
mainfrom
4697

Conversation

@micwill755

Copy link
Copy Markdown
Collaborator

Description

Fixes test_base_fp4_static_shapes so that it compares equivalent quantized executions.

Previously, the eager reference output was generated before mtq.quantize() was called. As a result, the test compared an FP16 eager result against an NVFP4 TensorRT result. The expected quantization loss between FP16 and NVFP4 caused the numerical check to be flaky across GPU architectures.

This change moves the eager-model invocation after ModelOpt quantization. The test now compares the ModelOpt NVFP4/QDQ reference output against the TensorRT NVFP4 output.

This is consistent with the existing test_base_fp4_dynamic_shapes and test_nvfp4_nd_input_quantizer tests, which also generate their expected outputs after quantization.

Fixes #4697

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have verified the existing unit test with my changes
  • New and existing relevant unit tests pass
  • I have added the relevant PR labels

@meta-cla meta-cla Bot added the cla signed label Sep 17, 2026
@micwill755
micwill755 requested a review from apbose September 17, 2026 21:42
@github-actions github-actions Bot added documentation Improvements or additions to documentation component: tests Issues re: Tests component: lowering Issues re: The lowering / preprocessing passes component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: converters Issues re: Specific op converters component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Sep 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug] test_base_fp4_static_shapes still borderline-flaky with cosine_similarity

1 participant