Skip to content

Conversation

fangfangssj
Copy link
Contributor

@fangfangssj fangfangssj commented Sep 2, 2025

PR Category

Feature Enhancement

Description

添加tvm后端,使用tvm中relax前端和compile后端来进行处理,(relay前端在新版本中被去掉了)
测试使用tvm版本为0.22.0
tvm使用cuda需要从源码编译安装,参考https://github.com/apache/tvm/blob/main/docs/install/from_source.rst

tvm的性能依赖于pass,按照文档中基础的pass会性能很差,不如torch原生的前向推理,如果使用自动调优的话,性能上会好一些,但是一个简单的模型要花费数小时来进行优化,编译很慢
tvm的dynamo来加载计算图时,大部分大模型的embedding层它无法识别,也没办法使用

(tvm官网的文档是我看过最烂的文档,没有一个示例能正常运行,9.2文档官网还乱码了,点着点着就到0.12版本去了)

Copy link

paddle-bot bot commented Sep 2, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Sep 2, 2025
@lixinqi lixinqi merged commit 3c73c60 into PaddlePaddle:develop Sep 2, 2025
3 checks passed
@luotao1 luotao1 changed the title [Feature Enhancement] Add Tvm Backend for test_compiler 【Hackathon 9th No.97】[Feature Enhancement] Add Tvm Backend for test_compiler Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants