Skip to content

[MetaxGPU] adapt fastdeploy on metax gpu #3466

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Kane2011
Copy link
Contributor

1. adapt for the latest fastdeploy
2. add installation docs

U-METAX-TECH\kgao and others added 2 commits August 19, 2025 06:00
Copy link

paddle-bot bot commented Aug 19, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 19, 2025

end_time = time.perf_counter()
# temporary fix kvcache size to test
fd_kvache_mem = os.getenv("FD_KVCACHE_MEM")
Copy link
Collaborator

Choose a reason for hiding this comment

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

这是个新增环境变量吗,什么场景下会用到?

  1. 必须要保留的话需要规范下命名,记录在 FastDeploy/fastdeploy/envs.py 和FastDeploy/docs/usage/environment_variables.md 中

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的, 这个是我们自己测试使用。 指定kv cache size, 不是通过profiler run calc 得出。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已更新: FD_KVCACHE_MEM --> FD_METAX_KVCACHE_MEM

paddle_allocated_mem_before_run = paddle.device.cuda.max_memory_allocated(local_rank) # not reserved

device_id = int(self.device_ids[local_rank])
if os.getenv("MACA_VISIBLE_DEVICES") is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上,建议规范下命名,带上Metax相关的统一前缀

Copy link
Contributor Author

@Kane2011 Kane2011 Aug 19, 2025

Choose a reason for hiding this comment

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

这个我们其它地方都是使用统一的MACA 前缀,应该不太好修改。
对我们来说,MACA 等同于 CUDA的概念。

Copy link
Collaborator

Choose a reason for hiding this comment

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

好的, 这个我们需要写到 这个文件吗?FastDeploy/docs/usage/environment_variables.md

可以写进去

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.

2 participants