webmachinelearning / webnn

🧠 Web Neural Network API
https://www.w3.org/TR/webnn/
Other
397 stars 48 forks source link

Synchronously validate input operands/validations #605

Closed inexorabletash closed 8 months ago

inexorabletash commented 8 months ago

Previously the spec had a "validate MLOperand" helper that (1) ensured the operand was from the passed MLGraphBuilder and (2) that the operand was internally consistent, and this was called during (3) build() and (4) only concat() among the vending methods.

This renames the helper, ensures it is called by every MLOperand vending method that takes MLOperand inputs, and drops it from build(). Similar validation is added for MLActivation inputs.

For #572


Preview | Diff