Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Dec 25, 2024
1 parent 873a1df commit 6c62051
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions nncf/common/utils/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import importlib
from copy import deepcopy
from enum import Enum
from typing import Any, Callable, List, TypeVar
from typing import Any, Callable, TypeVar

import nncf

Expand All @@ -37,32 +36,6 @@ def verify_result(*args: Any, **kwargs: Any): # type: ignore
return verify_result


def get_available_backends() -> List[BackendType]:
"""
Returns a list of available backends.
:return: A list of available backends.
"""
frameworks = [
("torch", BackendType.TORCH),
("torch", BackendType.TORCH2),
("torch.fx", BackendType.TORCH_FX),
("tensorflow", BackendType.TENSORFLOW),
("onnx", BackendType.ONNX),
("openvino.runtime", BackendType.OPENVINO),
]

available_backends = []
for module_name, backend in frameworks:
try:
importlib.import_module(module_name)
available_backends.append(backend)
except ImportError:
pass

return available_backends


@result_verifier
def is_torch_model(model: TModel) -> bool:
"""
Expand Down

0 comments on commit 6c62051

Please sign in to comment.