Skip to content

[iluvatar_gpu] Adapt for iluvatar gpu #2684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 7, 2025

Conversation

liddk
Copy link
Contributor

@liddk liddk commented Jul 3, 2025

目前FD已在天数硬件上完成兼容适配。
依赖适配的版本信息如下:
天数sdk:4.3.0
PaddlePaddle:3.1.0
Paddle Iluvatar GPU: 4.3.0
当前版本为体验版本,更多的性能优化和模型支持请期待后续PR。

Copy link

paddle-bot bot commented Jul 3, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Jul 3, 2025
@Jiang-Jia-Jun Jiang-Jia-Jun requested a review from yongqiangma July 3, 2025 03:56
@liddk liddk force-pushed the iluvatar branch 2 times, most recently from 26dc70f to 22dc404 Compare July 3, 2025 11:08
@@ -0,0 +1,55 @@

/* Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有一些文件没有加Copyright,加一下,然后改一下这里的20024→2025吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#include <sys/types.h>
#include <unistd.h>

#ifdef PADDLE_WITH_HIP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要hip代码吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@liddk liddk force-pushed the iluvatar branch 4 times, most recently from d1a3f6b to c0a1314 Compare July 4, 2025 10:22
yongqiangma
yongqiangma previously approved these changes Jul 4, 2025
Copy link
Collaborator

@yongqiangma yongqiangma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yuanlehome
Copy link
Collaborator

代码看下来没什么问题,希望PR描述、标题可以补充更多信息。比如在PR描述中给出当前的支持进度、适配局限性、后续适配计划等等,当然可能也包括对FastDeploy在硬件适配方面的一些意见,相信这是飞桨与天数智芯在大模型推理方向合作的一个里程碑,后续一定会有更多适配和维护计划~

yuanlehome
yuanlehome previously approved these changes Jul 7, 2025
@yuanlehome yuanlehome self-assigned this Jul 7, 2025
@Jiang-Jia-Jun
Copy link
Collaborator

代码冲突需要解决一下,解决后我可以来帮忙Approve与合入 @liddk

Comment on lines 29 to 32
elif selected_backend == _Backend.APPEND_ATTN:
return (
"fastdeploy.model_executor.layers.attention.IluvatarAttnBackend"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个最好通过env设定FD_ATTENTION_BACKEND为ILUVATAR_ATTN来控制,借用APPEND_ATTN不太合理

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, 只返回固定的IluvatarAttnBackend

@@ -63,6 +63,12 @@ def is_dcu(self) -> bool:
"""
return paddle.is_compiled_with_rocm()

def is_iluvatar(self) -> bool:
"""
whether platform is npu
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not npu

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@yongqiangma yongqiangma changed the title Adapt for iluvatar gpu [iluvatar_gpu] Adapt for iluvatar gpu Jul 7, 2025
yongqiangma
yongqiangma previously approved these changes Jul 7, 2025
Copy link
Collaborator

@yongqiangma yongqiangma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yongqiangma yongqiangma merged commit 1b54a28 into PaddlePaddle:develop Jul 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants