__init__.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 2020 The HuggingFace Team. All rights reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. from .testing import (
  15. DEFAULT_LAUNCH_COMMAND,
  16. are_the_same_tensors,
  17. assert_exception,
  18. capture_call_output,
  19. device_count,
  20. execute_subprocess_async,
  21. get_launch_command,
  22. get_torch_dist_unique_port,
  23. memory_allocated_func,
  24. path_in_accelerate_package,
  25. pytest_xdist_worker_id,
  26. require_bnb,
  27. require_cpu,
  28. require_cuda,
  29. require_cuda_or_hpu,
  30. require_cuda_or_xpu,
  31. require_fp8,
  32. require_fp16,
  33. require_huggingface_suite,
  34. require_mlu,
  35. require_mps,
  36. require_multi_device,
  37. require_multi_gpu,
  38. require_multi_gpu_or_xpu,
  39. require_multi_xpu,
  40. require_musa,
  41. require_non_cpu,
  42. require_non_hpu,
  43. require_non_torch_xla,
  44. require_non_xpu,
  45. require_npu,
  46. require_pippy,
  47. require_sdaa,
  48. require_single_device,
  49. require_single_gpu,
  50. require_single_xpu,
  51. require_torch_min_version,
  52. require_torchao,
  53. require_torchvision,
  54. require_tpu,
  55. require_transformer_engine,
  56. require_transformer_engine_mxfp8,
  57. require_xpu,
  58. run_first,
  59. skip,
  60. slow,
  61. torch_device,
  62. )
  63. from .training import RegressionDataset, RegressionModel
  64. from .scripts import test_script, test_sync, test_ops # isort: skip