Skip to content

[caches] Raise exception on offloaded static caches + multi device #37974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025

Conversation

gante
Copy link
Member

@gante gante commented May 6, 2025

What does this PR do?

Follow-up to this comment: #37922 (comment)

Tests for offloaded static caches are failing on multiple devices because the implementation of these caches doesn't work with multiple devices. This PR raises an informative exception and skips the tests when this happens.

Although I think it is fixable (see added TODO), I don't think it's worth the effort for now.

@gante gante requested a review from ydshieh May 6, 2025 10:41
Copy link
Contributor

github-actions bot commented May 6, 2025

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@github-actions github-actions bot marked this pull request as draft May 6, 2025 10:41
@gante gante marked this pull request as ready for review May 6, 2025 10:42
@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Since it changes OffloadedHybridCache, I will leave you to decide if to ping Cyrilvallez before merge.

@gante
Copy link
Member Author

gante commented May 8, 2025

cc @Cyrilvallez: not urgent imo, offloaded static caches are not working with multidevice, this PR throws an appropriate exception

@gante gante merged commit f2b59c6 into huggingface:main May 8, 2025
22 checks passed
@Cyrilvallez
Copy link
Member

Thanks for the ping! Will try to find some time for it, but it was mostly designed to work with TP indeed (i.e. single device)

zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants