Skip to content

Commit

Permalink
[FxImporter] make FxImporter to fit python<=3.9 (#2802)
Browse files Browse the repository at this point in the history
As that torch with py3.9 is also used widely.
  • Loading branch information
qingyunqu authored Jan 26, 2024
1 parent 2ef2283 commit e73c536
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/torch_mlir/extras/fx_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Also available under a BSD-style license. See LICENSE.

try:
from types import NoneType
except ImportError:
# python less than 3.10 doesn't have NoneType
NoneType = type(None)

import logging
import operator
import re
from types import NoneType, BuiltinMethodType, BuiltinFunctionType
from types import BuiltinMethodType, BuiltinFunctionType
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tuple, Union
import weakref

Expand Down

0 comments on commit e73c536

Please sign in to comment.