Skip to content

reduceLogSum, reduceLogSumExp, reduceSumSquare are not supported on OV/NNAPI #209

Description

@mingmingtasd

I find that for these three reducution ops:

reduceLogSum, reduceLogSumExp, reduceSumSquare

DMl/ONNX can support them while OV/NNAPI can't support them.

Activity

  1. wchao1115 commented on Sep 25, 2021

    @wchao1115
    Collaborator

    @mingmingtasd They can all be emulated though e.g. reduceLogSum would be an element-wise log over a reduce-sum operation. Likewise reduceSumSquare would be a reduce-sum over an element-wise square operation.

    The design goal of webnn is not to build a one-to-one mapping to each and every popular framework or platform API, as that would be impossible to achieve. The goal is to define a core set of operations that can be accelerated by the platform API when that acceleration is available while at the same time allowing the frameworks to be built on top of it without translation discrepancy or overhead.

  2. mingmingtasd commented on Sep 26, 2021

    @mingmingtasd
    ContributorAuthor

    @mingmingtasd They can all be emulated though e.g. reduceLogSum would be an element-wise log over a reduce-sum operation. Likewise reduceSumSquare would be a reduce-sum over an element-wise square operation.

    The design goal of webnn is not to build a one-to-one mapping to each and every popular framework or platform API, as that would be impossible to achieve. The goal is to define a core set of operations that can be accelerated by the platform API when that acceleration is available while at the same time allowing the frameworks to be built on top of it without translation discrepancy or overhead.

    Yes, good explanation for this issue which I raised here for disscusion, I agree with you, thanks a lot! @wchao1115

  3. anssiko commented on Oct 1, 2021

    @anssiko
    Member

    @mingmingtasd thanks for raising this issue, and thanks @wchao1115 for explaining the design goal of the API.

    We discussed this on our call https://www.w3.org/2021/09/30-webmachinelearning-minutes.html#t04 and agreed to add an informative section to the reduction operations with pseudo-code on how reduceLogSum, reduceLogSumExp and reduceSumSquare ops could be emulated. See "The behavior of this operation can be generically emulated" for other similar examples in the spec.

    We hope that will addresses this issue and also helps other readers of the spec who might have similar questions.

  4. inexorabletash commented on Feb 21, 2024

    @inexorabletash
    Contributor

    Flagging as editorial per conversation in #209 (comment) which says that the planned resolution is to provide the decomposition for the ops in question.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions