-
Notifications
You must be signed in to change notification settings - Fork 601
[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
Conversation
Thanks for your contribution! |
26dc70f
to
22dc404
Compare
@@ -0,0 +1,55 @@ | |||
|
|||
/* Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有一些文件没有加Copyright,加一下,然后改一下这里的20024→2025吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
custom_ops/iluvatar_ops/helper.h
Outdated
#include <sys/types.h> | ||
#include <unistd.h> | ||
|
||
#ifdef PADDLE_WITH_HIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要hip代码吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
d1a3f6b
to
c0a1314
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
代码看下来没什么问题,希望PR描述、标题可以补充更多信息。比如在PR描述中给出当前的支持进度、适配局限性、后续适配计划等等,当然可能也包括对FastDeploy在硬件适配方面的一些意见,相信这是飞桨与天数智芯在大模型推理方向合作的一个里程碑,后续一定会有更多适配和维护计划~ |
代码冲突需要解决一下,解决后我可以来帮忙Approve与合入 @liddk |
fastdeploy/platforms/iluvatar.py
Outdated
elif selected_backend == _Backend.APPEND_ATTN: | ||
return ( | ||
"fastdeploy.model_executor.layers.attention.IluvatarAttnBackend" | ||
) |
There was a problem hiding this comment.
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不太合理
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, 只返回固定的IluvatarAttnBackend
fastdeploy/platforms/base.py
Outdated
@@ -63,6 +63,12 @@ def is_dcu(self) -> bool: | |||
""" | |||
return paddle.is_compiled_with_rocm() | |||
|
|||
def is_iluvatar(self) -> bool: | |||
""" | |||
whether platform is npu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not npu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
目前FD已在天数硬件上完成兼容适配。
依赖适配的版本信息如下:
天数sdk:4.3.0
PaddlePaddle:3.1.0
Paddle Iluvatar GPU: 4.3.0
当前版本为体验版本,更多的性能优化和模型支持请期待后续PR。