Skip to content

Change composite names for JAX and refactor int8 #2431

Merged
anko-intel merged 8 commits intomasterfrom
dev/bkowalsk/jax_int8_pr
Apr 16, 2026
Merged

Change composite names for JAX and refactor int8 #2431
anko-intel merged 8 commits intomasterfrom
dev/bkowalsk/jax_int8_pr

Conversation

@bkowalskiINTEL
Copy link
Copy Markdown
Contributor

@bkowalskiINTEL bkowalskiINTEL commented Mar 19, 2026

Type of Change

others

Description

Removed suffixes from quantize/dequantize composites - inc.quantize_int8... to inc.quantize, etc.

  • some fixes for int8

Signed-off-by: Bartosz Kowalski <bartosz.kowalski@intel.com>
Signed-off-by: Bartosz Kowalski <bartosz.kowalski@intel.com>
@bkowalskiINTEL bkowalskiINTEL force-pushed the dev/bkowalsk/jax_int8_pr branch from 5380709 to a9bfaf0 Compare April 1, 2026 15:09
Comment thread neural_compressor/jax/quantization/layers_static.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes JAX composite names for quantize/dequantize ops and applies an int8-focused refactor/workaround intended to improve XLA compatibility.

Changes:

  • Renamed jax.lax.composite names for quantize/dequantize to unified inc.quantize / inc.dequantize.
  • Refactored asymmetric dequantization arithmetic and extended get_q_params() with emulate_asymmetric; zero-point is now int32.
  • Updated static-quant layers to store activation zero-points as int32 and adjusted int8/asymmetric wiring in several prepare/convert paths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
neural_compressor/jax/utils/utility.py Composite renames; asymmetric dequant arithmetic tweak; get_q_params() API/typing changes (incl. int32 zero-point + emulation flag).
neural_compressor/jax/quantization/layers_static.py Switch activation zero-point weights to int32 and refactor int8/asymmetric paths in static quant layers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread neural_compressor/jax/utils/utility.py
Comment thread neural_compressor/jax/utils/utility.py
Comment thread neural_compressor/jax/quantization/layers_static.py
Comment thread neural_compressor/jax/quantization/layers_static.py Outdated
Comment thread neural_compressor/jax/utils/utility.py Outdated
Comment thread neural_compressor/jax/utils/utility.py Outdated
Force scales to be fp32 for int8 - temporary

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Revert "Force scales to be fp32 for int8 - temporary"

This reverts commit 3f5aaf6.

Code cleanup

Signed-off-by: Bartosz Kowalski <bartosz.kowalski@intel.com>
@bkowalskiINTEL bkowalskiINTEL force-pushed the dev/bkowalsk/jax_int8_pr branch from 33c1f69 to 052ffa5 Compare April 9, 2026 13:57
@anko-intel anko-intel force-pushed the dev/bkowalsk/jax_int8_pr branch from 47fb6e2 to a8ed876 Compare April 14, 2026 08:27
Signed-off-by: Andrzej Kotłowski <andrzej.kotlowski@intel.com>
@anko-intel anko-intel changed the title Change composite names and refactor int8 - temporary WA for xla Change composite names for JAX and refactor int8 Apr 15, 2026
@anko-intel anko-intel marked this pull request as ready for review April 15, 2026 07:26
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.

1 similar comment
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.

@anko-intel anko-intel self-requested a review April 15, 2026 07:27
Copy link
Copy Markdown
Contributor

@anko-intel anko-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.

@anko-intel anko-intel merged commit 0b975a0 into master Apr 16, 2026
14 checks passed
@anko-intel anko-intel deleted the dev/bkowalsk/jax_int8_pr branch April 16, 2026 06:05
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