Skip to content

Commit

Permalink
Fix model name retrieval and remove unused argument (#115108)
Browse files Browse the repository at this point in the history
Summary:
Might be some upstream updates, the previous hack starts to not pick up model names, updating to use the other more appropriate variable.
Also fix a bug with an unused argument that was supposed to be removed.

X-link: pytorch/pytorch#115108
Approved by: https://github.com/thiagocrepaldi

Reviewed By: atalman

Differential Revision: D51939505

fbshipit-source-id: ea6a78bd2fd85689ee0ba8e17c2be58da1b6faee
  • Loading branch information
BowenBao authored and facebook-github-bot committed Dec 8, 2023
1 parent a13c590 commit 046478e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions userbenchmark/dynamo/dynamobench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,6 @@ def speedup_experiment_ds(args, model_iter_fn, model, example_inputs):


def speedup_experiment_onnx(
onnx_model_cls: Type[OnnxModelFromTorchScript],
args,
model_iter_fn,
onnx_model: OnnxModel,
Expand Down Expand Up @@ -1069,10 +1068,7 @@ class OnnxModel(abc.ABC):
_COMPILER_NAME: str

def __init__(self, output_directory, model, example_inputs, dynamic_shapes: bool):
# Hack to get model name.
from torch._functorch import aot_autograd

model_name = aot_autograd.model_name
model_name = current_name
self.model_dir = self._generate_onnx_model_directory(
output_directory, self._COMPILER_NAME, model_name
)
Expand Down

0 comments on commit 046478e

Please sign in to comment.