mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 19:21:31 +06:00
enable xla fsdp (#32048)
* enable xla fsdp * add acceleration version check for xla fsdp
This commit is contained in:
parent
7ad784ae9d
commit
46d09af4fc
@ -1902,7 +1902,7 @@ class TrainingArguments:
|
||||
warnings.warn("`--xla_fsdp_grad_ckpt` is useful only when `--xla` is set to true.")
|
||||
|
||||
# accelerate integration for FSDP
|
||||
if len(self.fsdp) > 0 and not self.fsdp_config["xla"]:
|
||||
if len(self.fsdp) > 0 and is_accelerate_available("0.28.0"):
|
||||
os.environ["ACCELERATE_USE_FSDP"] = "true"
|
||||
from accelerate.utils.constants import (
|
||||
FSDP_AUTO_WRAP_POLICY,
|
||||
|
Loading…
Reference in New Issue
Block a user