[WebNN] Enable model dumping for the OpenVINO EP [chromium/src : main]

0 views
Skip to first unread message

Wang, Wei4 (Gerrit)

unread,
Jun 30, 2026, 5:41:23 AM (9 days ago) Jun 30
to Hu, Ningxin, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
Attention needed from Hu, Ningxin

Wang, Wei4 added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Wang, Wei4 . resolved

PTAL, thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Hu, Ningxin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
Gerrit-Change-Number: 7977578
Gerrit-PatchSet: 4
Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
Gerrit-CC: Jiewei Qian <q...@chromium.org>
Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
Gerrit-Comment-Date: Tue, 30 Jun 2026 09:41:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Hu, Ningxin (Gerrit)

unread,
Jun 30, 2026, 1:15:01 PM (8 days ago) Jun 30
to Wang, Wei4, Rafael Cintron, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
Attention needed from Rafael Cintron and Wang, Wei4

Hu, Ningxin added 5 comments

Patchset-level comments
Hu, Ningxin . resolved
File services/webnn/ort/ort_session_options.cc
Line 127, Patchset 4 (Latest): const OrtEpDevice* first_selected_device) {
Hu, Ningxin . unresolved

Just pass the primary ep name?

Line 140, Patchset 4 (Latest): if (first_selected_ep_name == kOpenVINOExecutionProvider) {
Hu, Ningxin . unresolved

You may want to consolidate the ep specific config info in the `EpInfo`? e.g. consider adding an optional `model_dump_config_key` in `EpInfo`, for OV EP, it sets to "ep.openvinoexecutionprovider.dump_subgraphs". That would make the code in this file to be ep agnostic.

Line 141, Patchset 4 (Latest): // `SetOptimizedModelFilePath` does not take effect for the OpenVINO EP.
// When OpenVINO is the first selected EP, dump the subgraphs via its own
// session config entry instead. The value is a directory path (UTF-8),
Hu, Ningxin . unresolved

Should we update doc of kWebNNOrtDumpModel? For OpenVINO EP, it dumps the OV IR models rather than ONNX models. Or consider introducing a separate switch, e.g. `webnn-ort-dump-ihv-ep-model`?

Line 272, Patchset 4 (Latest): ScopedOrtSessionOptions session_options =
CreateBaseSessionOptions(target_ort_device);

// Disable CPU EP fallback to ensure the session will be created on the
// expected EP device.
CHECK_STATUS(ort_api->AddSessionConfigEntry(
session_options.get(), kOrtSessionOptionsDisableCPUEPFallback, "1"));

const auto ep_it = kKnownEPs.find(target_device.ep_name);
if (ep_it != kKnownEPs.end()) {
for (const auto& config_entry : ep_it->second.config_entries) {
CHECK_STATUS(ort_api->AddSessionConfigEntry(
session_options.get(),
/*config_key=*/config_entry.key.c_str(),
/*config_value=*/config_entry.value.c_str()));
}
}
Hu, Ningxin . unresolved

You may want to document this change in the commit log.

Open in Gerrit

Related details

Attention is currently required from:
  • Rafael Cintron
  • Wang, Wei4
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
    Gerrit-Change-Number: 7977578
    Gerrit-PatchSet: 4
    Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
    Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
    Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
    Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
    Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
    Gerrit-CC: Jiewei Qian <q...@chromium.org>
    Gerrit-Attention: Rafael Cintron <rafael....@microsoft.com>
    Gerrit-Attention: Wang, Wei4 <wei4...@intel.com>
    Gerrit-Comment-Date: Tue, 30 Jun 2026 17:14:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Wang, Wei4 (Gerrit)

    unread,
    Jul 1, 2026, 6:14:14 AM (8 days ago) Jul 1
    to Rafael Cintron, Aditya Rastogi, Hu, Ningxin, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
    Attention needed from Hu, Ningxin and Rafael Cintron

    Wang, Wei4 added 4 comments

    File services/webnn/ort/ort_session_options.cc
    Line 127, Patchset 4: const OrtEpDevice* first_selected_device) {
    Hu, Ningxin . resolved

    Just pass the primary ep name?

    Wang, Wei4

    Thanks, done

    Line 140, Patchset 4: if (first_selected_ep_name == kOpenVINOExecutionProvider) {
    Hu, Ningxin . unresolved

    You may want to consolidate the ep specific config info in the `EpInfo`? e.g. consider adding an optional `model_dump_config_key` in `EpInfo`, for OV EP, it sets to "ep.openvinoexecutionprovider.dump_subgraphs". That would make the code in this file to be ep agnostic.

    Wang, Wei4

    Thanks for the suggestion, PTAL again.

    Line 141, Patchset 4: // `SetOptimizedModelFilePath` does not take effect for the OpenVINO EP.

    // When OpenVINO is the first selected EP, dump the subgraphs via its own
    // session config entry instead. The value is a directory path (UTF-8),
    Hu, Ningxin . unresolved

    Should we update doc of kWebNNOrtDumpModel? For OpenVINO EP, it dumps the OV IR models rather than ONNX models. Or consider introducing a separate switch, e.g. `webnn-ort-dump-ihv-ep-model`?

    Wang, Wei4

    I have updated the doc of kWebNNOrtDumpModel. I think introducing a separate switch can be be confusing because it becomes complicated to use.

    Line 272, Patchset 4: ScopedOrtSessionOptions session_options =

    CreateBaseSessionOptions(target_ort_device);

    // Disable CPU EP fallback to ensure the session will be created on the
    // expected EP device.
    CHECK_STATUS(ort_api->AddSessionConfigEntry(
    session_options.get(), kOrtSessionOptionsDisableCPUEPFallback, "1"));

    const auto ep_it = kKnownEPs.find(target_device.ep_name);
    if (ep_it != kKnownEPs.end()) {
    for (const auto& config_entry : ep_it->second.config_entries) {
    CHECK_STATUS(ort_api->AddSessionConfigEntry(
    session_options.get(),
    /*config_key=*/config_entry.key.c_str(),
    /*config_value=*/config_entry.value.c_str()));
    }
    }
    Hu, Ningxin . resolved

    You may want to document this change in the commit log.

    Wang, Wei4

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hu, Ningxin
    • Rafael Cintron
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
    Gerrit-Change-Number: 7977578
    Gerrit-PatchSet: 6
    Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
    Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
    Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
    Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
    Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
    Gerrit-CC: Jiewei Qian <q...@chromium.org>
    Gerrit-Attention: Rafael Cintron <rafael....@microsoft.com>
    Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 10:14:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Hu, Ningxin <ningx...@intel.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hu, Ningxin (Gerrit)

    unread,
    Jul 1, 2026, 1:08:49 PM (7 days ago) Jul 1
    to Wang, Wei4, Rafael Cintron, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
    Attention needed from Rafael Cintron and Wang, Wei4

    Hu, Ningxin added 2 comments

    File services/webnn/ort/ort_session_options.cc
    Line 140, Patchset 4: if (first_selected_ep_name == kOpenVINOExecutionProvider) {
    Hu, Ningxin . resolved

    You may want to consolidate the ep specific config info in the `EpInfo`? e.g. consider adding an optional `model_dump_config_key` in `EpInfo`, for OV EP, it sets to "ep.openvinoexecutionprovider.dump_subgraphs". That would make the code in this file to be ep agnostic.

    Wang, Wei4

    Thanks for the suggestion, PTAL again.

    Hu, Ningxin

    Looks good, thanks!

    Line 141, Patchset 4: // `SetOptimizedModelFilePath` does not take effect for the OpenVINO EP.
    // When OpenVINO is the first selected EP, dump the subgraphs via its own
    // session config entry instead. The value is a directory path (UTF-8),
    Hu, Ningxin . unresolved

    Should we update doc of kWebNNOrtDumpModel? For OpenVINO EP, it dumps the OV IR models rather than ONNX models. Or consider introducing a separate switch, e.g. `webnn-ort-dump-ihv-ep-model`?

    Wang, Wei4

    I have updated the doc of kWebNNOrtDumpModel. I think introducing a separate switch can be be confusing because it becomes complicated to use.

    Hu, Ningxin

    Dumping ONNX model and EP specific model seem to be orthogonal to me. Not sure whether we should have them seperate. @aditya....@microsoft.com for comments.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Rafael Cintron
    • Wang, Wei4
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
    Gerrit-Change-Number: 7977578
    Gerrit-PatchSet: 6
    Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
    Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
    Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
    Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
    Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
    Gerrit-CC: Jiewei Qian <q...@chromium.org>
    Gerrit-Attention: Rafael Cintron <rafael....@microsoft.com>
    Gerrit-Attention: Wang, Wei4 <wei4...@intel.com>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 17:08:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Hu, Ningxin <ningx...@intel.com>
    Comment-In-Reply-To: Wang, Wei4 <wei4...@intel.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aditya Rastogi (Gerrit)

    unread,
    Jul 1, 2026, 4:43:44 PM (7 days ago) Jul 1
    to Wang, Wei4, Rafael Cintron, Hu, Ningxin, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
    Attention needed from Rafael Cintron and Wang, Wei4

    Aditya Rastogi added 1 comment

    File services/webnn/ort/ort_session_options.cc
    Line 141, Patchset 4: // `SetOptimizedModelFilePath` does not take effect for the OpenVINO EP.
    // When OpenVINO is the first selected EP, dump the subgraphs via its own
    // session config entry instead. The value is a directory path (UTF-8),
    Hu, Ningxin . unresolved

    Should we update doc of kWebNNOrtDumpModel? For OpenVINO EP, it dumps the OV IR models rather than ONNX models. Or consider introducing a separate switch, e.g. `webnn-ort-dump-ihv-ep-model`?

    Wang, Wei4

    I have updated the doc of kWebNNOrtDumpModel. I think introducing a separate switch can be be confusing because it becomes complicated to use.

    Hu, Ningxin

    Dumping ONNX model and EP specific model seem to be orthogonal to me. Not sure whether we should have them seperate. @aditya....@microsoft.com for comments.

    Aditya Rastogi

    Agree they are orthogonal concepts, but if we had two switches, I think it becomes a little more tricky to use (e.g., the new switch wouldn't work for CPU / DML, and the ONNX path seems like it would not be valid for OpenVINO based on the comments in the PR). Is it ok to start with this initial direction? We can always add the new switch later on.

    Gerrit-Comment-Date: Wed, 01 Jul 2026 20:43:32 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hu, Ningxin (Gerrit)

    unread,
    Jul 1, 2026, 6:31:52 PM (7 days ago) Jul 1
    to Wang, Wei4, Rafael Cintron, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
    Attention needed from Rafael Cintron and Wang, Wei4

    Hu, Ningxin added 1 comment

    File services/webnn/ort/ort_session_options.cc
    Line 141, Patchset 4: // `SetOptimizedModelFilePath` does not take effect for the OpenVINO EP.
    // When OpenVINO is the first selected EP, dump the subgraphs via its own
    // session config entry instead. The value is a directory path (UTF-8),
    Hu, Ningxin . unresolved

    Should we update doc of kWebNNOrtDumpModel? For OpenVINO EP, it dumps the OV IR models rather than ONNX models. Or consider introducing a separate switch, e.g. `webnn-ort-dump-ihv-ep-model`?

    Wang, Wei4

    I have updated the doc of kWebNNOrtDumpModel. I think introducing a separate switch can be be confusing because it becomes complicated to use.

    Hu, Ningxin

    Dumping ONNX model and EP specific model seem to be orthogonal to me. Not sure whether we should have them seperate. @aditya....@microsoft.com for comments.

    Aditya Rastogi

    Agree they are orthogonal concepts, but if we had two switches, I think it becomes a little more tricky to use (e.g., the new switch wouldn't work for CPU / DML, and the ONNX path seems like it would not be valid for OpenVINO based on the comments in the PR). Is it ok to start with this initial direction? We can always add the new switch later on.

    Hu, Ningxin

    Is it ok to start with this initial direction? We can always add the new switch later on.

    Sounds good. Can we leave a TODO here? An EP may support dumping both ONNX model and IHV model in the future.

    Gerrit-Comment-Date: Wed, 01 Jul 2026 22:31:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aditya Rastogi <aditya....@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Wang, Wei4 (Gerrit)

    unread,
    Jul 2, 2026, 2:39:12 AM (7 days ago) Jul 2
    to Rafael Cintron, Aditya Rastogi, Hu, Ningxin, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
    Attention needed from Aditya Rastogi, Hu, Ningxin and Rafael Cintron

    Wang, Wei4 added 1 comment

    File services/webnn/ort/ort_session_options.cc
    Line 141, Patchset 4: // `SetOptimizedModelFilePath` does not take effect for the OpenVINO EP.
    // When OpenVINO is the first selected EP, dump the subgraphs via its own
    // session config entry instead. The value is a directory path (UTF-8),
    Hu, Ningxin . resolved

    Should we update doc of kWebNNOrtDumpModel? For OpenVINO EP, it dumps the OV IR models rather than ONNX models. Or consider introducing a separate switch, e.g. `webnn-ort-dump-ihv-ep-model`?

    Wang, Wei4

    I have updated the doc of kWebNNOrtDumpModel. I think introducing a separate switch can be be confusing because it becomes complicated to use.

    Hu, Ningxin

    Dumping ONNX model and EP specific model seem to be orthogonal to me. Not sure whether we should have them seperate. @aditya....@microsoft.com for comments.

    Aditya Rastogi

    Agree they are orthogonal concepts, but if we had two switches, I think it becomes a little more tricky to use (e.g., the new switch wouldn't work for CPU / DML, and the ONNX path seems like it would not be valid for OpenVINO based on the comments in the PR). Is it ok to start with this initial direction? We can always add the new switch later on.

    Hu, Ningxin

    Is it ok to start with this initial direction? We can always add the new switch later on.

    Sounds good. Can we leave a TODO here? An EP may support dumping both ONNX model and IHV model in the future.

    Wang, Wei4

    Thanks, done.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aditya Rastogi
    • Hu, Ningxin
    • Rafael Cintron
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
      Gerrit-Change-Number: 7977578
      Gerrit-PatchSet: 7
      Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
      Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
      Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
      Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
      Gerrit-CC: Jiewei Qian <q...@chromium.org>
      Gerrit-Attention: Rafael Cintron <rafael....@microsoft.com>
      Gerrit-Attention: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Attention: Aditya Rastogi <aditya....@microsoft.com>
      Gerrit-Comment-Date: Thu, 02 Jul 2026 06:38:53 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Hu, Ningxin <ningx...@intel.com>
      Comment-In-Reply-To: Aditya Rastogi <aditya....@microsoft.com>
      Comment-In-Reply-To: Wang, Wei4 <wei4...@intel.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Hu, Ningxin (Gerrit)

      unread,
      Jul 6, 2026, 5:59:36 PM (2 days ago) Jul 6
      to Wang, Wei4, Rafael Cintron, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
      Attention needed from Aditya Rastogi, Rafael Cintron and Wang, Wei4

      Hu, Ningxin voted and added 1 comment

      Votes added by Hu, Ningxin

      Code-Review+1

      1 comment

      Patchset-level comments
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Aditya Rastogi
      • Rafael Cintron
      • Wang, Wei4
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
      Gerrit-Change-Number: 7977578
      Gerrit-PatchSet: 7
      Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
      Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
      Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
      Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
      Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
      Gerrit-CC: Jiewei Qian <q...@chromium.org>
      Gerrit-Attention: Rafael Cintron <rafael....@microsoft.com>
      Gerrit-Attention: Aditya Rastogi <aditya....@microsoft.com>
      Gerrit-Attention: Wang, Wei4 <wei4...@intel.com>
      Gerrit-Comment-Date: Mon, 06 Jul 2026 21:59:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Rafael Cintron (Gerrit)

      unread,
      Jul 7, 2026, 6:54:03 PM (yesterday) Jul 7
      to Wang, Wei4, Hu, Ningxin, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
      Attention needed from Aditya Rastogi and Wang, Wei4

      Rafael Cintron added 3 comments

      File services/webnn/ort/ort_session_options.cc
      Line 155, Patchset 7 (Latest): base::StringPrintf("model%d.onnx", dump_count++));
      Rafael Cintron . unresolved

      The default branch generates unique files via the static counter ( model{N}.onnx ) whereas the OV branch passes only dump_directory. If multiple graphs/sessions dump in one process and the EP uses fixed names, dumps overwrite each other.

      Is there a way to pass a specific file in the `model_dump_config_key` case?

      Line 155, Patchset 7 (Latest): base::StringPrintf("model%d.onnx", dump_count++));
      Rafael Cintron . unresolved

      Nit: For a 64bit unsigned integer, you need to use `%"PRIu64"`. Consider using `base::StrCat` and `base::NumberToString` instead.

      Line 255, Patchset 7 (Latest): std::string_view ep_name = ort_api->EpDevice_EpName(registered_device);
      Rafael Cintron . unresolved

      Can we pull `ep_name` out of the loop so we can avoid a second `EpDevice_EpName` call when we call `CreatebaseSessionOptions` below?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Aditya Rastogi
      • Wang, Wei4
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
        Gerrit-Change-Number: 7977578
        Gerrit-PatchSet: 7
        Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
        Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
        Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
        Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
        Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
        Gerrit-CC: Jiewei Qian <q...@chromium.org>
        Gerrit-Attention: Aditya Rastogi <aditya....@microsoft.com>
        Gerrit-Attention: Wang, Wei4 <wei4...@intel.com>
        Gerrit-Comment-Date: Tue, 07 Jul 2026 22:53:48 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Wang, Wei4 (Gerrit)

        unread,
        1:30 AM (20 hours ago) 1:30 AM
        to Hu, Ningxin, Rafael Cintron, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
        Attention needed from Aditya Rastogi and Rafael Cintron

        Wang, Wei4 added 3 comments

        File services/webnn/ort/ort_session_options.cc
        Line 155, Patchset 7: base::StringPrintf("model%d.onnx", dump_count++));
        Rafael Cintron . resolved

        Nit: For a 64bit unsigned integer, you need to use `%"PRIu64"`. Consider using `base::StrCat` and `base::NumberToString` instead.

        Wang, Wei4

        Thanks, done.

        Line 155, Patchset 7: base::StringPrintf("model%d.onnx", dump_count++));
        Rafael Cintron . unresolved

        The default branch generates unique files via the static counter ( model{N}.onnx ) whereas the OV branch passes only dump_directory. If multiple graphs/sessions dump in one process and the EP uses fixed names, dumps overwrite each other.

        Is there a way to pass a specific file in the `model_dump_config_key` case?

        Wang, Wei4

        The dump_subgraphs config value is interpreted strictly as a directory by the OpenVINO EP, so we can't pass a specific filename here: https://github.com/intel-innersource/frameworks.ai.onnxruntime.openvino-plugin-ep/blob/7ce14a41887a573ba0972e4ede923bddc49bbd07/plugin/ov_provider.cc#L48

        However, OV EP generates unique filenames itself using a process-wide static plus the subgraph index and model stem: https://github.com/intel-innersource/frameworks.ai.onnxruntime.openvino-plugin-ep/blob/7ce14a41887a573ba0972e4ede923bddc49bbd07/plugin/ov_provider.cc#L624. This is the same uniqueness guarantee our default branch gets from the static dump_count. So passing just the directory is sufficient and dumps from multiple graphs/sessions in one process won't collide.

        Line 255, Patchset 7: std::string_view ep_name = ort_api->EpDevice_EpName(registered_device);
        Rafael Cintron . resolved

        Can we pull `ep_name` out of the loop so we can avoid a second `EpDevice_EpName` call when we call `CreatebaseSessionOptions` below?

        Wang, Wei4

        We can directly use `target_device.ep_name` when calling `CreatebaseSessionOptions `

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Aditya Rastogi
        • Rafael Cintron
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
        Gerrit-Change-Number: 7977578
        Gerrit-PatchSet: 8
        Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
        Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
        Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
        Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
        Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
        Gerrit-CC: Jiewei Qian <q...@chromium.org>
        Gerrit-Attention: Rafael Cintron <rafael....@microsoft.com>
        Gerrit-Attention: Aditya Rastogi <aditya....@microsoft.com>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 05:30:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Rafael Cintron <rafael....@microsoft.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rafael Cintron (Gerrit)

        unread,
        6:35 PM (3 hours ago) 6:35 PM
        to Wang, Wei4, Hu, Ningxin, Aditya Rastogi, Chromium LUCI CQ, chromium...@chromium.org, Jiewei Qian
        Attention needed from Aditya Rastogi and Wang, Wei4

        Rafael Cintron added 3 comments

        File services/webnn/ort/ort_session_options.cc
        Line 133, Patchset 8 (Latest): // TODO(crbug.com/530292678): kWebNNOrtDumpModel is used for dumping both the
        // optimized ONNX model and the EP-specific IHV model. In the future, an EP
        // may support dumping both simultaneously. When that happens, we should
        // introduce a separate switch to allow users to control each dump target
        // independently.
        Rafael Cintron . unresolved
        ```suggestion
        // TODO(crbug.com/530292678): kWebNNOrtDumpModel is used for dumping either the
        // optimized ONNX model or the EP-specific IHV model. In the future, an EP
        // may support dumping both simultaneously. When that happens, we should
        // introduce a separate switch to allow users to control each dump target
        // independently.
        ```
        Line 146, Patchset 8 (Latest): // Some EPs (e.g., OpenVINO) don't support `SetOptimizedModelFilePath`.
        // Instead, dump the subgraphs via their own session config entry.
        Rafael Cintron . unresolved

        This comment makes it seem like `SetOptimizedModelFilePath` will be supported for OV EP in the future. Is this true? Seems like this is a bug with the OV EP that should be fixed in the future. EPs should strive to implement the ORT API first, then provide EP specific enhancements as an addon, not the other way around.

        Line 155, Patchset 7: base::StringPrintf("model%d.onnx", dump_count++));
        Rafael Cintron . resolved

        The default branch generates unique files via the static counter ( model{N}.onnx ) whereas the OV branch passes only dump_directory. If multiple graphs/sessions dump in one process and the EP uses fixed names, dumps overwrite each other.

        Is there a way to pass a specific file in the `model_dump_config_key` case?

        Wang, Wei4

        The dump_subgraphs config value is interpreted strictly as a directory by the OpenVINO EP, so we can't pass a specific filename here: https://github.com/intel-innersource/frameworks.ai.onnxruntime.openvino-plugin-ep/blob/7ce14a41887a573ba0972e4ede923bddc49bbd07/plugin/ov_provider.cc#L48

        However, OV EP generates unique filenames itself using a process-wide static plus the subgraph index and model stem: https://github.com/intel-innersource/frameworks.ai.onnxruntime.openvino-plugin-ep/blob/7ce14a41887a573ba0972e4ede923bddc49bbd07/plugin/ov_provider.cc#L624. This is the same uniqueness guarantee our default branch gets from the static dump_count. So passing just the directory is sufficient and dumps from multiple graphs/sessions in one process won't collide.

        Rafael Cintron

        Acknowledged

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Aditya Rastogi
        • Wang, Wei4
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement 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: I893f8b3c596b2b7f0e1b36e39727d303f490cda1
        Gerrit-Change-Number: 7977578
        Gerrit-PatchSet: 8
        Gerrit-Owner: Wang, Wei4 <wei4...@intel.com>
        Gerrit-Reviewer: Hu, Ningxin <ningx...@intel.com>
        Gerrit-Reviewer: Rafael Cintron <rafael....@microsoft.com>
        Gerrit-Reviewer: Wang, Wei4 <wei4...@intel.com>
        Gerrit-CC: Aditya Rastogi <aditya....@microsoft.com>
        Gerrit-CC: Jiewei Qian <q...@chromium.org>
        Gerrit-Attention: Aditya Rastogi <aditya....@microsoft.com>
        Gerrit-Attention: Wang, Wei4 <wei4...@intel.com>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 22:35:08 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Rafael Cintron <rafael....@microsoft.com>
        Comment-In-Reply-To: Wang, Wei4 <wei4...@intel.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages