Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
部分模型MLA前置操作去除了rope部分,需要在原有的MLAPO算子基础上增加rope的开关
适配主流模型
增加可选的 RoPE 关闭能力,通过 cos、sin 是否为空控制: cos != nullptr && sin != nullptr:保持原有计算,兼容现有调用。 cos == nullptr && sin == nullptr:关闭 RoPE,仅跳过 Q/K 旋转数学运算。 仅有一个输入为空:Host Tiling 返回失败并提示 cos、sin 必须同时传入或同时为空。
/assign
Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
Backgroud(背景信息)
部分模型MLA前置操作去除了rope部分,需要在原有的MLAPO算子基础上增加rope的开关
Benefit / Necessity (价值/作用)
适配主流模型
Design(设计方案)
增加可选的 RoPE 关闭能力,通过 cos、sin 是否为空控制:
cos != nullptr && sin != nullptr:保持原有计算,兼容现有调用。
cos == nullptr && sin == nullptr:关闭 RoPE,仅跳过 Q/K 旋转数学运算。
仅有一个输入为空:Host Tiling 返回失败并提示 cos、sin 必须同时传入或同时为空。