Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Oct 16, 2023
1 parent c65b36a commit 7a08831
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions optimum/intel/utils/import_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import sys
from collections import OrderedDict
from typing import Union

from packaging.version import Version, parse


Expand Down Expand Up @@ -205,7 +204,10 @@ def is_torch_version(operation: str, version: str):
"""
if not _torch_available:
return False
return compare_versions(parse(_torch_version), operation, version)

import torch

return compare_versions(parse(parse(torch.__version__).base_version), operation, version)


def is_ipex_version(operation: str, version: str):
Expand Down

0 comments on commit 7a08831

Please sign in to comment.