-
Notifications
You must be signed in to change notification settings - Fork 802
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
Add support for variable sequence length in fmha #9991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个接口加个readme,中文也可以
} else { | ||
UNIMPLEMENTED_THEN_RETURN(); | ||
} | ||
} else if (shape.NumAxes() == 3) { | ||
if (layout == "BM(HK)" || layout == "MB(HK)" || layout == "BM(H2K)" || layout == "MB(H2K)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这些字符串改为一个ENUM或者一系列static变量?这样万一出错了不需要肉眼看的很辛苦
Speed stats:
|
UNIMPLEMENTED_THEN_RETURN() << name | ||
<< "_layout should be '(BM)(HK)', '(BM)(H2K)', or '(BM)(H3K)' " | ||
"when the number of dimensions of " | ||
<< name << " tensor is 3."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为:tensor is 3. -> tensor is 2.
*b = JUST(batch_size); | ||
*m = JUST(seq_len); | ||
*h = shape.At(1); | ||
*k = shape.At(2); | ||
} else { | ||
UNIMPLEMENTED_THEN_RETURN() | ||
<< name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里漏了"(BM)HK"
Speed stats:
|
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/9991/ |
Speed stats:
|
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/9991/ |
No description provided.