trt_config.py 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. # copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. TRT_CFG = {
  15. "DETR-R50": {"optimization_level": 4, "workspace_size": 1 << 32},
  16. "SegFormer-B0": {"optimization_level": 4, "workspace_size": 1 << 32},
  17. "SegFormer-B1": {"optimization_level": 4, "workspace_size": 1 << 32},
  18. "SegFormer-B2": {"optimization_level": 4, "workspace_size": 1 << 32},
  19. "SegFormer-B3": {"optimization_level": 4, "workspace_size": 1 << 32},
  20. "SegFormer-B4": {"optimization_level": 4, "workspace_size": 1 << 32},
  21. "SegFormer-B5": {"optimization_level": 4, "workspace_size": 1 << 32},
  22. "LaTeX_OCR_rec": {"disable_ops": ["pd_op.slice"]},
  23. "PP-YOLOE_seg-S": {"disable_ops": ["pd_op.slice", "pd_op.bilinear_interp"]},
  24. "PP-FormulaNet-L": {
  25. "disable_ops": ["pd_op.full_with_tensor"],
  26. "workspace_size": 1 << 32,
  27. },
  28. "PP-FormulaNet-S": {
  29. "disable_ops": ["pd_op.full_with_tensor"],
  30. "workspace_size": 1 << 32,
  31. },
  32. }