-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce MLNumber for specifying numeric inputs of any type #647
Merged
huningxin
merged 52 commits into
webmachinelearning:main
from
inexorabletash:bigint-numeric-union
Jul 5, 2024
Merged
Introduce MLNumber for specifying numeric inputs of any type #647
huningxin
merged 52 commits into
webmachinelearning:main
from
inexorabletash:bigint-numeric-union
Jul 5, 2024
Commits on Apr 18, 2024
-
Introduce MLNumber for specifying numeric inputs of any type
For some MLGraphBuilder methods the type of a numeric input can vary - e.g. for constant() an explicit MLOperandDataType is provided; for clamp() and pad() the data type is implied by input operands. In these cases, specifying the numeric value as either a float/double or int64 type runs into accuracy or range issues - you can't accurately represent all int64 values as a double, and you can't represent the full range of floats as int64. (You also can't represent all int64 values as an long long either - over 2^53 things get wierd. But that's a digression.) Per discussion in whatwg/webidl#1388 this change introduces a union between a bigint type and unrestricted double called MLNumber. Callers can pass a JS number (1234, 1.1234e38) or a JS bigint (9007199254740993n), and the implementation will treat it properly based on the explicit or implicit MLOperandDataType. Usage of this type should be limited to only those cases. Fixes webmachinelearning#442 Note that webmachinelearning#492 proposes changes to the constant sequential filling operation; this just adds IDL to match the current spec prose. Some of the concerns raised in webmachinelearning#325 are addressed (e.g. clamp()'s options). However, several other options are still specified as "float", and should maybe be "double" - but MLNumber is likely not appropriate for those, so they are not updated here.
Configuration menu - View commit details
-
Copy full SHA for f83ecfd - Browse repository at this point
Copy the full SHA f83ecfdView commit details
Commits on Apr 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 29d5191 - Browse repository at this point
Copy the full SHA 29d5191View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67b5a68 - Browse repository at this point
Copy the full SHA 67b5a68View commit details
Commits on Apr 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for adb5742 - Browse repository at this point
Copy the full SHA adb5742View commit details
Commits on Apr 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a36d97f - Browse repository at this point
Copy the full SHA a36d97fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a8b3d8 - Browse repository at this point
Copy the full SHA 8a8b3d8View commit details
Commits on Apr 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dc655a6 - Browse repository at this point
Copy the full SHA dc655a6View commit details
Commits on Apr 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c47b31d - Browse repository at this point
Copy the full SHA c47b31dView commit details
Commits on Apr 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 88a29b1 - Browse repository at this point
Copy the full SHA 88a29b1View commit details
Commits on Apr 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bf32b3f - Browse repository at this point
Copy the full SHA bf32b3fView commit details
Commits on May 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6072331 - Browse repository at this point
Copy the full SHA 6072331View commit details
Commits on May 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c873c35 - Browse repository at this point
Copy the full SHA c873c35View commit details
Commits on May 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 07aaedc - Browse repository at this point
Copy the full SHA 07aaedcView commit details
Commits on May 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 84b4cfc - Browse repository at this point
Copy the full SHA 84b4cfcView commit details
Commits on May 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4c2a041 - Browse repository at this point
Copy the full SHA 4c2a041View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3389f87 - Browse repository at this point
Copy the full SHA 3389f87View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35453d6 - Browse repository at this point
Copy the full SHA 35453d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc0a090 - Browse repository at this point
Copy the full SHA fc0a090View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3ff823 - Browse repository at this point
Copy the full SHA a3ff823View commit details
Commits on May 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for aa5d31f - Browse repository at this point
Copy the full SHA aa5d31fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 28707fe - Browse repository at this point
Copy the full SHA 28707feView commit details
Commits on May 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5061a8c - Browse repository at this point
Copy the full SHA 5061a8cView commit details
Commits on May 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0452b10 - Browse repository at this point
Copy the full SHA 0452b10View commit details
Commits on May 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ab54710 - Browse repository at this point
Copy the full SHA ab54710View commit details -
WIP for webmachinelearning#678
- Introduce a "cast" definition that takes a number and a type, and returns the number cast to that type. - Invoke cast during MLOperand and MLActivation creation. TODO: - Passing restrictions - Floating point - allow Infinities/NaNs or not? - Integer - throw or clamp if out of range? - Simplify supported restrictions - resample2d sizes option - is this part of the op data or not?
Configuration menu - View commit details
-
Copy full SHA for 9f0dd89 - Browse repository at this point
Copy the full SHA 9f0dd89View commit details -
Configuration menu - View commit details
-
Copy full SHA for 588f7ac - Browse repository at this point
Copy the full SHA 588f7acView commit details
Commits on May 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6278afc - Browse repository at this point
Copy the full SHA 6278afcView commit details
Commits on May 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a357c10 - Browse repository at this point
Copy the full SHA a357c10View commit details
Commits on May 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 98a6263 - Browse repository at this point
Copy the full SHA 98a6263View commit details
Commits on Jun 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 77816a3 - Browse repository at this point
Copy the full SHA 77816a3View commit details
Commits on Jun 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4f1ebc9 - Browse repository at this point
Copy the full SHA 4f1ebc9View commit details
Commits on Jun 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c972a88 - Browse repository at this point
Copy the full SHA c972a88View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2a7de3 - Browse repository at this point
Copy the full SHA f2a7de3View commit details
Commits on Jun 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4a58736 - Browse repository at this point
Copy the full SHA 4a58736View commit details
Commits on Jun 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 83a8c46 - Browse repository at this point
Copy the full SHA 83a8c46View commit details
Commits on Jun 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7c9fc64 - Browse repository at this point
Copy the full SHA 7c9fc64View commit details
Commits on Jun 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 47d8b6c - Browse repository at this point
Copy the full SHA 47d8b6cView commit details
Commits on Jun 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f0e6f85 - Browse repository at this point
Copy the full SHA f0e6f85View commit details
Commits on Jun 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6c7215a - Browse repository at this point
Copy the full SHA 6c7215aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f313b0 - Browse repository at this point
Copy the full SHA 5f313b0View commit details
Commits on Jun 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2cce26e - Browse repository at this point
Copy the full SHA 2cce26eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7f8da4 - Browse repository at this point
Copy the full SHA d7f8da4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3120474 - Browse repository at this point
Copy the full SHA 3120474View commit details
Commits on Jun 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 024f576 - Browse repository at this point
Copy the full SHA 024f576View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5345fb - Browse repository at this point
Copy the full SHA e5345fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 18dd7e3 - Browse repository at this point
Copy the full SHA 18dd7e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f75f2b - Browse repository at this point
Copy the full SHA 6f75f2bView commit details
Commits on Jul 1, 2024
-
Remove MLActivation text for MLNumber as it is unused
No MLActivations take MLNumber, so this paragraph doesn't make sense. Also, add a brief intro to the cast algorithm section.
Configuration menu - View commit details
-
Copy full SHA for b5c7d4b - Browse repository at this point
Copy the full SHA b5c7d4bView commit details
Commits on Jul 3, 2024
-
Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>
Configuration menu - View commit details
-
Copy full SHA for 1934d25 - Browse repository at this point
Copy the full SHA 1934d25View commit details -
Restore MLNumber reference lost in merge
Co-authored-by: Ningxin Hu <ningxin.hu@intel.com>
Configuration menu - View commit details
-
Copy full SHA for c353079 - Browse repository at this point
Copy the full SHA c353079View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5f299d - Browse repository at this point
Copy the full SHA a5f299dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e06299 - Browse repository at this point
Copy the full SHA 2e06299View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.