Skip to content

WebNN should supports super-resolution models #127

Description

@wchao1115

Based on this stated use case of WebNN, it needs to be able to support the various super-resolution models such as one compiled in this literature.

Activity

  1. wchao1115 commented on Feb 2, 2021

    @wchao1115
    CollaboratorAuthor

    Looks like the current spec should already handle the requirement of the version of the super-resolution model based on the DirectML super-resolution sample. The only tricky issue is the lack of ArrayBufferView support for half-precision float (FP16). A popular variant of the super-resolution model runs on FP16 tensors in order to leverage vectorized ML acceleration such as NVIDIA tensor cores when available.

    Although the lack of FP16 support in the ArrayBufferView could possibly be worked around by just using Uint16Array to appropriately offset the tensor data and deal with the float-casting inside the webnn implementation itself, it could still be confusing to some at the model builder level.

  2. huningxin commented on Feb 2, 2021

    @huningxin
    Contributor

    Although the lack of FP16 support in the ArrayBufferView could possibly be worked around by just using Uint16Array to appropriately offset the tensor data and deal with the float-casting inside the webnn implementation itself, it could still be confusing to some at the model builder level.

    Agree. It would be good to have the Float16Array support.

    There is a related FP16 discussion in the W3C ML workshop.

  3. wchao1115 commented on Mar 30, 2021

    @wchao1115
    CollaboratorAuthor

    Compared with a know super-resolution models, the current webnn operator spec seems sufficient.

  4. anssiko commented on Mar 30, 2021

    @anssiko
    Member

    @wchao1115 thanks for checking that the spec satisfied the requirements of known super-resolution models.

    (I encourage the group participants to open new issues similarly to this if they feel there may be unaddressed requirements derived from model architectures targeting the use cases documented in the spec. We did updates to the API spec #123 in response to a similar assessment for style transfer models. Also new use cases can be brought to the group's consideration by opening a new issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions