-
Notifications
You must be signed in to change notification settings - Fork 169
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
[Feat] Sage Attention Support for Triton kernel #929
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
paddlemix/triton_ops/triton_ops.py
Outdated
PD_BUILD_OP(${op_name}) | ||
.Inputs({"x", "k_tensor", "v_tensor", "q_scale", "k_scale"}) | ||
.Outputs({"out_tensor", "lse_tensor"}) | ||
.Attrs({"output_dtype: std::string", "tensor_layout: std::string", "return_lse: int"}) |
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.
lse需要吗?如果确认推理不需要的话是否可以删掉呢?
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.
多卡并行推理可能需要打开,建议保留。
sim: 0.9999207854270935, |
paddlemix/triton_ops/sageattn.py
Outdated
"x": x, | ||
"km@OPTIONAL": km, | ||
} | ||
out_int8 = helper.create_variable_for_type_inference(dtype=x.dtype) |
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.
这里应该是 out_int8 = helper.create_variable_for_type_inference(dtype="int8")?
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.
好的, 已修复
Support sage attention Triton kernel
so far stagely support
is_casual=False
situation.is_casual=True
will be coming soon...