-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix Segmentation Fault For Tensorrt BYOC when TVM_TENSORRT_CACHE_DIR is Set #7162
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
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
a436c43
sync vta-hw
a82be60
Merge remote-tracking branch 'upstream/main' into main
42d1895
Merge remote-tracking branch 'upstream/main' into main
66c7839
Merge remote-tracking branch 'upstream/main' into main
c42e1cc
sync with remote
a4abee1
sync for vta-hw
2fbfba4
sync for tvm
e72cac1
upgrade dmlc-core
63c50ba
Merge remote-tracking branch 'upstream/main' into main
de91b6a
syn with upstream
86a17ae
Merge remote-tracking branch 'upstream/main' into main
4dee782
sync
b51ca36
Merge remote-tracking branch 'upstream/main' into main
98f8eb8
fix tensorrt runtime error when load from cache
38d59e5
sync 3rd party
4114555
fix lint
2216908
fix clang format
08a369d
clang format
aac7620
clang format
68a74e1
Merge remote-tracking branch 'upstream/main' into debug_trt
e8fab0a
Merge remote-tracking branch 'upstream/main' into debug_trt
bee0450
fix reshape attr loss error
1256f1c
sync upstream
6084250
sync with upstream
7e58d4d
Merge remote-tracking branch 'upstream/main' into debug_trt
5598d6e
refactor
fb273d3
make cleanup public
75ca51b
fix lint
236fb41
sync vta-hw
2c9af6e
remove cleanup
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
We are building the TRT network in the TensorRTBuilder, but exiting before
BuildEngineis called. This means the resources used bybuilderwon't ever be freed (TensorRTBuilder::CleanUp()) needs to be called.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.
We also shouldnt have to rebuild the whole nextwork just to allocate the buffers.
Uh oh!
There was an error while loading. Please reload this page.
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.
If the
CleanUpis added, there will be a segmentation fault and so I don't callCleanUp.In the
BuildEnginefunction fromtensorrt_runtime.cc, the whole network has not been actually rebuilt since the function returns beforebuilder.BuildEnginegets called.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.
I think the best solution is to move
CreateDeviceBuffersout of TensorRTBuilder and into the runtime module. That way we can call it without the unnecessary allocations and creations done by TensorRTBuilder