Skip to content

fix: Optimize TensorRT backend to avoid duplicate host-memory allocation during engine deserialization#118

Merged
pskiran1 merged 2 commits into
mainfrom
spolisetty/tri-473-amazon-adstensorrt-trt-engine-deserialization-causes-2x-cpu
Jan 7, 2026
Merged

fix: Optimize TensorRT backend to avoid duplicate host-memory allocation during engine deserialization#118
pskiran1 merged 2 commits into
mainfrom
spolisetty/tri-473-amazon-adstensorrt-trt-engine-deserialization-causes-2x-cpu

Conversation

@pskiran1
Copy link
Copy Markdown
Member

@pskiran1 pskiran1 commented Jan 6, 2026

No description provided.

@pskiran1 pskiran1 requested a review from Copilot January 6, 2026 13:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes TensorRT engine deserialization by eliminating an unnecessary intermediate buffer allocation. Instead of copying the model data from a string to a vector, the code now directly uses the string's data pointer, reducing memory overhead and improving performance during engine loading.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/loader.cc
@pskiran1 pskiran1 requested a review from Copilot January 6, 2026 14:09

This comment was marked as resolved.

@pskiran1 pskiran1 marked this pull request as ready for review January 6, 2026 14:35
@pskiran1 pskiran1 requested review from whoisj and yinggeh January 6, 2026 17:21
yinggeh
yinggeh previously approved these changes Jan 6, 2026
@yinggeh
Copy link
Copy Markdown
Contributor

yinggeh commented Jan 6, 2026

Need to update copyrights

@pskiran1 pskiran1 merged commit ca5d069 into main Jan 7, 2026
1 check passed
@pskiran1 pskiran1 deleted the spolisetty/tri-473-amazon-adstensorrt-trt-engine-deserialization-causes-2x-cpu branch January 7, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants