Add fused_infer_attention_score functional api to align with the
aclnn inferface `aclnnFusedInferAttentionScoreV2`. This functional
api supports pynative, kbk, ge and semi auto parallel mode, where
ge and semi auto parallel mode are implemented by reusing the
existing primitive `FusedInferAttentionScore`, with some minor
adaptations made for the new parameters.
To align with PyTorch NPU, we made the following adjustments to the
parameters of the functional interface, which have some slight differences
from the FusedInferAttentionScore primitive:
* attn_mask renamed to atten_mask
* scale_value renamed to scale
* Input parameter order adjustment:
* key_antiquant_scale/offset and value_antiquant_scale/offset are
moved forward by two positions, placed after antiquant_offset.
* key/value_antiquant_mode is moved forward by one position, placed
after antiquant_mode.
* key/value data types: The key and value parameters now support the
Tensor type and are no longer restricted to being passed as arrays.
Add fused_infer_attention_score functional api to align with the
aclnn inferface `aclnnFusedInferAttentionScoreV2`. This functional
api supports pynative, kbk, ge and semi auto parallel mode, where
ge and semi auto parallel mode are implemented by reusing the
existing primitive `FusedInferAttentionScore`, with some minor
adaptations made for the new parameters.
To align with PyTorch NPU, we made the following adjustments to the
parameters of the functional interface, which have some slight differences
from the FusedInferAttentionScore primitive:
* attn_mask renamed to atten_mask
* scale_value renamed to scale
* Input parameter order adjustment:
* key_antiquant_scale/offset and value_antiquant_scale/offset are
moved forward by two positions, placed after antiquant_offset.
* key/value_antiquant_mode is moved forward by one position, placed
after antiquant_mode.
* key/value data types: The key and value parameters now support the
Tensor type and are no longer restricted to being passed as arrays.