Skip to content

Make numeric segmenter chunk size and head graph configurable (#603)#603

Open
Victor-C-Zhang wants to merge 2 commits into
facebook:devfrom
Victor-C-Zhang:export-D99729917
Open

Make numeric segmenter chunk size and head graph configurable (#603)#603
Victor-C-Zhang wants to merge 2 commits into
facebook:devfrom
Victor-C-Zhang:export-D99729917

Conversation

@Victor-C-Zhang
Copy link
Copy Markdown
Contributor

@Victor-C-Zhang Victor-C-Zhang commented Apr 7, 2026

Summary:

Make the numeric segmenter accept local params for the chunk byte size
and head graph, replacing the previously hardcoded values.

  • Chunk size: read via ZL_Segmenter_getLocalIntParam() using
    ZL_SEGM_NUMERIC_CHUNK_BYTE_SIZE_MAX_PID. Falls back to 16MB default
    if not provided.
  • Head graph: read via ZL_Segmenter_getCustomGraphs(). Falls back to
    ZL_GRAPH_NUMERIC_COMPRESS if no custom graph is provided.

Both changes are backward-compatible — existing callers that don't
provide these params get identical behavior to before.

Differential Revision: D99729917

@meta-cla meta-cla Bot added the cla signed label Apr 7, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 7, 2026

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

Summary:
Add a segmenter to all XLDB numeric graphs (U8/U16/U32/U64/F32) that
auto-chunks input at ~16MB boundaries, aligned to element width. This
is implemented inside makeXldbGenericIntCGraphImpl so it applies to all
int/float graph variants automatically. Fallback (ZSTD) and Store graphs are not segmented.

There is an existing numeric segmenter standard graph, but we can't use it because it doesn't allow us to specify the chunk size or inner graph. The next diff in this stack will add support in the numeric segmenter. When a new OpenZL release is issued, we will migrate to the numeric segmenter.

Differential Revision: D99729801
@meta-codesync meta-codesync Bot changed the title Make numeric segmenter chunk size and head graph configurable Make numeric segmenter chunk size and head graph configurable (#603) Apr 7, 2026
Victor-C-Zhang added a commit to Victor-C-Zhang/openzl-1 that referenced this pull request Apr 7, 2026
…ok#603)

Summary:

Make the numeric segmenter accept local params for the chunk byte size
and head graph, replacing the previously hardcoded values.

- Chunk size: read via ZL_Segmenter_getLocalIntParam() using
  ZL_SEGM_NUMERIC_CHUNK_BYTE_SIZE_MAX_PID. Falls back to 16MB default
  if not provided.
- Head graph: read via ZL_Segmenter_getCustomGraphs(). Falls back to
  ZL_GRAPH_NUMERIC_COMPRESS if no custom graph is provided.

Both changes are backward-compatible — existing callers that don't
provide these params get identical behavior to before.

Differential Revision: D99729917
…ok#603)

Summary:
Pull Request resolved: facebook#603

Make the numeric segmenter accept local params for the chunk byte size
and head graph, replacing the previously hardcoded values.

- Chunk size: read via ZL_Segmenter_getLocalIntParam() using
  ZL_SEGM_NUMERIC_CHUNK_BYTE_SIZE_MAX_PID. Falls back to 16MB default
  if not provided.
- Head graph: read via ZL_Segmenter_getCustomGraphs(). Falls back to
  ZL_GRAPH_NUMERIC_COMPRESS if no custom graph is provided.

Both changes are backward-compatible — existing callers that don't
provide these params get identical behavior to before.

Differential Revision: D99729917
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