[Misc] Pass attention to impl backend (#12218)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
@@ -243,8 +243,7 @@ def unified_attention(
|
||||
attn_metadata = forward_context.attn_metadata
|
||||
self = forward_context.attn_layers[layer_name]
|
||||
kv_cache = self.kv_cache[forward_context.virtual_engine]
|
||||
return self.impl.forward(query, key, value, kv_cache, attn_metadata,
|
||||
self._k_scale, self._v_scale)
|
||||
return self.impl.forward(self, query, key, value, kv_cache, attn_metadata)
|
||||
|
||||
|
||||
def unified_attention_fake(
|
||||
@@ -276,13 +275,12 @@ def unified_attention_with_output(
|
||||
attn_metadata = forward_context.attn_metadata
|
||||
self = forward_context.attn_layers[layer_name]
|
||||
kv_cache = self.kv_cache[forward_context.virtual_engine]
|
||||
self.impl.forward(query,
|
||||
self.impl.forward(self,
|
||||
query,
|
||||
key,
|
||||
value,
|
||||
kv_cache,
|
||||
attn_metadata,
|
||||
self._k_scale,
|
||||
self._v_scale,
|
||||
output=output)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user