Skip to content

Commit ed81989

Browse files
committed
misspelling
1 parent f1a9790 commit ed81989

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

_doc/status/patches_diff.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ Those two versions leads to the following list of patches.
6161
patch_details=details,
6262
):
6363
pass
64+
for patch in details.patched:
65+
print(f""* {patch.family} - {patch.function_to_patch}")
66+
print()
67+
print()
6468
for patch in details.patched:
6569
if patch.function_to_patch == patch.patch:
6670
continue

_unittests/ut_torch_export_patches/test_patch_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_involved_patches(self):
6969
ep = torch.export.export(
7070
model, (), kwargs=inputs, dynamic_shapes=use_dyn_not_str(ds)
7171
)
72-
patches = details.patches_involded_in_graph(ep.graph)
72+
patches = details.patches_involved_in_graph(ep.graph)
7373
self.assertNotEmpty(patches)
7474
report = details.make_report(patches, format="rst")
7575
if has_transformers("4.51"):

onnx_diagnostic/ci_models/export_phi4_mm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ def forward(
973973
kwargs=export_inputs,
974974
dynamic_shapes=use_dyn_not_str(dynamic_shapes),
975975
)
976-
patches = details.patches_involded_in_graph(ep.graph)
976+
patches = details.patches_involved_in_graph(ep.graph)
977977
report = details.make_report(patches, format="rst")
978978
with open(f"{basename}.patches_details.rst", "w") as f:
979979
f.write(report)

onnx_diagnostic/helpers/ort_session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
23
import onnx
34
import numpy as np
@@ -76,6 +77,9 @@ def __init__(
7677
session_options.enable_profiling = enable_profiling
7778
if optimized_model_filepath:
7879
session_options.optimized_model_filepath = optimized_model_filepath
80+
session_options.optimized_model_external_initializers_file_name = (
81+
f"{os.path.splitext(optimized_model_filepath)[0]}.data"
82+
)
7983
if log_severity_level is not None:
8084
session_options.log_severity_level = log_severity_level
8185
if log_verbosity_level is not None:

onnx_diagnostic/torch_export_patches/patch_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class PatchDetails:
191191
ep = torch.export.export(
192192
model, (), kwargs=inputs, dynamic_shapes=use_dyn_not_str(ds)
193193
)
194-
patches = details.patches_involded_in_graph(ep.graph)
194+
patches = details.patches_involved_in_graph(ep.graph)
195195
report = details.make_report(patches, format="rst")
196196
print(report)
197197
"""
@@ -322,7 +322,7 @@ def make_report(
322322
"""
323323
Creates a report based on the involved patches.
324324
325-
:param patches: from method :meth:`patches_involded_in_graph`
325+
:param patches: from method :meth:`patches_involved_in_graph`
326326
:param format: format of the report
327327
:return: report
328328
"""

onnx_diagnostic/torch_models/validate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,9 @@ def _mk(key, flavour=flavour):
17711771
if os.environ.get("DUMPORTOPT", "") in ("1", "true", "True"):
17721772
opts = onnxruntime.SessionOptions()
17731773
opts.optimized_model_filepath = f"{data['onnx_filename']}.rtopt.onnx"
1774+
opts.optimized_model_external_initializers_file_name = (
1775+
f"{data['onnx_filename']}.rtopt.data"
1776+
)
17741777
if verbose:
17751778
print(
17761779
f"[validate_onnx_model] saved optimized onnxruntime "

0 commit comments

Comments
 (0)