Skip to content

Fix broken import of nonexistent config module in fp8_fa3/setup.py - #4489

Open
Ashutosh0x wants to merge 1 commit into
pytorch:mainfrom
Ashutosh0x:fix/fp8-fa3-broken-import
Open

Fix broken import of nonexistent config module in fp8_fa3/setup.py#4489
Ashutosh0x wants to merge 1 commit into
pytorch:mainfrom
Ashutosh0x:fix/fp8-fa3-broken-import

Conversation

@Ashutosh0x

Copy link
Copy Markdown

Summary

setup_fp8_fa3() in torchao/prototype/attention/fp8_fa3/setup.py imports LowPrecisionAttentionConfig from torchao.prototype.attention.config, but this module does not exist. Importing or calling this function crashes immediately with a ModuleNotFoundError.

Root Cause

The setup_fp8_backend() function in shared_utils/setup.py was refactored to accept (model, flash_impl_name, hadamard) instead of the old (model, config, flash_impl_name, sdpa_fn) signature. The api.py entry point was updated to use the new API, but fp8_fa3/setup.py was not updated to match.

Fix

  • Removed the stale import of LowPrecisionAttentionConfig from the nonexistent config module
  • Updated setup_fp8_fa3() signature and body to match the current setup_fp8_backend() API

Fixes #4318

Test Plan

Verified the import resolves correctly by inspecting the module structure. This is a prototype module without a dedicated test suite. The fix is a straightforward import/signature alignment.

This change was authored with the assistance of an AI coding assistant.

setup_fp8_fa3() imported LowPrecisionAttentionConfig from
torchao.prototype.attention.config, but this module does not exist --
it was removed during the API refactor that introduced
apply_low_precision_attention() in api.py.

The root cause is that setup_fp8_backend() in shared_utils/setup.py
was updated to accept (model, flash_impl_name, hadamard) instead of
the old (model, config, flash_impl_name, sdpa_fn) signature, but
fp8_fa3/setup.py was not updated to match.

This fix removes the stale LowPrecisionAttentionConfig import and
updates setup_fp8_fa3() to use the current setup_fp8_backend() API.

Fixes pytorch#4318

Test Plan:
Verified the import resolves correctly by inspecting the module
structure. This is a prototype module with no dedicated test suite.

This change was authored with the assistance of an AI coding assistant.
@pytorch-bot

pytorch-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 Jun 15, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import of nonexistent config module crashes fp8_fa3/setup.py

1 participant