Skip to content

Conversation

@Victor-C-Zhang
Copy link
Contributor

Summary: Tests that cover the full suite of functionality for materialized params, including an optimization for duplicate materialzations.

Differential Revision: D89242003

@meta-cla meta-cla bot added the cla signed label Dec 22, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 22, 2025

@Victor-C-Zhang has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89242003.

Victor-C-Zhang added a commit to Victor-C-Zhang/openzl-1 that referenced this pull request Dec 22, 2025
Summary:

Tests that cover the full suite of functionality for materialized params, including an optimization for duplicate materialzations.

Differential Revision: D89242003
Summary:

Create a new API to materialize params from localparams. This relies on a new functionality associated with the ZL_Compressor to manage allocated objects.

A materialized param is a new type of local parameter object that is fundamentally an object in memory. This object's constructor and destructor functions shall be specified in the new `ZL_MaterializerDesc` struct passed to a node registration.

At the time of registration and subsequent node parameterizations^, the constructor function is called to create this new object in memory. This new object will live as long as the ZL_Compressor. When a CCtx uses this Compressor to compress, the associated node will be able to access the materialized object using the `ZL_Encoder_getMaterializedParam()` function.

As a consequence of these two requirements
> the generation *must* be deterministic and hermetic
> the ref ZL_CCtx may provide concurrent access to materialized objects

We may optimize construction of materialized params by eliding duplicate calls of the same function on the same params. Instead, we may just return two pointers to an object we create once. Wow!

Equality of LocalParams uses its built-in hash function.

^ not all parameterizations will necessarily result in a construction. See next diff in stack.

Differential Revision: D89093023
Summary:

Tests that cover the full suite of functionality for materialized params, including an optimization for duplicate materialzations.

Differential Revision: D89242003
Victor-C-Zhang added a commit to Victor-C-Zhang/openzl-1 that referenced this pull request Dec 24, 2025
Summary:

Tests that cover the full suite of functionality for materialized params, including an optimization for duplicate materialzations.

Differential Revision: D89242003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant