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]megatron-lm,with torchompile,The provided qkv memory layout is not supported! #1329

Open
qingshanxwx opened this issue Dec 20, 2024 · 0 comments

Comments

@qingshanxwx
Copy link

code: the main branch https://github.com/NVIDIA/Megatron-LM
transformer_engine 1.13
eager is normal, compile will report The provided qkv memory layout is not supported!
The error is as follows:
Image

According to the functional description, the stride of k and v should be (SHD, HD, D, 1), but it is actually (HD, H*D, D, 1)

megatron/core/extensions/transformer_engine.py
Image

printed result
Image

Then call DotProductAttention, v'stride will become (524288, 128, 32, 1) directly,k'stride not change.
Image

printed result
Image

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

No branches or pull requests

1 participant