-
Notifications
You must be signed in to change notification settings - Fork 136
feat - refactor fmha python in cudagraph & adapt pymodel mla cudagraph #463
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
base: main
Are you sure you want to change the base?
Conversation
a4c4319 to
239fe45
Compare
| py_forward_method_(inputs); | ||
| auto attn_pyobj = graph_instances_[key].mem_hold_.attn_pyobj_; | ||
| attn_pyobj.attr("prepare")(inputs); | ||
| py_forward_method_(inputs, attn_pyobj); |
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.
为啥跑两次这里
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.
@JackTan25 为了结果更稳定跑了两次warm up
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.
更稳定的结果
rtp_llm/models_py/utils/debug.py
Outdated
| data=data, | ||
| start_row=0, | ||
| start_col=0, | ||
| m=1, |
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.
这里应该是m?
| .def(pybind11::init<>()) | ||
| .def_readwrite("kv_cache_offset", &TRTAttn::kv_cache_offset) | ||
| .def( | ||
| "__cpp_ptr__", |
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.
为啥需要拿cppptr
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.
cudagraph调试的时候对比地址用的
| from rtp_llm.ops.compute_ops import PyModelInputs | ||
|
|
||
|
|
||
| class AttnPyObj: |
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.
感觉不需要他,直接把方法放到fmhabase里?
2ccba55 to
9590b0e
Compare
| def support_cuda_graph(self) -> bool: | ||
| return False | ||
|
|
||
| def prepare_cuda_graph(self, attn_inputs: PyAttentionInputs): |
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.
没有调用过?
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.
这个是预留接口吧
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.
我放在cudagraph里显式调用哇
4b44c8c to
c44bda9
Compare
c44bda9 to
bc1713c
Compare
No description provided.