Skip to content

Project native image ABI without discarding registry slice context - #1084

Merged
trissim merged 1 commit into
mainfrom
fix/flexible-native-image-abi-20261006
Oct 6, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/flexible-native-image-abi-20261006

Conversation

@trissim

@trissim trissim commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Native CuPy processing functions currently receive metadata carriers instead of their declared cupy.ndarray argument in a mixed microscopy pipeline. They execute through ArrayBridge's native wrapper and never enter the OpenHCS registry executor that projects the raw ABI. The shared PURE2D/FLEXIBLE main-flow hook was retaining every carrier regardless of who actually owned contextual slicing.

Derive that distinction from the existing raw_processing_function declaration: registry contract wrappers retain carrier context; other targets delegate to the existing nominal ABI projection, which already respects explicit carrier annotations and runtime adapters. Authored slice controls remain owned by the actual executing wrapper. No new selector, adapter, registry, or per-callable validation bypass.

This ABI repair is independent of the pending #1080 dependency release and targets current main. The production diff changes only the shared main-flow argument hook; it is byte-identical to the qualified owner at 5ed8cfdd0. One pre-existing fixture's eager-output type assertion is replaced with the existing metadata-carrier capability; pixel and source-plane provenance checks remain intact.

Validation: 112 tests pass across registry runtime payloads, callable ABI preparation, and CellProfiler function-contract execution. Native-array full-stack and slice controls, explicitly carrier-typed functions, registered contextual slicing and adapter behavior remain covered.

Combined with the separately qualified #1080 composition repair, the real GPU receiving route completes CPU Gaussian smoothing → GPU sharpening → skipped CPU invocation → GPU percentile normalization → CPU smoothing on saved 3D-monolayer microscopy channels, including raw/unit-interval named inputs, mixed device placement and masks. Output matches direct execution of the same production processing functions exactly; masks, checkpoint cache identity and disk roundtrip pass. At source 5ed8cfdd0 the canonical conversion census records 10 bulk transfers/2,621,440 bytes; GPU→GPU, skipped invocation, checkpoint and disk add none. This is a correctness/conversion census, not a speedup claim. Original 684f140 fails at native GPU ABI; pre-P5 df6fd74 also fails earlier at mask projection, so failed prefixes are not presented as comparable full runtimes.

Local reproducible receiving script: /home/ts/.local/state/openhcs-maintenance/20261006/p5-mixed-scientific-pipeline-receiving.py; complete current receipt/profile/oracle outputs: p5-mixed-scientific-native-abi-v2/ beside it. Existing GPU venv, CUDA libraries, original scientific input hashes and production owner hashes are preserved. Promoted colour-image execution remains a separate capability gap because this environment lacks CuCIM and the selected built-in functions require 3D grayscale stacks.

Separate remaining cost identified: input bundle data and mask accesses each compose the same members, causing duplicate CPU-member uploads. This repair introduces no lifetime cache or unrelated composition changes.

Closes #1083

@trissim
trissim marked this pull request as ready for review October 6, 2026 22:31
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Retain image context for existing registered contract wrappers, and derive native callable arguments through the shared ABI owner. Refs #1083.
@trissim
trissim force-pushed the fix/flexible-native-image-abi-20261006 branch from 5ed8cfd to b98c14a Compare October 6, 2026 22:39
@trissim
trissim changed the base branch from fix/native-payload-domain-composition-20261006 to main October 6, 2026 22:39
@trissim
trissim merged commit 478942f into main Oct 6, 2026
2 of 37 checks passed
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.

Project native image ABI at flexible processing boundary without losing registry slice context

2 participants