mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-08 10:00:29 +08:00
[Intel HPU] Support intel hpu platform (#4161)
* [Intel HPU] Support intel hpu platform * fix some issues * apply precommit and move AttentionBackend_HPU * fix format issue * correct ops import * fix ci issue * update code in layers * fix code style issue * remove dense tp moe ep mode * fix enc_dec_block_num * fix rebase issue * rename hpu to gaudi in readme * rename ForwardMeta_HPU to HPUForwardMeta
This commit is contained in:
@@ -69,6 +69,12 @@ class ErnieRotaryEmbedding:
|
||||
.transpose([0, 1, 2, 4, 3])
|
||||
.reshape([2, bsz, max_seq_len, 1, self.rotary_dim])
|
||||
)
|
||||
if paddle.is_compiled_with_custom_device("intel_hpu"):
|
||||
return (
|
||||
paddle.concat([rot_emb, rot_emb], axis=3)
|
||||
.transpose([0, 1, 2, 4, 3])
|
||||
.reshape([2, bsz, max_seq_len, 1, self.rotary_dim])
|
||||
)
|
||||
else:
|
||||
return rot_emb
|
||||
|
||||
|
Reference in New Issue
Block a user