[ONNX] Add `artifacts_dir` to torch-onnx-patch in benchmark (#130069)

Add `artifacts_dir` to torch-onnx-patch to save error report for debugging.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/130069
Approved by: https://github.com/justinchuby
diff --git a/benchmarks/dynamo/common.py b/benchmarks/dynamo/common.py
index 56beddc..65b503d 100644
--- a/benchmarks/dynamo/common.py
+++ b/benchmarks/dynamo/common.py
@@ -1547,7 +1547,12 @@
         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: