Skip to content

[xlscc] Use (item, valid) tuple type for masked non-blocking receives - #5540

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1002542470
Draft

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1002542470

Conversation

@copybara-service

Copy link
Copy Markdown

[xlscc] Use (item, valid) tuple type for masked non-blocking receives

In Translator::AddOpToChannel, the masked path (taken for a channel
op translated under a known-zero condition via do_default_mask, or
while IO is masked, for example during the trial run that precedes a
partially unrolled loop) constructed op.input_value using
channel->item_type even for non-blocking receives, whose input value
is the (item, bool) tuple. The CValue type check then aborted
translation whenever a non-blocking read was masked.

Build the masked op.input_value with param_type, matching the
unmasked path below, and return UnimplementedError if a masked
OpType::kSharedCall (which has a null channel) reaches
AddOpToChannel.

Add tests for a non-blocking read under a constant-false condition and
under a runtime condition inside a trial-unrolled loop. Both abort with
the previous item type.

In `Translator::AddOpToChannel`, the masked path (taken for a channel
op translated under a known-zero condition via `do_default_mask`, or
while IO is masked, for example during the trial run that precedes a
partially unrolled loop) constructed `op.input_value` using
`channel->item_type` even for non-blocking receives, whose input value
is the `(item, bool)` tuple. The `CValue` type check then aborted
translation whenever a non-blocking read was masked.

Build the masked `op.input_value` with `param_type`, matching the
unmasked path below, and return `UnimplementedError` if a masked
`OpType::kSharedCall` (which has a null channel) reaches
`AddOpToChannel`.

Add tests for a non-blocking read under a constant-false condition and
under a runtime condition inside a trial-unrolled loop. Both abort with
the previous item type.

PiperOrigin-RevId: 1002542470

This branch has not been deployed

No deployments
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