webnn: fix an issue of conformance tests ran TIMEOUT under Page Heap [chromium/src : main]

0 views
Skip to first unread message

Dai, Feng (Gerrit)

unread,
Jan 14, 2026, 4:30:02 AM (3 days ago) Jan 14
to Hu, Ningxin, Reilly Grant, Dwayne Robinson, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Hu, Ningxin and Reilly Grant

Dai, Feng added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Dai, Feng . resolved

PTAL, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Hu, Ningxin
  • Reilly Grant
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I15612bf4584abc756e139383b3059e3b53b7fbad
Gerrit-Change-Number: 7414526
Gerrit-PatchSet: 6
Gerrit-Owner: Dai, Feng <feng...@intel.com>
Gerrit-Reviewer: Dai, Feng <feng...@intel.com>
Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
Gerrit-CC: Dwayne Robinson <dwa...@microsoft.com>
Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
Gerrit-Attention: Reilly Grant <rei...@chromium.org>
Gerrit-Comment-Date: Wed, 14 Jan 2026 09:29:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Reilly Grant (Gerrit)

unread,
Jan 14, 2026, 4:31:10 PM (3 days ago) Jan 14
to Dai, Feng, Hu, Ningxin, Reilly Grant, Dwayne Robinson, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Dai, Feng and Hu, Ningxin

Reilly Grant added 1 comment

File third_party/blink/web_tests/external/wpt/webnn/conformance_tests/byob_readtensor.https.any.js
Line 44, Patchset 6 (Latest):}, {explicit_timeout: true});
Reilly Grant . unresolved

I've never used `explicit_timeout` before but my understanding is that it expects that the test will call `timeout()` explicitly to signal that the test has taken longer than expected. Adding it here but not adding any code to call `timeout()` simply means that the test will never time out.

I don't think that's your intention here but I suspect I'm missing something. Typically when running tests under a tool like MSan an option is passed to the test runner to increase the timeout with the understanding that the tool generally makes execution slower. Is that an option here?

Open in Gerrit

Related details

Attention is currently required from:
  • Dai, Feng
  • Hu, Ningxin
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I15612bf4584abc756e139383b3059e3b53b7fbad
    Gerrit-Change-Number: 7414526
    Gerrit-PatchSet: 6
    Gerrit-Owner: Dai, Feng <feng...@intel.com>
    Gerrit-Reviewer: Dai, Feng <feng...@intel.com>
    Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
    Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
    Gerrit-CC: Dwayne Robinson <dwa...@microsoft.com>
    Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
    Gerrit-Attention: Dai, Feng <feng...@intel.com>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 21:30:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dai, Feng (Gerrit)

    unread,
    Jan 15, 2026, 4:56:17 AM (2 days ago) Jan 15
    to Hu, Ningxin, Reilly Grant, Dwayne Robinson, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Hu, Ningxin and Reilly Grant

    Dai, Feng added 1 comment

    File third_party/blink/web_tests/external/wpt/webnn/conformance_tests/byob_readtensor.https.any.js
    Line 44, Patchset 6 (Latest):}, {explicit_timeout: true});
    Reilly Grant . resolved

    I've never used `explicit_timeout` before but my understanding is that it expects that the test will call `timeout()` explicitly to signal that the test has taken longer than expected. Adding it here but not adding any code to call `timeout()` simply means that the test will never time out.

    I don't think that's your intention here but I suspect I'm missing something. Typically when running tests under a tool like MSan an option is passed to the test runner to increase the timeout with the understanding that the tool generally makes execution slower. Is that an option here?

    Dai, Feng
     Is that an option here?

    According to https://web-platform-tests.org/writing-tests/testharness-api.html#setup, there's such a `timeout_multiplier` setting (a Number - Multiplier to apply to timeouts.).

    Current we add the meta element "// META:
    timeout=long", the timeout is `60000` ms, with this `timeout_multiplier` setting, the timeout will increase to `60000 * timeout_multiplier` ms .

    Since these conformance tests could run on different devices, and execution time aren't the same, so there would be some tests running TIMEOUT` even if we use fixed timeout timing with `timeout_multiplier` setting.

    If we configure `explicit_timeout` setting to be "true", no matter what kind of devices, the test will never time out [by test running canceling the timeout with this setting](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/web_tests/external/wpt/resources/testharness.js#3748) as our expected.

    Here're the relevant `explicit_timeout` codes in [`setup()` of testharness.js](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/web_tests/external/wpt/resources/testharness.js#3729) . Please take a look, thanks.

    ```js
    Tests.prototype.setup = function(func, properties)
    {
    ......

    for (var p in properties) {
    if (properties.hasOwnProperty(p)) {
    var value = properties[p];
    if (p === "allow_uncaught_exception") {
    this.allow_uncaught_exception = value;
    } else if (p === "explicit_done" && value) {
    this.wait_for_finish = true;
    } else if (p === "explicit_timeout" && value) {
    this.timeout_length = null;
    if (this.timeout_id)
    {
    clearTimeout(this.timeout_id);
    }
    } else if (p === "single_test" && value) {
    this.set_file_is_test();
    } else if (p === "timeout_multiplier") {
    this.timeout_multiplier = value;
    if (this.timeout_length) {
    this.timeout_length *= this.timeout_multiplier;
    }
    } else if (p === "hide_test_state") {
    this.hide_test_state = value;
    } else if (p === "output") {
    this.output = value;
    } else if (p === "debug") {
    settings.debug = value;
    }
    }
    }
    ......
    };
    ```
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hu, Ningxin
    • Reilly Grant
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I15612bf4584abc756e139383b3059e3b53b7fbad
      Gerrit-Change-Number: 7414526
      Gerrit-PatchSet: 6
      Gerrit-Owner: Dai, Feng <feng...@intel.com>
      Gerrit-Reviewer: Dai, Feng <feng...@intel.com>
      Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
      Gerrit-CC: Dwayne Robinson <dwa...@microsoft.com>
      Gerrit-Attention: Reilly Grant <rei...@chromium.org>
      Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Comment-Date: Thu, 15 Jan 2026 09:56:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Reilly Grant <rei...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dai, Feng (Gerrit)

      unread,
      Jan 15, 2026, 5:05:40 AM (2 days ago) Jan 15
      to Hu, Ningxin, Reilly Grant, Dwayne Robinson, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      File third_party/blink/web_tests/external/wpt/webnn/conformance_tests/byob_readtensor.https.any.js
      Dai, Feng

      Sorry, there's a typos in above comment, the `running` should be `runner` as below updated.

      If we configure `explicit_timeout` setting to be "true", no matter what kind of devices, the test will never time out [by test runner canceling the timeout with this setting](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/web_tests/external/wpt/resources/testharness.js#3748) as our expected.

      Gerrit-Comment-Date: Thu, 15 Jan 2026 10:05:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Reilly Grant <rei...@chromium.org>
      Comment-In-Reply-To: Dai, Feng <feng...@intel.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dwayne Robinson (Gerrit)

      unread,
      Jan 15, 2026, 8:22:01 PM (2 days ago) Jan 15
      to Dai, Feng, Hu, Ningxin, Reilly Grant, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Hu, Ningxin and Reilly Grant

      Dwayne Robinson added 1 comment

      Patchset-level comments
      Dwayne Robinson . resolved

      Dwayne has no expertise to offer on this timeout attribute - deferring to Reilly (but I am curious to know how long they actually take with and without page heap enabled).

      Gerrit-Comment-Date: Fri, 16 Jan 2026 01:21:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dai, Feng (Gerrit)

      unread,
      Jan 15, 2026, 10:37:37 PM (2 days ago) Jan 15
      to Hu, Ningxin, Reilly Grant, Dwayne Robinson, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Dwayne Robinson, Hu, Ningxin and Reilly Grant

      Dai, Feng added 1 comment

      Patchset-level comments
      Dwayne Robinson . resolved

      Dwayne has no expertise to offer on this timeout attribute - deferring to Reilly (but I am curious to know how long they actually take with and without page heap enabled).

      Dai, Feng

      For example of running subgraph tests (conformance_tests/subgraph.https.any.js) by ORT OV CPU EP on my local MTL laptop, without PageHeap the execution test time costs about 1.4s. With PageHeap and configured `explicit_timeout` setting, it would cost about 11.9s to 12.2s.


      For this case, if we configured `timeout_multiplier` as `2`, the subgraph tests would sometimes run with flaky results. Similarly, it's not easy to give a specific `timeout_multiplier` number for other tests.


      |subgraph tests \ execution time(ms)| Run 1 | Run 2 | Run 3|
      |--|--|--|--|
      |w/o PageHeap | 1540.368896484375 | 1400.59716796875 | 1429.67822265625|
      |w/ PageHeap + explicit_timeout(true) | 119788.70092773438 | 122319.15307617188 | 121820.81176757812|

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dwayne Robinson
      • Hu, Ningxin
      • Reilly Grant
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I15612bf4584abc756e139383b3059e3b53b7fbad
      Gerrit-Change-Number: 7414526
      Gerrit-PatchSet: 6
      Gerrit-Owner: Dai, Feng <feng...@intel.com>
      Gerrit-Reviewer: Dai, Feng <feng...@intel.com>
      Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
      Gerrit-CC: Dwayne Robinson <dwa...@microsoft.com>
      Gerrit-Attention: Reilly Grant <rei...@chromium.org>
      Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Attention: Dwayne Robinson <dwa...@microsoft.com>
      Gerrit-Comment-Date: Fri, 16 Jan 2026 03:37:12 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dwayne Robinson <dwa...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dai, Feng (Gerrit)

      unread,
      Jan 15, 2026, 10:40:21 PM (2 days ago) Jan 15
      to Hu, Ningxin, Reilly Grant, Dwayne Robinson, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Dwayne Robinson, Hu, Ningxin and Reilly Grant

      Dai, Feng added 1 comment

      Patchset-level comments
      Dwayne Robinson . resolved

      Dwayne has no expertise to offer on this timeout attribute - deferring to Reilly (but I am curious to know how long they actually take with and without page heap enabled).

      Dai, Feng

      For example of running subgraph tests (conformance_tests/subgraph.https.any.js) by ORT OV CPU EP on my local MTL laptop, without PageHeap the execution test time costs about 1.4s. With PageHeap and configured `explicit_timeout` setting, it would cost about 11.9s to 12.2s.


      For this case, if we configured `timeout_multiplier` as `2`, the subgraph tests would sometimes run with flaky results. Similarly, it's not easy to give a specific `timeout_multiplier` number for other tests.


      |subgraph tests \ execution time(ms)| Run 1 | Run 2 | Run 3|
      |--|--|--|--|
      |w/o PageHeap | 1540.368896484375 | 1400.59716796875 | 1429.67822265625|
      |w/ PageHeap + explicit_timeout(true) | 119788.70092773438 | 122319.15307617188 | 121820.81176757812|

      Dai, Feng

      Updated.

      With PageHeap and configured explicit_timeout setting, it would cost about `119`s to `122`s.

      Gerrit-Comment-Date: Fri, 16 Jan 2026 03:40:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dai, Feng <feng...@intel.com>
      Comment-In-Reply-To: Dwayne Robinson <dwa...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dwayne Robinson (Gerrit)

      unread,
      Jan 16, 2026, 6:57:58 PM (18 hours ago) Jan 16
      to Dai, Feng, Hu, Ningxin, Reilly Grant, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Dai, Feng, Hu, Ningxin and Reilly Grant

      Dwayne Robinson added 2 comments

      Patchset-level comments
      Dwayne Robinson . resolved

      🫡

      Dwayne Robinson . resolved

      Dwayne has no expertise to offer on this timeout attribute - deferring to Reilly (but I am curious to know how long they actually take with and without page heap enabled).

      Dai, Feng

      For example of running subgraph tests (conformance_tests/subgraph.https.any.js) by ORT OV CPU EP on my local MTL laptop, without PageHeap the execution test time costs about 1.4s. With PageHeap and configured `explicit_timeout` setting, it would cost about 11.9s to 12.2s.


      For this case, if we configured `timeout_multiplier` as `2`, the subgraph tests would sometimes run with flaky results. Similarly, it's not easy to give a specific `timeout_multiplier` number for other tests.


      |subgraph tests \ execution time(ms)| Run 1 | Run 2 | Run 3|
      |--|--|--|--|
      |w/o PageHeap | 1540.368896484375 | 1400.59716796875 | 1429.67822265625|
      |w/ PageHeap + explicit_timeout(true) | 119788.70092773438 | 122319.15307617188 | 121820.81176757812|

      Dai, Feng

      Updated.

      With PageHeap and configured explicit_timeout setting, it would cost about `119`s to `122`s.

      Dwayne Robinson

      Oof, so 77x to 87x longer. 🐢

      (ideally, increased timeouts would only apply *when* pageheap is enabled, rather than permanently bumping up the normal case too, but JS has no visibility into that low level detail, and there's not even an official C API to test it.)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dai, Feng
      • Hu, Ningxin
      • Reilly Grant
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I15612bf4584abc756e139383b3059e3b53b7fbad
      Gerrit-Change-Number: 7414526
      Gerrit-PatchSet: 6
      Gerrit-Owner: Dai, Feng <feng...@intel.com>
      Gerrit-Reviewer: Dai, Feng <feng...@intel.com>
      Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
      Gerrit-CC: Dwayne Robinson <dwa...@microsoft.com>
      Gerrit-Attention: Reilly Grant <rei...@chromium.org>
      Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Attention: Dai, Feng <feng...@intel.com>
      Gerrit-Comment-Date: Fri, 16 Jan 2026 23:57:48 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages