Skip to content

Commit

Permalink
webnn: Use TFLite for CPU execution on Linux
Browse files Browse the repository at this point in the history
This CL primarily does two things:
1. Use TFLite backend (instead of XNNPACK) on Linux for "cpu" contexts
2. Refactor the existing Virtual Test Suite on Linux to run "cpu"
   tests now that the "gpu" workaround is no longer needed to target
   the TFLite backend

Note that - assuming TFLite-on-CPU behaves the same across platforms -
this "cpu" Virtual Test Suite and the corresponding expectations will
be re-used as other backends (or at least Windows) migrate "cpu"
context execution to TFLite in follow-up CLs

Before (on Linux):
  - using a "cpu" context targets the XNNPACK backend in the renderer
  - using a "gpu" context targets the TFLite backend in
    //services (which currently runs on CPU anyways)
After (on Linux):
  - using either a "cpu" or "gpu" context targets the TFLite backend in
    //services

This opens the door for TFLite to truly target the GPU if instructed,
and gets us one step closer to removing the XNNPACK backend

Bug: 325612086
Change-Id: I421d97b7d91b604afbfb3c8aa71b55a5bc78bd6f
  • Loading branch information
a-sully authored and chromium-wpt-export-bot committed May 11, 2024
1 parent 8f48f40 commit ac91f48
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// META: title=test WebNN MLContext.compute() for ArrayBufferView created from bigger ArrayBuffer
// META: global=window,dedicatedworker
// META: variant=?cpu
// META: variant=?gpu
// META: script=../resources/utils.js

Expand Down

0 comments on commit ac91f48

Please sign in to comment.