Skip to content

Conversation

@jainapurva
Copy link
Contributor

@jainapurva jainapurva commented Nov 7, 2025

Add regression test to test torchao against the latest torch 2.9.1

Minor update: Change torch from 2.7.0 -> 2.7.1

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 7, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit d2192b1 with merge base e2aab90 (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 Nov 7, 2025
@jainapurva jainapurva added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Nov 12, 2025
jainapurva and others added 18 commits November 13, 2025 18:15
… 16 (#3309)

Summary:
The underlying fbgemm conv3d kernel for float8 only supports channels_out/channels_in are both multiples of 16
so we skip the shapes that doesn't satisfy the requirements for now, we can expand the support to do padding
if needed in the future

Test Plan:
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_fp8_conv_skip_quant
* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]
* Remove config functions like `int4_weight_only`

**Summary:** As a follow-up to #2994,
this commit removes all quantization functions that were used
as configs. These functions were deprecated in 0.14.0 and will
be removed in the next release, 0.15.0.

**Test Plan:** CI

[ghstack-poisoned]

* Remove old TORCH_VERSION variables

**Summary:** As a follow-up to #2719,
which deprecated these variables in 0.13.0, we remove them now in
the next release 0.15.0.

**Test Plan:** CI

[ghstack-poisoned]

* Update base for Update on "Remove old TORCH_VERSION variables"


**Summary:** As a follow-up to #2719,
which deprecated these variables in 0.13.0, we remove them now in
the next release 0.15.0.

**Test Plan:** CI

[ghstack-poisoned]

* Update base for Update on "Remove old TORCH_VERSION variables"


**Summary:** As a follow-up to #2719,
which deprecated these variables in 0.13.0, we remove them now in
the next release 0.15.0.

**Test Plan:** CI

[ghstack-poisoned]
Summary:
Add fp8 conv2d support, using the same conv3d kernels, by setting the D dimension to 1.

1. unsqueeze both input and weight in dim 2 ( the D dimension)
2. call fp8 conv3d op from fbgemm `torch.ops.fbgemm.f8f8bf16_conv`
3. assert D dimension shape to be 1 and call sequeeze at dim 2: res.squeeze(2) to remove the D dimension

Test Plan:
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_unsqueeze_conv2d_weight
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_fp8_conv_variants
* build common used toy linear model
Co-authored-by: Jerry Zhang <[email protected]>

* update model to use direct input

* revert unit test skip
* Remove devtoolset install

* Update regression_test.yml

* Update regression_test.yml
* Adds __str__ to FqnToConfig to make printing more readable

Summary:

att, adds `__str__` method to `FqnToConfig` so that printing is more
legible.

For some config:
```python
config = FqnToConfig({
    "model.layers.fig.1.1": Float8DynamicActivationFloat8WeightConfig(
        granularity=PerRow(),
    ),
    "model.layers.fig.1.3": Float8DynamicActivationFloat8WeightConfig(
        granularity=PerRow(),
    ),
    "model.layers.fig.8.3": Float8DynamicActivationFloat8WeightConfig(
        granularity=PerRow(),
    ),
})
```

the output will be:
```
FqnToConfig({
    'model.layers.fig.1.1':
        Float8DynamicActivationFloat8WeightConfig(activation_dtype=torch.float8_e4m3fn, weight_dtype=torch.float8_e4m3fn, granularity=[PerRow(dim=-1), PerRow(dim=-1)], mm_config=Float8MMConfig(emulate=False, use_fast_accum=True, pad_inner_dim=False), activation_value_lb=None, activation_value_ub=None, kernel_preference=<KernelPreference.AUTO: 'auto'>, set_inductor_config=True, version=2),
    'model.layers.fig.1.3':
        Float8DynamicActivationFloat8WeightConfig(activation_dtype=torch.float8_e4m3fn, weight_dtype=torch.float8_e4m3fn, granularity=[PerRow(dim=-1), PerRow(dim=-1)], mm_config=Float8MMConfig(emulate=False, use_fast_accum=True, pad_inner_dim=False), activation_value_lb=None, activation_value_ub=None, kernel_preference=<KernelPreference.AUTO: 'auto'>, set_inductor_config=True, version=2),
    'model.layers.fig.8.3':
        Float8DynamicActivationFloat8WeightConfig(activation_dtype=torch.float8_e4m3fn, weight_dtype=torch.float8_e4m3fn, granularity=[PerRow(dim=-1), PerRow(dim=-1)], mm_config=Float8MMConfig(emulate=False, use_fast_accum=True, pad_inner_dim=False), activation_value_lb=None, activation_value_ub=None, kernel_preference=<KernelPreference.AUTO: 'auto'>, set_inductor_config=True, version=2),
})
```

also adds in a test so that you cannot specify both fqn_to_config and
module_fqn_to_config unless they are both equal.

Test Plan:
```
pytest test/quantization/test_quant_api.py -k test_fqn_config_module_config_and_fqn_config_both_specified
```

Reviewers:

Subscribers:

Tasks:

Tags:

* fix ruff check
Summary:
att, we added this to float8_inference_roofline to reuse code
but we haven't enabled the roofline feature. For now we just
need the e2e speedup time for single conv2d/conv3d against bf16
to understand the speedup expecatation

Also added B200 hardware spec.

Test Plan:
python $SCRIPT_PATH $OUTPUT_FILE \
    --recipe_name $RECIPE_NAME \
    --shape_gen_name $SHAPE_GEN_NAME \
    --M $M --K $K --N $N  \
    --D $D --H $H --W $W  \
    --kernel_size $kernel_size \
    --op_name conv3d

This doesn't run yet because OSS fbgemm can't be installed in the B200 machine

Reviewers:

Subscribers:

Tasks:

Tags:

Co-authored-by: jerryzh <[email protected]>
@jainapurva jainapurva marked this pull request as ready for review November 13, 2025 22:19
aten_pattern.graph.erase_node(node) # type: ignore[operator, union-attr]
# Also remove the _guards_fn module from the graph module if it exists
if hasattr(aten_pattern, "_guards_fn"):
delattr(aten_pattern, "_guards_fn")
Copy link
Contributor

@andrewor14 andrewor14 Nov 14, 2025

Choose a reason for hiding this comment

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

I ran into this myself yesterday. This was resolved if I upgrade to the latest main (torch-2.10.0dev), do we still need to do this? Will CI fail without this?

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: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants