utils.py 892 B

123456789101112131415161718192021222324252627
  1. # flake8: noqa: F401
  2. r"""
  3. This file is in the process of migration to `torch/ao/quantization`, and
  4. is kept here for compatibility while the migration process is ongoing.
  5. If you are adding a new entry/functionality, please, add it to the
  6. appropriate files under `torch/ao/quantization/fx/`, while adding an import statement
  7. here.
  8. """
  9. from torch.ao.quantization.fx.utils import (
  10. graph_pretty_str,
  11. get_per_tensor_qparams,
  12. quantize_node,
  13. get_custom_module_class_keys,
  14. get_linear_prepack_op_for_dtype,
  15. get_qconv_prepack_op,
  16. get_qconv_op,
  17. get_new_attr_name_with_prefix,
  18. graph_module_from_producer_nodes,
  19. assert_and_get_unique_device,
  20. create_getattr_from_value,
  21. create_qparam_nodes,
  22. all_node_args_have_no_tensors,
  23. node_return_type_is_int,
  24. get_non_observable_arg_indexes_and_types,
  25. is_get_tensor_info_node,
  26. maybe_get_next_module
  27. )