Skip to content

Enforce validation when creating an MLOperandDescriptor - #955

Merged
fdwr merged 4 commits into
webmachinelearning:mainfrom
shiyi9801:validate_lstm_gru
Oct 8, 2026
Merged

fdwr merged 4 commits into
webmachinelearning:mainfrom
shiyi9801:validate_lstm_gru

Conversation

@shiyi9801

@shiyi9801 shiyi9801 commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Fix #949

This PR makes create an MLOperandDescriptor validate the resulting shape via checking dimensions, so oversized outputs are rejected during graph building. concat(), reshape(), pad(), and the pooling ops are restructured to construct their descriptor from the final computed shape instead of mutating one created earlier.

This PR also adds unconditional validation for the full-sequence output of gru()/lstm(), which some platforms produce regardless of the returnSequence flag.


Preview | Diff

Comment thread index.bs
@shiyi9801 shiyi9801 changed the title Validate LSTM/GRU full-sequence output regardless of the returnSequence flag Enforce validation when creating an MLOperandDescriptor Sep 14, 2026
@anssiko

anssiko commented Sep 28, 2026

Copy link
Copy Markdown
Member

@shiyi9801 just confirming the shape of this PR is fine and is covered by the existing resolution.

After the PR review comments are addressed, this can be merged.

Thank you for your contributions that make the API more secure.

@huningxin huningxin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fdwr fdwr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

馃憤

@fdwr
fdwr merged commit d9a9a1b into webmachinelearning:main Oct 8, 2026
2 checks passed
github-actions Bot added a commit that referenced this pull request Oct 8, 2026
SHA: d9a9a1b
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Validate LSTM/GRU full-sequence output regardless of the returnSequence flag

4 participants