-
Notifications
You must be signed in to change notification settings - Fork 369
Add torch 2.9 in regression tests #3311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🔗 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 FailuresAs of commit d2192b1 with merge base e2aab90 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
… 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
Signed-off-by: Huy Do <[email protected]>
* 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]>
| 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") |
There was a problem hiding this comment.
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?
Add regression test to test torchao against the latest torch 2.9.1
Minor update: Change torch from 2.7.0 -> 2.7.1