Skip to content

support Per Group in Float8DynamicActivationFloat8WeightConfig (#4182)#4182

Open
zlin888 wants to merge 1 commit intopytorch:mainfrom
zlin888:export-D97987011
Open

support Per Group in Float8DynamicActivationFloat8WeightConfig (#4182)#4182
zlin888 wants to merge 1 commit intopytorch:mainfrom
zlin888:export-D97987011

Conversation

@zlin888
Copy link
Copy Markdown

@zlin888 zlin888 commented Mar 26, 2026

Summary:

as title

Differential Revision: D97987011

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 26, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4182

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Unrelated Failure

As of commit 1695a45 with merge base 6f56403 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 26, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 26, 2026

@zlin888 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97987011.

@meta-codesync meta-codesync bot changed the title support Per Group in Float8DynamicActivationFloat8WeightConfig support Per Group in Float8DynamicActivationFloat8WeightConfig (#4182) Mar 26, 2026
zlin888 added a commit to zlin888/ao that referenced this pull request Mar 26, 2026
zlin888 added a commit to zlin888/ao that referenced this pull request Mar 26, 2026
…ch#4182)

Summary:
Pull Request resolved: pytorch#4182

as title

Differential Revision: D97987011
zlin888 added a commit to zlin888/ao that referenced this pull request Mar 26, 2026
zlin888 added a commit to zlin888/ao that referenced this pull request Mar 26, 2026
…ch#4182)

Summary:
Pull Request resolved: pytorch#4182

as title

Differential Revision: D97987011
zlin888 added a commit to zlin888/ao that referenced this pull request Mar 26, 2026
…ch#4182)

Summary:
Pull Request resolved: pytorch#4182

as title

Differential Revision: D97987011
@zlin888
Copy link
Copy Markdown
Author

zlin888 commented Mar 26, 2026

@jerryzh168 @jcaip pls take a look. thanks!

Copy link
Copy Markdown

@JiwaniZakir JiwaniZakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In inference.py, logging.getLogger() (line added near the top) creates a root logger rather than a module-scoped one. The standard convention is logging.getLogger(__name__), which avoids accidentally affecting the logging behavior of unrelated modules that share the root logger.

Additionally, in _normalize_granularity and _check_hardware_support, the new is_per_group path checks that both granularities are PerGroup instances, but never validates that their group_size values match. A mismatch between activation and weight group sizes would likely produce silent incorrect results or a cryptic error downstream — an explicit check like granularity[0].group_size == granularity[1].group_size with a descriptive ValueError would catch this early.

Finally, the elif is_per_group branch in _check_hardware_support unconditionally emits a warning on every call. If this function is invoked repeatedly (e.g., per-layer during model conversion), this will flood logs. Emitting it once via warnings.warn(..., stacklevel=2) with stacklevel pointing to the caller, or using logger.warning with a rate-limiting approach, would be more user-friendly.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants