Skip to content
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

Fixed: FutureWarning: torch.backends.cuda.sdp_kernel() is deprecated. #859

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ardentillumina
Copy link

@ardentillumina ardentillumina commented Jan 26, 2025

Fix BUG (FutureWarning)

use torch.nn.attention.sdpa_kernel() instead of torch.backends.cuda.sdp_kernel()

to avoid:

FutureWarning: `torch.backends.cuda.sdp_kernel()` is deprecated. In the future, this context manager will be removed. Please see `torch.nn.attention.sdpa_kernel()` for the new context manager, with updated signature.

This FutureWarning only exist in Windows WSL

I have tested in MacOS, this PR has no side effect.


btw: which formatter you are using in VSCode?

@patientx
Copy link

patientx commented Feb 7, 2025

Also appears with zluda and your solution works there too.

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.

2 participants