[POC] Back libcudf scalars with one-row column storage - #23765
Draft
GregoryKimball wants to merge 10 commits into
Draft
[POC] Back libcudf scalars with one-row column storage#23765GregoryKimball wants to merge 10 commits into
GregoryKimball wants to merge 10 commits into
Conversation
Cover numeric, decimal, string, and list materialization before replacing their independent storage representations.
Unify fixed-width, decimal, string, list, and struct scalar ownership with Arrow-compatible column storage so scalar views are allocation-free and host validity checks no longer synchronize.
Pass the scalar's owned one-row view directly so AST literals avoid materializing an auxiliary column while retaining exact nullability.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Keep zero-copy storage for AST literals whose owners outlive execution while materializing internally synthesized scalars such as rescale parameters.
Remove scalar conversion allocations and const casts by consuming owned one-row views directly, including null-aware string operations.
Remove scalar conversion allocations and const casts by comparing directly against owned one-row column views.
Read sequence inputs through one-row column device views, removing typed scalar adapters and const casts.
Retain scalar-backed column device views at call sites and broadcast row zero through standard column iterators, removing typed scalar adapters and const casts.
Read separators and null replacements through retained one-row column device views, removing string scalar adapters and const casts.
Expose mutable one-row column views for scalar value producers while keeping host null counts authoritative and requiring explicit reconciliation after device mask writes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
cudf::scalarandcudf::columncurrently use incompatible device layouts:bool, so host-sideis_valid()requires synchronization ([FEA]cudf::scalarcacheis_validto reduce amount of stream syncs #8064) and cannot safely serve as a column bitmask ([BUG] Possible bug with fixed-point scalar handling in some binary operators #22757, Fix scalar as column view for null scalars #22773).get_scalar_device_viewdoesn't supportconst scalar#4365).scalar_column_viewalready demonstrates the desired representation. Reusing one-row columns in AST/JIT avoids thousands of copies and has shown speedups up to 27x ([BUGFIX] Fix handling of scalar inputs in transform and row_ir #21443, [FEA] Add support for scalar column views in AST expressions and JIT execution #23615), but ordinary scalars still use the old storage model.Sumary
This substantially addresses:
Checklist