Skip to content

Commit

Permalink
Extract common code
Browse files Browse the repository at this point in the history
  • Loading branch information
penguin-wwy committed Apr 24, 2024
1 parent 4516c1f commit b4fd52d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion projects/pt1/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ declare_mlir_python_sources(TorchMLIRPythonSources.TopLevel
SOURCES
torchscript.py
_dynamo_fx_importer.py
compiler_utils.py
dynamo.py
_version.py
)
Expand Down
2 changes: 1 addition & 1 deletion projects/pt1/python/torch_mlir/torchscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from torch_mlir.dynamo import _get_decomposition_table
from torch.fx.experimental.proxy_tensor import make_fx

from .compiler_utils import (
from torch_mlir.compiler_utils import (
OutputType,
run_pipeline_with_repro_report,
lower_mlir_module,
Expand Down
1 change: 1 addition & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ declare_mlir_python_sources(TorchMLIRPythonSources.PublicAPI
ADD_TO_PARENT TorchMLIRPythonSources
SOURCES
fx.py
compiler_utils.py
extras/fx_decomp_util.py
)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions python/torch_mlir/fx.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Also available under a BSD-style license. See LICENSE.

from typing import Optional, Union, Dict, Tuple, Any
from typing import Optional, Union, Dict, Tuple, Any, Callable

import warnings

Expand Down Expand Up @@ -55,7 +55,7 @@ def export_and_import(
dynamic_shapes: Optional[Union[Dict[str, Any], Tuple[Any]]] = None,
experimental_support_mutation: bool = False,
hooks: Optional[FxImporterHooks] = None,
decomposition_table: Optional[list] = None,
decomposition_table: Optional[Dict[torch._ops.OperatorBase, Callable]] = None,
func_name: str = "main",
verbose: bool = False,
**kwargs,
Expand Down

0 comments on commit b4fd52d

Please sign in to comment.