Skip to content

Conversation

@aquagull
Copy link
Contributor

@aquagull aquagull commented Aug 5, 2025

ernie4_5_vl_moe适配CudaGraph。

  1. 添加了MOE算子对0-Size Tensor 的支持。
  2. 为避免在forward过程中动态插入图像特征,将embedding层的处理逻辑从模型移到了提到CasualLM层。
  3. 改用静态内存地址作为输入。

@paddle-bot
Copy link

paddle-bot bot commented Aug 5, 2025

Thanks for your contribution!

@aquagull aquagull changed the title [WIP] MM model support CudaGraph [WIP] Multimodal-Model support CudaGraph Aug 5, 2025
@aquagull aquagull changed the title [WIP] Multimodal-Model support CudaGraph [Feat] Multimodal-Model support CudaGraph Aug 7, 2025
@aquagull aquagull changed the title [Feat] Multimodal-Model support CudaGraph [Feat] ERNIE-4.5-VL-MOE support CudaGraph Aug 7, 2025
@aquagull aquagull marked this pull request as ready for review August 8, 2025 03:15
@aquagull aquagull marked this pull request as draft August 19, 2025 09:07
@aquagull aquagull marked this pull request as ready for review August 25, 2025 06:35
@gongshaotian
Copy link
Collaborator

麻烦处理下冲突,这个PR合入的同时能否把多模的CI 流水线里的CUDAGraph监控打开

@aquagull aquagull changed the title [Feat] ERNIE-4.5-VL-MOE support CudaGraph [Feat] ernie4_5_vl_moe support CudaGraph Sep 1, 2025
ids_remove_padding=ids_remove_padding,
image_features=image_features,
forward_meta=forward_meta,
vl_moe_meta=vl_moe_meta,
Copy link
Collaborator

Choose a reason for hiding this comment

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

有性能测试结果吗,移出来后对P节点的性能是否有影响?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

暂时没有测试过PD分离场景

Comment on lines +39 to +41
if (num_rows == 0){
return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

c++代码最好也格式化一下

Copy link
Collaborator

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

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

LGTM

@gongshaotian gongshaotian merged commit 453487d into PaddlePaddle:develop Sep 10, 2025
15 of 17 checks passed
dtype = meta["dtype"]
if "." in meta["dtype"]:
dtype = _resolve_path(fd_config, meta["dtype"])
self._mm_buffers[name] = paddle.full(
Copy link
Collaborator

Choose a reason for hiding this comment

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

_mm_buffers这个变量名也改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants