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

[BUG]AttributeError: module 'torch.nn.functional' has no attribute 'scaled_dot_product_attention' #5534

Open
harborsarah opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working compression

Comments

@harborsarah
Copy link

Dear authors,

I install Deepspeed through pip install deepspeed. And my torch version is 1.12.1 and cuda 11.3
However, when i try to use following code to count the flops, it gives me error: AttributeError: module 'torch.nn.functional' has no attribute 'scaled_dot_product_attention'

if step == profile_step: # if using multi nodes, check global_rank == 0 as well prof.stop_profile() flops = prof.get_total_flops() macs = prof.get_total_macs() params = prof.get_total_params() if print_profile: prof.print_model_profile(profile_step=profile_step) prof.end_profile()

I check the README file and it written that the package support torch>=1.9, so it should work with my version. Do you know how to solve this problem? Thanks a lot.

ds_report output
Please run ds_report to give us details about your setup.

Screenshots
image

@harborsarah harborsarah added bug Something isn't working compression labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compression
Projects
None yet
Development

No branches or pull requests

1 participant