utils.py 722 B

1234567891011121314151617181920
  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. get_custom_module_class_keys,
  11. get_linear_prepack_op_for_dtype,
  12. get_qconv_prepack_op,
  13. get_new_attr_name_with_prefix,
  14. graph_module_from_producer_nodes,
  15. assert_and_get_unique_device,
  16. create_getattr_from_value,
  17. all_node_args_have_no_tensors,
  18. get_non_observable_arg_indexes_and_types,
  19. maybe_get_next_module
  20. )