You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebNN currently specifies that a DataError be thrown for all sorts of input validation failures. This is not in line with most other specs, which use TypeError for this.
I'd like to propose that most all platform-agnostic input validation checks (with the MLGraphBuilder operand-vending methods foremost in mind) should throw a TypeError on failure. A non-exhaustive list of validation checks which should throw TypeError include:
* Throw TypeError for most all input validation
A few instances use RangeError
Fixes#583
* make some RangeErrors TypeErrors, and vice versa
* just kidding, remove all RangeErrors
Building off of #572 (comment)
DOMException
spec for reference: https://webidl.spec.whatwg.org/#idl-exceptionsWebNN currently specifies that a
DataError
be thrown for all sorts of input validation failures. This is not in line with most other specs, which useTypeError
for this.I'd like to propose that most all platform-agnostic input validation checks (with the
MLGraphBuilder
operand-vending methods foremost in mind) should throw aTypeError
on failure. A non-exhaustive list of validation checks which should throwTypeError
include:MLOperandDescriptor
fieldssequence<T>
is of a valid lengthThe text was updated successfully, but these errors were encountered: