Add fused BA path#85
Merged
Merged
Conversation
Closed
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.
Summary:
pipeline.slam.ba.fused.slam_ext.ba_extendedfor optional depth masking and intrinsic optimization.Notes:
Benchmark:
/home/huangjh/Downloads/lyra2-temple.mp4withpipeline=default(762 frames processed).pipeline.output.save_viz=false,pipeline.post.depth_align_model=null,pipeline.output.save_artifacts=false,pipeline.output.save_slam_map=false; SLAM keyframe depth remains at thepipeline=defaultsetting.CUDA_HOME=/usr/local/cuda-12.8 VIPE_EXT_JIT=1 MAX_JOBS=8.ninja: no work to do), so compile time is not included.End-to-end wall time:
pipeline.slam.ba.fused=falsepipeline.slam.ba.fused=trueEnd-to-end delta: 37.48s saved, 32.3% lower wall time, 1.48x speedup.
Isolated BA timing:
ba.fused=falseBA timeba.fused=trueBA timeBA-only method: timed
GraphBuffer.bundle_adjustmentwith CUDA synchronization before and after each call, using the same video and common overrides. Each run made 1723 BA calls. Isolated BA time drops by about 82.6%, and the BA-only saving accounts for essentially all of the measured end-to-end saving on this benchmark.Validation:
CUDA_HOME=/usr/local/cuda-12.8 VIPE_EXT_JIT=1 MAX_JOBS=8 uv run python -m unittest tests.test_graph_buffer_fused_ba -vCUDA_HOME=/usr/local/cuda-12.8 VIPE_EXT_JIT=1 MAX_JOBS=8 uv run python -m unittest tests.test_slam_ext_ba_extended -vuv run pytest tests/test_config.py -quv run ruff format --check vipe/config/slam.py vipe/slam/components/buffer.py tests/test_config.py tests/test_graph_buffer_fused_ba.py tests/test_slam_ext_ba_extended.pyuv run ruff check vipe/config/slam.py vipe/slam/components/buffer.py tests/test_config.py tests/test_graph_buffer_fused_ba.py tests/test_slam_ext_ba_extended.pyuv run mypy vipe/config/slam.py vipe/slam/components/buffer.py tests/test_config.py tests/test_graph_buffer_fused_ba.py