Skip to content
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

Commits on Apr 18, 2024

  1. 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.
    inexorabletash committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    f83ecfd View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Configuration menu
    Copy the full SHA
    29d5191 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    67b5a68 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. Configuration menu
    Copy the full SHA
    adb5742 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. Configuration menu
    Copy the full SHA
    a36d97f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a8b3d8 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. Configuration menu
    Copy the full SHA
    dc655a6 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2024

  1. Configuration menu
    Copy the full SHA
    c47b31d View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. Configuration menu
    Copy the full SHA
    88a29b1 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    bf32b3f View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    6072331 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Configuration menu
    Copy the full SHA
    c873c35 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Configuration menu
    Copy the full SHA
    07aaedc View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. Configuration menu
    Copy the full SHA
    84b4cfc View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Configuration menu
    Copy the full SHA
    4c2a041 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3389f87 View commit details
    Browse the repository at this point in the history
  3. Capitalize WebIDL ref

    inexorabletash committed May 7, 2024
    Configuration menu
    Copy the full SHA
    35453d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fc0a090 View commit details
    Browse the repository at this point in the history
  5. Add MLFiniteNumber

    inexorabletash committed May 7, 2024
    Configuration menu
    Copy the full SHA
    a3ff823 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Configuration menu
    Copy the full SHA
    aa5d31f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    28707fe View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Configuration menu
    Copy the full SHA
    5061a8c View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Configuration menu
    Copy the full SHA
    0452b10 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Configuration menu
    Copy the full SHA
    ab54710 View commit details
    Browse the repository at this point in the history
  2. 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?
    inexorabletash committed May 14, 2024
    Configuration menu
    Copy the full SHA
    9f0dd89 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    588f7ac View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Configuration menu
    Copy the full SHA
    6278afc View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    a357c10 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. Configuration menu
    Copy the full SHA
    98a6263 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Configuration menu
    Copy the full SHA
    77816a3 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Configuration menu
    Copy the full SHA
    4f1ebc9 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Configuration menu
    Copy the full SHA
    c972a88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f2a7de3 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2024

  1. Configuration menu
    Copy the full SHA
    4a58736 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    83a8c46 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. Configuration menu
    Copy the full SHA
    7c9fc64 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Configuration menu
    Copy the full SHA
    47d8b6c View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. Configuration menu
    Copy the full SHA
    f0e6f85 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Configuration menu
    Copy the full SHA
    6c7215a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f313b0 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Configuration menu
    Copy the full SHA
    2cce26e View commit details
    Browse the repository at this point in the history
  2. Remove obsolete note

    inexorabletash committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d7f8da4 View commit details
    Browse the repository at this point in the history
  3. resolve lint errors

    inexorabletash committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3120474 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    024f576 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5345fb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    18dd7e3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6f75f2b View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. 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.
    inexorabletash committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    b5c7d4b View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Parenthesize expression

    Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>
    inexorabletash and fdwr authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    1934d25 View commit details
    Browse the repository at this point in the history
  2. Restore MLNumber reference lost in merge

    Co-authored-by: Ningxin Hu <ningxin.hu@intel.com>
    inexorabletash and huningxin authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    c353079 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a5f299d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2e06299 View commit details
    Browse the repository at this point in the history