-
Notifications
You must be signed in to change notification settings - Fork 596
[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
base: develop
Are you sure you want to change the base?
Conversation
Kane2011
commented
Aug 19, 2025
1. adapt for the latest fastdeploy 2. add docs
|
Thanks for your contribution! |
fastdeploy/worker/metax_worker.py
Outdated
|
|
||
| end_time = time.perf_counter() | ||
| # temporary fix kvcache size to test | ||
| fd_kvache_mem = os.getenv("FD_KVCACHE_MEM") |
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.
这是个新增环境变量吗,什么场景下会用到?
- 必须要保留的话需要规范下命名,记录在 FastDeploy/fastdeploy/envs.py 和FastDeploy/docs/usage/environment_variables.md 中
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.
好的, 这个是我们自己测试使用。 指定kv cache size, 不是通过profiler run calc 得出。
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.
已更新: 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: |
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.
同上,建议规范下命名,带上Metax相关的统一前缀
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.
这个我们其它地方都是使用统一的MACA 前缀,应该不太好修改。
对我们来说,MACA 等同于 CUDA的概念。
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.
好的, 这个我们需要写到 这个文件吗?FastDeploy/docs/usage/environment_variables.md
可以写进去
1. adapt for the latest fastdeploy 2. add docs