webnn: Collect input/output tensor indices during build #49357
+46
−0
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.
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}