Skip to content

Commit

Permalink
Ease MPS backend and partitioner imports. (pytorch#3714)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#3714

.

Reviewed By: kirklandsign

Differential Revision: D57709407

fbshipit-source-id: 3e680cd046d3e74b74c4ff1960442f6868661a60
  • Loading branch information
shoumikhin authored and facebook-github-bot committed May 23, 2024
1 parent ed2da4f commit 3c43fd6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
10 changes: 10 additions & 0 deletions backends/apple/mps/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2023 Apple Inc. All rights reserved.
# Provided subject to the LICENSE file in the top level directory.
#

from .mps_preprocess import MPSBackend

__all__ = [
MPSBackend,
]
10 changes: 10 additions & 0 deletions backends/apple/mps/partition/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2023 Apple Inc. All rights reserved.
# Provided subject to the LICENSE file in the top level directory.
#

from .mps_partitioner import MPSPartitioner

__all__ = [
MPSPartitioner,
]
2 changes: 1 addition & 1 deletion backends/apple/mps/partition/mps_partitioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Any, cast, Dict, List, Union

import torch
from executorch.backends.apple.mps.mps_preprocess import MPSBackend
from executorch.backends.apple.mps import MPSBackend
from executorch.backends.apple.mps.operators.node_visitor import get_node_visitors
from executorch.backends.transforms import get_shape
from executorch.exir.backend.backend_details import CompileSpec
Expand Down
4 changes: 2 additions & 2 deletions backends/apple/mps/test/test_mps_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import executorch.exir as exir
import torch
from executorch.backends.apple.mps.mps_preprocess import MPSBackend
from executorch.backends.apple.mps.partition.mps_partitioner import MPSPartitioner
from executorch.backends.apple.mps import MPSBackend
from executorch.backends.apple.mps.partition import MPSPartitioner
from executorch.exir import (
EdgeCompileConfig,
EdgeProgramManager,
Expand Down
4 changes: 2 additions & 2 deletions examples/apple/mps/scripts/mps_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import torch
from examples.apple.mps.scripts.bench_utils import bench_torch, compare_outputs
from executorch import exir
from executorch.backends.apple.mps.mps_preprocess import MPSBackend
from executorch.backends.apple.mps.partition.mps_partitioner import MPSPartitioner
from executorch.backends.apple.mps import MPSBackend
from executorch.backends.apple.mps.partition import MPSPartitioner

from executorch.exir import (
EdgeCompileConfig,
Expand Down

0 comments on commit 3c43fd6

Please sign in to comment.