Skip to content

Conversation

@jerryzh168
Copy link
Contributor

Summary:
att, we added support of quantization conv3d weights, with Float8DynamicActivationFloat8WeightConfig

API:

config = Float8DynamicActivationFloat8WeightConfig(
   granularity=PerTensor(),
)

_is_conv3d = lambda m, fqn: isinstance(m, torch.nn.Conv3d)

quantize_(quantized_model, config, filter_fn=_is_conv3d)

Test Plan:
pytest test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_fp8_conv_variants

Reviewers:

Subscribers:

Tasks:

Tags:

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 20, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 4c6e979 with merge base 7e5d907 (image):
💚 Looks good so far! There are no failures yet. 💚

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 Oct 20, 2025
@jerryzh168
Copy link
Contributor Author

currently waiting for the fbgemm conv op to be available in nightly

uv pip install --pre fbgemm-gpu-genai --index-url https://download.pytorch.org/whl/nightly/cu128

@jerryzh168 jerryzh168 changed the title Add per tensor fp8 quantization support conv3d Add per tensor fp8 quantization support for conv3d Oct 21, 2025
@jerryzh168 jerryzh168 force-pushed the add-fp8-conv-weight-quant-support branch 4 times, most recently from 2569be1 to b5c8ca5 Compare October 27, 2025 20:53
@jerryzh168 jerryzh168 added the topic: new feature Use this tag if this PR adds a new feature label Oct 27, 2025
@jerryzh168 jerryzh168 force-pushed the add-fp8-conv-weight-quant-support branch from b5c8ca5 to 2ccc619 Compare October 27, 2025 20:54
@jerryzh168 jerryzh168 marked this pull request as ready for review October 27, 2025 20:55
Summary:
att, we added support of quantization conv3d weights, with
Float8DynamicActivationFloat8WeightConfig

API:
```
config = Float8DynamicActivationFloat8WeightConfig(
   granularity=PerTensor(),
)

_is_conv3d = lambda m, fqn: isinstance(m, torch.nn.Conv3d)

quantize_(quantized_model, config, filter_fn=_is_conv3d)
```

Test Plan:
pytest test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_fp8_conv_variants

Reviewers:

Subscribers:

Tasks:

Tags:
@jerryzh168 jerryzh168 force-pushed the add-fp8-conv-weight-quant-support branch from 2ccc619 to 4c6e979 Compare October 28, 2025 00:35
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. topic: new feature Use this tag if this PR adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants