From 777837639a013ac706048a7322b8278401ae526f Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Thu, 11 Apr 2024 17:22:21 +0300 Subject: [PATCH] Remove deprecated AOT_HPU_TRAINING_BACKEND --- examples/text-generation/utils.py | 2 +- optimum/habana/accelerate/utils/dataclasses.py | 2 -- tests/test_fsdp_examples.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/text-generation/utils.py b/examples/text-generation/utils.py index 9b60fe4920..8bce0aec94 100644 --- a/examples/text-generation/utils.py +++ b/examples/text-generation/utils.py @@ -151,7 +151,7 @@ def patch_scoped_linear_all_reduce(model): def get_torch_compiled_model(model): - model.model = torch.compile(model.model, backend="aot_hpu_inference_backend") + model.model = torch.compile(model.model, backend="hpu_backend") return model diff --git a/optimum/habana/accelerate/utils/dataclasses.py b/optimum/habana/accelerate/utils/dataclasses.py index c0484e2243..7b3f2f2f3a 100644 --- a/optimum/habana/accelerate/utils/dataclasses.py +++ b/optimum/habana/accelerate/utils/dataclasses.py @@ -73,7 +73,6 @@ class GaudiDynamoBackend(str, BaseEnum): - **IPEX** -- Uses IPEX for inference on CPU. Inference only. [Read more](https://github.com/intel/intel-extension-for-pytorch). - **TVM** -- Uses Apach TVM for inference optimizations. [Read more](https://tvm.apache.org/) - - **AOT_HPU_TRAINING_BACKEND** -- Uses Habana Gaudi - depracated - will be removed. - **HPU_BACKEND** -- Uses Habana Gaudi. """ @@ -92,7 +91,6 @@ class GaudiDynamoBackend(str, BaseEnum): TENSORRT = "TENSORRT" IPEX = "IPEX" TVM = "TVM" - AOT_HPU_TRAINING_BACKEND = "AOT_HPU_TRAINING_BACKEND" HPU_BACKEND = "HPU_BACKEND" diff --git a/tests/test_fsdp_examples.py b/tests/test_fsdp_examples.py index 13de801832..366a0d71ea 100644 --- a/tests/test_fsdp_examples.py +++ b/tests/test_fsdp_examples.py @@ -78,7 +78,7 @@ def _test_fsdp( f"--per_device_train_batch_size {batch_size_train}", f"--fsdp_config {path_to_example_dir / task / 'fsdp_config.json'}", f"--fsdp '{policy}'", - "--torch_compile_backend aot_hpu_training_backend", + "--torch_compile_backend hpu_backend", "--torch_compile", "--use_habana", ]