Compare commits
3 Commits
a6130b5102
...
b67bda8042
| Author | SHA1 | Date | |
|---|---|---|---|
| b67bda8042 | |||
| bcabe65984 | |||
| 02c30d7461 |
48
.gitignore
vendored
48
.gitignore
vendored
@@ -1,4 +1,46 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
.Python
|
||||
*.egg-info/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# traefile AI
|
||||
.trae/
|
||||
|
||||
# 日志文件
|
||||
logs/
|
||||
*.log
|
||||
|
||||
# 模型文件(忽略中间产物)
|
||||
models/*.onnx
|
||||
|
||||
# 环境配置
|
||||
.env
|
||||
.env.local
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# 测试覆盖率
|
||||
htmlcov/
|
||||
.coverage
|
||||
.coverage.*
|
||||
*.coverag
|
||||
|
||||
# 说明文档(不随代码仓库分发)
|
||||
CHANGELOG.md
|
||||
.trae/documents/plan_20260129_104739.md
|
||||
.trae/rules/commit_rules.md
|
||||
.trae/documents/将 yolov8 替换为 yolo11n.md
|
||||
README.md
|
||||
*.md
|
||||
!requirements.txt
|
||||
|
||||
@@ -331,19 +331,18 @@ class TensorRTEngine:
|
||||
return {"total_mb": 0, "used_mb": 0, "free_mb": 0}
|
||||
|
||||
def _release_resources(self):
|
||||
"""释放资源"""
|
||||
"""释放资源(Python TensorRT 由 GC 管理,无需 destroy)"""
|
||||
if self._stream:
|
||||
try:
|
||||
self._stream.synchronize()
|
||||
except Exception:
|
||||
pass
|
||||
self._stream = None
|
||||
|
||||
if self._context:
|
||||
self._context.destroy()
|
||||
self._context = None
|
||||
|
||||
if self._engine:
|
||||
self._engine.destroy()
|
||||
self._engine = None
|
||||
|
||||
self._memory_pool.clear()
|
||||
|
||||
Reference in New Issue
Block a user