[Misc]: Why not AscendMLAImpl
just inherit MLACommonImpl
for common functions?
#868
Labels
question
Further information is requested
Uh oh!
There was an error while loading. Please reload this page.
class AscendMLAImpl
inherits the abstractMLAAttentionImpl
:https://github.com/vllm-project/vllm-ascend/blob/v0.8.5rc1/vllm_ascend/attention/mla_v1.py#L263
However most functions like
_v_up_proj_and_o_proj
and_q_proj_and_k_up_proj
are already defined inMLACommonImpl
, and they look identical to the re-definition inAscendMLAImpl
:https://github.com/vllm-project/vllm/blob/v0.8.5/vllm/attention/backends/mla/common.py#L1009
For example,
TritonMLAImpl
just reuses those common functions, but overwrites_forward_decode
:https://github.com/vllm-project/vllm/blob/v0.8.5/vllm/attention/backends/triton_mla.py#L26
AscendMLAImpl
can also just inheritsMLACommonImpl
and overwrite_forward_prefill
and_forward_decode
to use NPU operators?The text was updated successfully, but these errors were encountered: