mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
* Tweaks to the model utils * Add handling for a dim_value of -1 when replacing the entire input shape. This occurs in models exported from PaddlePaddle * make pytorch helpers accessible in package * make QDQ helpers accessible in package
19 lines
679 B
Python
19 lines
679 B
Python
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
from .get_azcopy import get_azcopy
|
|
from .logger import get_logger
|
|
from .platform_helpers import (is_windows, is_macOS, is_linux)
|
|
from .run import run
|
|
|
|
try:
|
|
import flatbuffers # noqa
|
|
from .reduced_build_config_parser import parse_config
|
|
except ImportError:
|
|
get_logger('tools_python_utils').info('flatbuffers module is not installed. parse_config will not be available')
|
|
|
|
# see if we can make the pytorch helpers available.
|
|
import importlib.util # noqa
|
|
have_torch = importlib.util.find_spec("torch")
|
|
if have_torch:
|
|
from .pytorch_export_helpers import infer_input_info
|