Skip to content

perf(embedding): initialize logical input and result payloads - #32

Merged
aunjgr merged 2 commits into
matrixorigin:upstream-dev-mergefrom
aunjgr:fix/embedding-logical-payload-initialization
Oct 13, 2026
Merged

aunjgr merged 2 commits into
matrixorigin:upstream-dev-mergefrom
aunjgr:fix/embedding-logical-payload-initialization

Conversation

@aunjgr

@aunjgr aunjgr commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Small selective MO reader batches currently clear every rounded pinned-pool block. A short payload therefore pays for clearing allocation padding that is never part of the public input or GPU upload.

Move initialization to input and result acquisition, clearing only the logical payload. Unwritten logical bytes and result-layout gaps remain zero; unused physical padding remains untouched. Physical blocks and descriptors retain their existing accounting and ownership. The shared initializer is internal and nonvirtual; the public C ABI is unchanged.

Refs matrixorigin/matrixone#28966 and matrixorigin/matrixone#28968. The consumer integration is matrixorigin/matrixone#30021. This PR is independent of the grouped-aggregation optimization.

Validation on the frozen MO Pixi provider, using isolated incremental builds over merged native b953bb5a:

  • Input/result control suite: 33 cases, 384 assertions, normal and ASan+UBSan pass. Poisoned multi-block storage checks zeroed payload, untouched padding, unaddressable padding, and credit release after injected initialization failure.
  • Full owning native GPU suite: 35 cases, 34,640 assertions pass, including actual input, result packing, cancellation/reuse, numeric states, and TAE consumers.
  • GPU input/admission memcheck: all four cases and 11,055 assertions pass. Raw sanitizer exit is 99 for one duplicate CUB EmptyKernel registration; the clean unmodified b953bb5a control produces the same diagnostic. This is qualified control evidence, not a zero-error sanitizer claim.
  • Pinned changed-file hooks, clang-format 20.1.4, Markdown checks, and diff checks pass.

These native test builds do not constitute a guarded release SDK or public TPC-H qualification. After merge, #30021 will pin merged source and run fresh matched release correctness, resource, and performance campaigns.

@aunjgr
aunjgr marked this pull request as ready for review October 12, 2026 19:59
@aunjgr
aunjgr merged commit 87aaaa2 into matrixorigin:upstream-dev-merge Oct 13, 2026
6 of 9 checks passed
zuyu pushed a commit that referenced this pull request Oct 14, 2026
* docs(embedding): record logical payload initialization design

* perf(embedding): initialize logical input and result payloads
zuyu pushed a commit that referenced this pull request Oct 21, 2026
* docs(embedding): record logical payload initialization design

* perf(embedding): initialize logical input and result payloads
zuyu pushed a commit that referenced this pull request Oct 22, 2026
* docs(embedding): record logical payload initialization design

* perf(embedding): initialize logical input and result payloads
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