-
Notifications
You must be signed in to change notification settings - Fork 36
【Hackathon 9th No.99】[Feature Enhancement]Add tensorrt backend for compiler #237
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Thanks for your contribution! |
fangfangssj
commented
Aug 25, 2025
lixinqi
reviewed
Aug 25, 2025
lixinqi
reviewed
Aug 26, 2025
lixinqi
approved these changes
Aug 27, 2025
JewelRoam
pushed a commit
to JewelRoam/GraphNet
that referenced
this pull request
Oct 29, 2025
…mpiler (PaddlePaddle#237) * add tensorrt for compiler * fix bug * fix code * Update test_compiler.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
Feature Enhancement
Description
为test_compiler添加tensorrt后端
samples里面提取的计算图有GPU和CPU上的两种类型,为test_compiler添加根据当前设备来加载计算图,而不是使用计算图中信息,避免tensorrt后端无法编译加载到cpu上的计算图和纯cpu设备上无法加载GPU提取的计算图。
直接使用torch.compile(m, backend="tensorrt")来添加tensorrt后端,使用TORCH_LOGS='all'来捕捉日志
samples下的所有类别的计算图,随机抽取十个计算图进行测试,百分之百的成功率,在看log的时候,大部分模型Dynamo会直接跟踪一个完整的计算图,交给后端编译,但跟踪部分计算图时被打断为子图,每一个都子图交给后端编译,(timm系列比较严重,参考#238)
前端使用Dynamo来跟踪前向传播,后端使用tensorrt编译,黄色框里为测试log输出


下面为提取一个模型时的原始log信息
out.txt