Skip to content

Refactor quantization module: Remove PT2E quantization support - #2610

Merged
chensuyue merged 8 commits into
mainfrom
xinhe/remove_pt2e
Oct 10, 2026
Merged

chensuyue merged 8 commits into
mainfrom
xinhe/remove_pt2e

Conversation

@xin3he

@xin3he xin3he commented Oct 9, 2026

Copy link
Copy Markdown
Contributor
  • Deleted the pt2e_export.py file and its associated export functions.
  • Updated the __init__.py files to remove references to PT2E quantization.
  • Removed dynamic quantization configuration and related classes from the quantization config.
  • Cleaned up algorithm entry points by removing PT2E specific entries.
  • Updated save/load functions to eliminate PT2E dependencies.
  • Removed related tests for PT2E quantization.

Type of Change

feature/bug fix/documentation/validation/others

Description

detail description

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

xin3he and others added 3 commits October 9, 2026 10:45
- Deleted the `pt2e_export.py` file and its associated export functions.
- Updated the `__init__.py` files to remove references to PT2E quantization.
- Removed dynamic quantization configuration and related classes from the quantization config.
- Cleaned up algorithm entry points by removing PT2E specific entries.
- Updated save/load functions to eliminate PT2E dependencies.
- Removed related tests for PT2E quantization.

Signed-off-by: Xin He <xin3.he@intel.com>
…and remove direct dependency

Signed-off-by: Xin He <xin3.he@intel.com>
@xin3he
xin3he requested review from chensuyue and a balanced review from Copilot and removed request for chensuyue October 9, 2026 02:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Documentation still contains broken PT2E links, and the new optional torchao path lacks regression coverage.

1 open finding
What changed in this PR

Removes PyTorch PT2E quantization support and makes torchao optional for remaining CPU FP8 functionality.

Changes:

  • Removes PT2E implementation, APIs, configuration, tests, and documentation.
  • Routes static quantization exclusively through IPEX.
  • Lazily imports torchao for CPU FP8 operations.
File Description
test/​torch/​quantization/​test_pt2e_quant.py Removes PT2E integration tests.
test/​torch/​algorithms/​pt2e_quant/​test_pt2e_w8a8.py Removes W8A8 PT2E tests.
test/​torch/​algorithms/​pt2e_quant/​test_half_precision_rewriter.py Removes rewriter tests.
requirements_pt.txt Removes torchao dependency.
neural_compressor/​torch/​utils/​constants.py Removes PT2E constants.
neural_compressor/​torch/​quantization/​save_load_entry.py Removes PT2E loading.
neural_compressor/​torch/​quantization/​config.py Removes dynamic PT2E configuration.
neural_compressor/​torch/​quantization/​algorithm_entry.py Removes PT2E algorithm entries.
neural_compressor/​torch/​quantization/​__init__.py Removes dynamic configuration exports.
neural_compressor/​torch/​export/​pt2e_export.py Removes PT2E export implementation.
neural_compressor/​torch/​export/​__init__.py Removes PT2E export APIs.
neural_compressor/​torch/​algorithms/​pt2e_quant/​utility.py Removes PT2E utilities.
neural_compressor/​torch/​algorithms/​pt2e_quant/​save_load.py Removes PT2E persistence.
neural_compressor/​torch/​algorithms/​pt2e_quant/​pt2e_compat.py Removes compatibility imports.
neural_compressor/​torch/​algorithms/​pt2e_quant/​half_precision_rewriter.py Removes graph rewriting.
neural_compressor/​torch/​algorithms/​pt2e_quant/​core.py Removes PT2E quantizer.
neural_compressor/​torch/​algorithms/​pt2e_quant/​__init__.py Removes package exports.
neural_compressor/​torch/​algorithms/​fp8_quant/​_core/​quantized_func_wrappers/​cpu/​cpu_quantized_func_wrapper.py Lazily imports torchao.
docs/​source/​PT_StaticQuant.md Removes PT2E static guidance.
docs/​source/​PT_DynamicQuant.md Removes dynamic PT2E documentation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chensuyue chensuyue added this to the 3.10.1 milestone Oct 9, 2026
xin3he and others added 5 commits October 9, 2026 13:50
Signed-off-by: Xin He <xin3.he@intel.com>
…antization, and enhance transformers-like API section

Signed-off-by: Xin He <xin3.he@intel.com>
Signed-off-by: Xin He <xin3.he@intel.com>
@chensuyue
chensuyue merged commit 431a0fb into main Oct 10, 2026
16 of 22 checks passed
@chensuyue
chensuyue deleted the xinhe/remove_pt2e branch October 10, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants