Skip to content
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

feat: add tensorrt support #688

Merged
merged 41 commits into from
May 4, 2022
Merged

feat: add tensorrt support #688

merged 41 commits into from
May 4, 2022

Conversation

numb3r3
Copy link
Member

@numb3r3 numb3r3 commented Apr 22, 2022

TODO:

  • offline tensorrt converting: The converting from onnx to tensorrt takes a while (10 mins per model), which is not friendly in production.
  • optimize onnx converting using onnx_simpler
  • unittest to increase test coverage
  • documentation for tensorrt

@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #688 (dd50dc1) into main (33efcb0) will increase coverage by 2.11%.
The diff coverage is 91.03%.

@@            Coverage Diff             @@
##             main     #688      +/-   ##
==========================================
+ Coverage   78.15%   80.27%   +2.11%     
==========================================
  Files          12       16       +4     
  Lines         943     1100     +157     
==========================================
+ Hits          737      883     +146     
- Misses        206      217      +11     
Flag Coverage Δ
cas 80.27% <91.03%> (+2.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/clip_server/model/trt_utils.py 83.51% <83.51%> (ø)
server/clip_server/model/clip_trt.py 92.30% <92.30%> (ø)
server/clip_server/executors/helper.py 96.77% <96.77%> (ø)
client/clip_client/__init__.py 100.00% <100.00%> (ø)
server/clip_server/__init__.py 100.00% <100.00%> (ø)
server/clip_server/executors/clip_onnx.py 81.63% <100.00%> (+1.63%) ⬆️
server/clip_server/executors/clip_torch.py 87.34% <100.00%> (+0.60%) ⬆️
server/clip_server/executors/clip_trt.py 100.00% <100.00%> (ø)
server/clip_server/model/clip.py 86.42% <100.00%> (+0.09%) ⬆️
server/clip_server/model/clip_onnx.py 96.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f34d46...dd50dc1. Read the comment docs.

@github-actions
Copy link

github-actions bot commented May 4, 2022

📝 Docs are deployed on https://ft-feat-tensorrt--jina-docs.netlify.app 🎉

@numb3r3 numb3r3 merged commit f7b9af4 into main May 4, 2022
@numb3r3 numb3r3 deleted the feat-tensorrt branch May 4, 2022 09:18
diegofiori pushed a commit to diegofiori/clip-as-service that referenced this pull request May 12, 2022
* fix: drafts tempt

* feat: support tensorrt backend

* fix: offline tensorrt loading

* fix: remove draft Dockerfile

* fix: setup

* fix: s3 bucket for tensorrt

* fix: polish codes

* fix: int64 input tensors

* fix: rebase

* fix: refactor preprocess

* fix: deprecate _preprocess_blob

* fix: refacotr

* fix: available model for tensorrt

* fix: warning message

* fix: imports

* fix: draft tensorrt tests

* fix: tensrrt output

* fix: trt test

* fix: tensorrt deps

* fix: runtimeerrr re-initialized torch in pytest

* fix: compute capability

* fix: dynamic trt converting

* fix: ci workflow

* fix: import onnxruntime

* fix: errors

* fix: upload cov file

* fix: upload cov file

* fix: minor revision

* chore: update ocs

* fix: try to fix cov uploader

* fix: temp diable netfily

* fix: temp diable netfily

* fix: revert netifly

* fix: gpu test

* fix: runs on

* fix: upgrade cov action

* fix: use cov bash uploader

* fix: action checkout fetch-depth

* fix: rebase conflict

* fix: cov uploader

* fix: setup script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant