Skip to content

Commit

Permalink
Add artifacts_dir to torch-onnx-patch in benchmark (#130069)
Browse files Browse the repository at this point in the history
Summary:
Add `artifacts_dir` to torch-onnx-patch to save error report for debugging.

X-link: pytorch/pytorch#130069
Approved by: https://github.com/justinchuby

Reviewed By: kit1980

Differential Revision: D59413633

fbshipit-source-id: fbccab831b8b47d877a979825aa90600d008d4f8
  • Loading branch information
titaiwangms authored and facebook-github-bot committed Jul 6, 2024
1 parent 27c68a2 commit 7cbf487
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion userbenchmark/dynamo/dynamobench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,12 @@ def forward(self, *args):
if self.use_experimental_patch:
import torch_onnx

torch_onnx.patch_torch(error_report=True, profile=True)
torch_onnx.patch_torch(
error_report=True,
profile=True,
dump_exported_program=False,
artifacts_dir=os.path.dirname(output_path),
)
else:
# make sure the patch is not in effect
try:
Expand Down

0 comments on commit 7cbf487

Please sign in to comment.