feat: TensorRT FP16 depth estimation backend#158
Closed
Conversation
- Upgrade PyTorch CUDA wheels from cu124 to cu126 (RTX 4090/5090) - Fix _load_config() dropping CLI args (--model, --colormap, --blend-mode) - Add deploy.bat for Windows venv + CUDA setup - Add cross-platform benchmark.py (CoreML + PyTorch/CUDA/MPS/CPU) - Track models.json (platform model registry) - Bump depth-estimation version 1.1.0 → 1.2.0 in skills.json
- _load_tensorrt(), _build_trt_engine(), _infer_tensorrt() methods - Engine caching at ~/.aegis-ai/models/feature-extraction/trt_engines/ - GPU-specific engine filenames (prevents cross-GPU issues) - IHostMemory bytes() fix for TRT 10.15+ - Graceful fallback: TRT > PyTorch CUDA > CPU - Added --backend CLI arg - Added trt_benchmark.py for standalone benchmarking Benchmark: RTX 4070 Laptop GPU 518x518 PyTorch CUDA FP32: 36.48ms (27.4 FPS) TensorRT FP16: 5.29ms (189 FPS) — 6.9x faster
bbbc9fa to
26b9ff2
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TensorRT FP16 Backend for Depth Anything v2
Benchmark (RTX 4070 Laptop GPU, 518x518)
Changes — purely additive, no existing code modified
transform.py(497 additions, 0 existing lines changed)_load_tensorrt(),_build_trt_engine(),_infer_tensorrt()~/.aegis-ai/models/feature-extraction/trt_engines/bytes()wrapper for TRT 10.15 IHostMemory API--backendCLI arg (auto/tensorrt/pytorch/coreml)trt_benchmark.py(new file)Config files
models.json: TRT FP16 variant for win32requirements.txt:tensorrt>=10.0,onnxruntime-gpu(non-Darwin)deploy.bat: TRT verification stepSKILL.md: Updated hardware backends tableWhat is NOT changed
benchmark.py— untouched