webmachinelearning / webnn

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

Update dimension valid range to signed integer #738

Closed philloooo closed 4 months ago

philloooo commented 4 months ago

fixes #734

Update valid dimension definition to be in the range of long and greater than 0.

@fdwr @huningxin


Preview | Diff

fdwr commented 4 months ago

It occurs to me the existing verbiage "Implementations may impose a smaller upper bound" technically already covered this case, since CoreML and TFLite impose a smaller bound (2 billion) than the DML EP (4 billion). Though, I'm content with this restriction, since 2 billion is well more than enough for a single dimension (never saw a model that even came close to that in half a decade for a single tensor).