File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
modelopt/torch/quantization Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 106106
107107import onnx
108108import torch
109- from torch .onnx import _type_utils , symbolic_helper
109+ from packaging .version import Version
110+
111+ if Version (torch .__version__ ) >= Version ("2.9.0" ):
112+ from torch .onnx ._internal .torchscript_exporter import _type_utils
113+ else :
114+ from torch .onnx import _type_utils
115+
116+ from torch .onnx import symbolic_helper
110117from torch .onnx import symbolic_helper as sym_help
111118from torch .onnx ._internal import jit_utils
112119from torch .onnx .symbolic_opset14 import _attention_scale , _causal_attention_mask
Original file line number Diff line number Diff line change 3131import torch .nn .functional as F
3232from packaging .version import Version
3333from torch import nn
34- from torch .onnx ._internal .torchscript_exporter ._globals import GLOBALS
34+
35+ if Version (torch .__version__ ) >= Version ("2.9.0" ):
36+ from torch .onnx ._internal .torchscript_exporter ._globals import GLOBALS
37+ else :
38+ from torch .onnx ._globals import GLOBALS
39+
3540
3641from modelopt .torch .utils import standardize_constructor_args
3742from modelopt .torch .utils .distributed import DistributedProcessGroup
You can’t perform that action at this time.
0 commit comments