huggingface / accelerate

🚀 A simple way to launch, train, and use PyTorch models on almost any device and distributed configuration, automatic mixed precision (including fp8), and easy-to-configure FSDP and DeepSpeed support
https://huggingface.co/docs/accelerate
Apache License 2.0
7.98k stars 975 forks source link

fix version check bug in `get_xpu_available_memory` #3165

Closed faaany closed 1 month ago

faaany commented 1 month ago

What does this PR do?

This PR fixed the version check bug introduced in #3076. Below are the verified results with ipex "2.5.10+gitad5c117":

from accelerate.utils.memory import get_xpu_available_memory

mem = get_xpu_available_memory(1)
print(mem)
# 68719476736

@muellerzr

HuggingFaceDocBuilderDev commented 1 month ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.