-
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
Open
jainapurva
wants to merge
21
commits into
main
Choose a base branch
from
add_torch2.9_tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔗 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 <huydhn@gmail.com>
* build common used toy linear model Co-authored-by: Jerry Zhang <jerryzh168@gmail.com> * 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 <jerryzh@devgpu009.kcm2.facebook.com>
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add regression test to test torchao against the latest torch 2.9.1
Minor update: Change torch from 2.7.0 -> 2.7.1