Skip to content

[QwixStructuralInterception] Enable structural binding for PrimitiveBindOp to support transpose op removal and allow for robust ODML metadata propagation.#211

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_867809631

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Feb 10, 2026

[QwixStructuralInterception] Enable structural binding for PrimitiveBindOp to support transpose op removal and allow for robust ODML metadata propagation.

This CL refactors the interception logic to support multiple interceptors (e.g., structural + numerical) and disables JIT for primitive binding. This enables catching all transpose operations at the primitive level, eliminating the maintenance burden of manually mapping every transpose op variant.

Key changes:

  • interception.py:
    Added support for interceptor stacking.
    Replaced hardcoded JIT disabling with a generic PRIMITIVE_BIND_KEY check.
  • model.py:
    Unified Linen/NNX interception in _apply_interceptors, applying structural then numerical interceptors.
  • odml.py & odml_ops.py:
    Configured ODML providers to return multiple interceptors, including PrimitiveBindOp.

@copybara-service copybara-service bot force-pushed the test_867809631 branch 3 times, most recently from c737279 to cc4b174 Compare February 13, 2026 00:58
…indOp to support transpose op removal and allow for robust ODML metadata propagation.

This CL refactors the interception logic to support multiple interceptors (e.g., structural + numerical) and disables JIT for primitive binding. This enables catching all transpose operations at the primitive level, eliminating the maintenance burden of manually mapping every transpose op variant.

Key changes:
- interception.py:
Added support for interceptor stacking.
Replaced hardcoded JIT disabling with a generic PRIMITIVE_BIND_KEY check.
- model.py:
Unified Linen/NNX interception in _apply_interceptors, applying structural then numerical interceptors.
- odml.py & odml_ops.py:
Configured ODML providers to return multiple interceptors, including PrimitiveBindOp.

PiperOrigin-RevId: 867809631
@copybara-service copybara-service bot changed the title [QwixOdmlBind] Implement robust metadata propagation for Qwix ODML by intercepting jax.core.Primitive.bind. [QwixStructuralInterception] Enable structural binding for PrimitiveBindOp to support transpose op removal and allow for robust ODML metadata propagation. Feb 13, 2026
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.

1 participant