Skip to content

Allow overriding any successor graph (#762)#762

Open
terrelln wants to merge 5 commits into
facebook:devfrom
terrelln:export-D105367885
Open

Allow overriding any successor graph (#762)#762
terrelln wants to merge 5 commits into
facebook:devfrom
terrelln:export-D105367885

Conversation

@terrelln
Copy link
Copy Markdown
Contributor

@terrelln terrelln commented May 15, 2026

Summary:

LZ must be a dynamic graph because it invokes a multi-input node (ZL_NODE_MUX_LENGTHS).
But we need to allow overriding the successors in a serialized graph for training and configurability.
So do the same thing that FieldLZ does, which sets the index of the customGraph as a local int param.
When the local int param is set, set the corresponding successor to that graph.

NOTE: A stacked diff will be exposing all newly added parameters to the C++ API.

Differential Revision: D105367885

@meta-cla meta-cla Bot added the cla signed label May 15, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 15, 2026

@terrelln has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105367885.

terrelln added 5 commits May 15, 2026 14:15
Summary:

Allow the fuzzer to find the bug in D104838040 with short inputs.

I haven't gotten the fuzzer to reproduce it yet, but in theory it should be able to.

Reviewed By: kevinjzhang

Differential Revision: D104843371
Summary:

The LZ encoder capped `matchLength()` at `UINT16_MAX` because sequence match
lengths are stored as `uint16_t`. If the match had been walked backward at least
`UINT16_MAX` bytes, then the match finding process would resume at a position
which had already been inserted into the hash table. This would result in match
with `distance <= 0` and corruption would ensue.

Reviewed By: Cyan4973

Differential Revision: D104838040
Summary:

Add negative compression level support to directly content with Zstd negative levels.

Differential Revision: D105332025
Summary: Pull Request resolved: facebook#761

Differential Revision: D104873678
Summary:

LZ must be a dynamic graph because it invokes a multi-input node (ZL_NODE_MUX_LENGTHS).
But we need to allow overriding the successors in a serialized graph for training and configurability.
So do the same thing that FieldLZ does, which sets the index of the `customGraph` as a local int param.
When the local int param is set, set the corresponding successor to that graph.

NOTE: A stacked diff will be exposing all newly added parameters to the C++ API.

Differential Revision: D105367885
@meta-codesync meta-codesync Bot changed the title Allow overriding any successor graph Allow overriding any successor graph (#762) May 15, 2026
@terrelln terrelln force-pushed the export-D105367885 branch from 4a529d0 to 86c6a21 Compare May 15, 2026 21:16
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