Skip to content

remove the set_inductor_config argument of quantize_.#1865

Merged
vkuzo merged 96 commits intomainfrom
gh/vkuzo/65/head
Mar 12, 2025
Merged

remove the set_inductor_config argument of quantize_.#1865
vkuzo merged 96 commits intomainfrom
gh/vkuzo/65/head

Conversation

@vkuzo
Copy link
Copy Markdown
Contributor

@vkuzo vkuzo commented Mar 10, 2025

Summary:

Finishing the migration in #1715. Specifically:

  • the set_inductor_config argument of quantize_ is removed
  • the following workflows get a set_inductor_config argument, defaulting to True: AWQUIntXConfig, IntNWeightOnlyConfig, SmoothQuantConfig, Int8DynamicActivationInt4WeightConfig, Int4DynamicActivationInt4WeightConfig, GemliteUIntXWeightOnlyConfig, Int4WeightOnlyConfig, Int8WeightOnlyConfig, Int8DynamicActivationInt8WeightConfig, Float8WeightOnlyConfig, Float8DynamicActivationFloat8WeightConfig, Float8DynamicActivationFloat8WeightConfig, Float8StaticActivationFloat8WeightConfig, Float8StaticActivationFloat8WeightConfig, UIntXWeightOnlyConfig, FPXWeightOnlyConfig. I skipped quantized training and non-AQT workflows from this, since I expect them to not need this setting.

Before

def quantize_(
    model: torch.nn.Module,
    config: AOBaseConfig,
    filter_fn: Optional[Callable[[torch.nn.Module, str], bool]] = None,
    set_inductor_config: Optional[bool] = None,
    device: Optional[torch.types.Device] = None,
):  ...

After

def quantize_(
    model: torch.nn.Module,
    config: AOBaseConfig,
    filter_fn: Optional[Callable[[torch.nn.Module, str], bool]] = None,
    device: Optional[torch.types.Device] = None,
):  ...

# see top of PR description for list of affected configs
class Int8DynamicActivationInt4WeightConfig(AOBaseConfig):
    ...
    set_inductor_config: bool = True

Test Plan:

pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics

Reviewers:

Subscribers:

Tasks:

Tags:

vkuzo added 30 commits March 7, 2025 06:48
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 3 commits March 12, 2025 10:17
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 12, 2025
Summary:

Test Plan:

```
pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6694cc
ghstack-comment-id: 2712016215
Pull Request resolved: #1865
vkuzo added 5 commits March 12, 2025 13:56
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 12, 2025
Summary:

Test Plan:

```
pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6694cc
ghstack-comment-id: 2712016215
Pull Request resolved: #1865
vkuzo added 4 commits March 12, 2025 13:57
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 12, 2025
Summary:

Test Plan:

```
pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6694cc
ghstack-comment-id: 2712016215
Pull Request resolved: #1865
vkuzo added 3 commits March 12, 2025 13:58
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 12, 2025
Summary:

Test Plan:

```
pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6694cc
ghstack-comment-id: 2712016215
Pull Request resolved: #1865
vkuzo added 2 commits March 12, 2025 13:59
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 12, 2025
Summary:

Test Plan:

```
pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6694cc
ghstack-comment-id: 2712016215
Pull Request resolved: #1865
[ghstack-poisoned]
@vkuzo vkuzo changed the base branch from gh/vkuzo/64/head to main March 12, 2025 20:59
vkuzo added a commit that referenced this pull request Mar 12, 2025
Summary:

Test Plan:

```
pytest test/quantization/test_quant_api.py -s -x -k test_workflow_e2e_numerics
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6694cc
ghstack-comment-id: 2712016215
Pull Request resolved: #1865
@vkuzo vkuzo merged commit 0eea64a into main Mar 12, 2025
tfqaprod pushed a commit to intel/ai-reference-models that referenced this pull request Mar 13, 2025
…h (#2681)

In pytorch/ao#1865, torchao removed `set_inductor_config` argument from `torchao.quantization.quant_api.quantize_`

Co-authored-by: Srikanth Ramakrishna <srikanth.ramakrishna@intel.com>
liangel-02 pushed a commit that referenced this pull request Aug 25, 2025
* 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]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]
claynerobison pushed a commit to intel/ai-reference-models that referenced this pull request Dec 30, 2025
…h (#2681)

In pytorch/ao#1865, torchao removed `set_inductor_config` argument from `torchao.quantization.quant_api.quantize_`

Co-authored-by: Srikanth Ramakrishna <srikanth.ramakrishna@intel.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. module: bc-breaking Use this tag if this PR breaks backward compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants