rfdetr-seg: Triton kernel for post-processing (Jetson Orin NX 8GB)#2403
Open
aseembits93 wants to merge 17 commits into
Open
rfdetr-seg: Triton kernel for post-processing (Jetson Orin NX 8GB)#2403aseembits93 wants to merge 17 commits into
aseembits93 wants to merge 17 commits into
Conversation
2318a9c to
60dea68
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.
What does this PR do?
It optimizes RF-DETR instance-segmentation RLE post-processing:
The hot path generates compact COCO RLE records from RF-DETR mask logits with Triton instead of materializing full-size dense upsampled masks and compressing them back to RLE. The implementation selects query/class metadata on GPU, supports up to 4 passing classes per query, generates sparse RLE runs directly from interpolation metadata, and copies only compact metadata/run records back.
The torch reference path remains available when Triton fast-path preconditions are not met.
Type of Change
Testing
Test details:
Everything ran on a Jetson Orin NX 8GB
Reference command on
main:Candidate command on
opt-python-postproc:vehicles_312px.mp4 (538 frames, src 312x176):
vehicles_720p.mp4 (538 frames, src 1280x720):
vehicles_1080p.mp4 (538 frames, src 1920x1080):
mainflags-offThe non-byte-identical RLEs decode to semantically matching masks; the minimum mask IoU is caused by empty-mask IoU bookkeeping.
Each row uses 100 captured calls and 300 timed replays.
The captured replay cases can be regenerated with the same script by using
--mode capture-and-replay --video_reference <video> --cases-dir <new-cases-dir>.Results:
22 passedand36 passed.Checklist
Additional Context
This PR is intentionally scoped to Triton RLE post-processing. The next PR adds Triton preprocessing on top of this branch, and the top PR adds CUDA graph / depth-2 pipeline integration plus CPU response-path optimizations.