Skip to content

Conversation

@xwjahahahaha
Copy link

When profiling with DeepSpeed FLOPs profiler, F.scaled_dot_product_attention called with keyword args (query=, key=, value=) isn’t traced correctly.

Using kwargs raises:
TypeError: _attn_flops_compute() missing 3 required positional arguments: 'q', 'k', and 'v'

To fix it:
In models/rdt/blocks.py::CrossAttention.forward, pass q, k, v as positional arguments

…filer

DeepSpeed FLOPs profiler expects positional (q,k,v). Calling
F.scaled_dot_product_attention with kwargs triggers:
TypeError: _attn_flops_compute() missing 3 required positional arguments: 'q', 'k', and 'v'

Switch to positional q,k,v. No functional change.
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.

1 participant