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

webnn: Collect input/output tensor indices during build #49357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Nov 25, 2024

This change constructs a mapping between tensor names and the index
TFLite uses to refer to the tensor at build time rather than looking it
up during inference. This avoids a bug where NUL characters in a tensor
name are incompatible with the fact that TFLite uses NUL-terminated C
strings in its API.

A new validation test is added to check that such a graph can be
built and executed.

Change-Id: I3959e6602d64ad756c8da069413c65fcbb75f085
Fixed: 380146879
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6043809
Reviewed-by: Phillis Tang <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Auto-Submit: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1388016}

This change constructs a mapping between tensor names and the index
TFLite uses to refer to the tensor at build time rather than looking it
up during inference. This avoids a bug where NUL characters in a tensor
name are incompatible with the fact that TFLite uses NUL-terminated C
strings in its API.

A new validation test is added to check that such a graph can be
built and executed.

Change-Id: I3959e6602d64ad756c8da069413c65fcbb75f085
Fixed: 380146879
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6043809
Reviewed-by: Phillis Tang <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Auto-Submit: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1388016}
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title webnn: Sanitize input/output tensor names for TFLite webnn: Collect input/output tensor indices during build Nov 26, 2024
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

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

Successfully merging this pull request may close these issues.

3 participants