# \[Bounty $2000\] RT-DETR + RT-DETRv2 bring up using TTNN APIs

**URL:** <https://www.deusop.org/t/bounty-2000-rt-detr-rt-detrv2-bring-up-using-ttnn-apis/205>\
**Category:** Bounties\
**Tags:** completed\
**Created:** [July 11, 2026, 11:32am UTC](https://www.deusop.org/t/bounty-2000-rt-detr-rt-detrv2-bring-up-using-ttnn-apis/205 "2026-07-11T11:32:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaraFlux](https://www.deusop.org/user_avatar/www.deusop.org/claraflux/32/10_2.png) [@ClaraFlux](https://www.deusop.org/u/ClaraFlux)\
**Post date:** [July 11, 2026, 11:32am UTC](https://www.deusop.org/t/bounty-2000-rt-detr-rt-detrv2-bring-up-using-ttnn-apis/205/1 "2026-07-11T11:32:27Z")

</div>

Tenstorrent Bounties

> <https://github.com/tenstorrent/tt-metal/issues/30869>
>
> \### 📝 Background
> 
> This bounty is for bringing up \[RT-DETR (Real-Time DEtection T…Ransformer)\](https://github.com/lyuwenyu/RT-DETR) using TTNN APIs on Tenstorrent hardware (Wormhole or Blackhole). RT-DETR is an end-to-end transformer-based object detector designed for real-time inference. It eliminates non-maximum suppression (NMS) and uses a hybrid CNN–Transformer encoder with dynamic query selection to balance speed and accuracy. Later versions (e.g., RT-DETRv2) introduce bag-of-freebies training improvements and architecture refinements for even higher performance.  
> 
> The goal is to enable efficient, end-to-end RT-DETR inference on TT hardware for high-throughput, low-latency object detection, showcasing the platform’s suitability for transformer-heavy vision workloads.
> 
> \### 🎯 What Success Looks Like
> 
> A successful submission will fulfill all requirements below. Payout is made after \*\*all three stages\*\* are completed.
> 
> \### Stage 1 — Bring-Up
> 
> \- Implement RT-DETR using TTNN APIs (Python).  
> \- Runs on N150 or N300 without runtime errors.  
> \- Produces valid detections (bounding boxes + class labels) on sample images.  
> \- Output is numerically/verifiably aligned with a PyTorch reference (small validation set).  
> \- Accuracy evaluated on the COCO dataset, following \[YOLOv4 demo instructions\](https://github.com/tenstorrent/tt-metal/tree/main/models/demos/yolov4#coco-2017-dataset).  
> \- Include clear environment setup and run instructions.
> 
> \### Stage 2 — Basic Optimizations
> 
> \- Use optimal sharded/interleaved memory configs for convolutional and attention layers.  
> \- Fuse simple ops where possible (e.g., Linear + Bias + Activation, or conv + activation).  
> \- Store intermediates in L1 when beneficial.  
> \- Follow recommended TTNN/tt-metal CNN + Transformer flows.  
> \- Use TT fused ops like \[relu with conv\](https://github.com/tenstorrent/tt-metal/pull/29236).  
> \- Profile encoder/decoder stages and eliminate redundant Tensor Manipulations (TMs).
> 
> \### Stage 3 — Deeper Optimization
> 
> \- Maximize core parallelism across encoder/decoder layers.  
> \- Implement deeper TT-specific optimizations (e.g., fused QKV + SDPA, operator reordering to reduce TM overheads).  
> \- Optimize hybrid CNN–Transformer fusion to minimize memory transfers.  
> \- Document any advanced tuning or known issues.
> 
> \### 🧭 Guidance & Starting Points
> 
> \- Use the \[TTNN model bring-up tech report\](https://github.com/tenstorrent/tt-metal/blob/main/tech\_reports/ttnn/TTNN-model-bringup.md) as your primary reference.
> \- Reference \[Yolov4 implementation (PR 29157)\](https://github.com/tenstorrent/tt-metal/pull/29157) for example end-to-end flows.
> \- \[RT-DETR Paddle/PyTorch implementation\](https://github.com/lyuwenyu/RT-DETR)
> \- Refer to \[TT fused ops\](https://github.com/tenstorrent/tt-metal/pull/29236) for opportunities to optimize.
> \- Target input resolutions: Start with 640×640 images (common config) and COCO-style evaluation; adjust as needed for TT hardware.
> \- Ask for help or file issues if ops are missing in TTNN.
> 
> \### 🔎 Possible Approaches
> 
> \- Port an existing PyTorch RT-DETR step-by-step (backbone → encoder → decoder → prediction heads).  
> \- Validate intermediate tensors against CPU/PyTorch reference.  
> \- Profile encoder attention and multi-scale fusion; apply fusion/reshape optimizations to reduce TM overheads.  
> \- Add decoder-layer control flags to demonstrate speed vs. accuracy scaling.  
> \- Use TTNN profiling tools to identify bottlenecks.  
> \- Open a draft PR early for feedback on approach and performance metrics.
> 
> \### 📊 Result submission guidelines notes
> 
> Beyond the model implementation itself. Contributors must submit the following material as a proof of work. However, feel free to open a PR at any time if you want us checking you are on the right track. Just understand that payout is only made after all 3 stages are completed.
> 
> \- Functional model implementation
> \- Validation logs (output correctness)
> \- Performance report + header for final review
> 
> Links:
> \- \[Link to perf sheet\](https://github.com/tenstorrent/tt-metal/blob/main/tech\_reports/ttnn/TTNN-model-bringup.md#41-performance-sheet)
> \- \[Perf header\](https://docs.tenstorrent.com/tt-metal/latest/ttnn/ttnn/profiling\_ttnn\_operations.html#perf-report-headers)
> 
> \---
> 
> \### 📚 Resources
> 
> \- \[TTNN model bring-up tech report\](https://github.com/tenstorrent/tt-metal/blob/main/tech\_reports/ttnn/TTNN-model-bringup.md)
> \- \[CNN Bring-up & Optimization in TT-NN\](https://github.com/tenstorrent/tt-metal/blob/main/tech\_reports/CNNs/cnn\_optimizations.md)
> \- \[Yolov4 TTNN implementation PR\](https://github.com/tenstorrent/tt-metal/pull/29157)
> \- \[RT-DETR Paddle/PyTorch implementation\](https://github.com/lyuwenyu/RT-DETR)
> \- \[TT fused ops PR\](https://github.com/tenstorrent/tt-metal/pull/29236)
> \- \[Perf report header\](https://docs.tenstorrent.com/tt-metal/latest/ttnn/ttnn/profiling\_ttnn\_operations.html#perf-report-headers)

Issue ID: I\_kwDOI9Wqc87SoooR

### 📝 Background

This bounty is for bringing up [RT-DETR (Real-Time DEtection TRansformer)](https://github.com/lyuwenyu/RT-DETR) using TTNN APIs on Tenstorrent hardware (Wormhole or Blackhole). RT-DETR is an end-to-end transformer-based object detector designed for real-time inference. It eliminates non-maximum suppression (NMS) and uses a hybrid CNN–Transformer encoder with dynamic query selection to balance speed and accuracy. Later versions (e.g., RT-DETRv2) introduce bag-of-freebies training improvements and architecture refinements for even higher performance.

The goal is to enable efficient, end-to-end RT-DETR inference on TT hardware for high-throughput, low-latency object detection, showcasing the platform’s suitability for transformer-heavy vision workloads.

### 🎯 What Success Looks Like

A successful submission will fulfill all requirements below. Payout is made after **all three stages** are completed.

### Stage 1 — Bring-Up

- Implement RT-DETR using TTNN APIs (Python).
- Runs on N150 or N300 without runtime errors.
- Produces valid detections (bounding boxes + class labels) on sample images.
- Output is numerically/verifiably aligned with a PyTorch reference (small validation set).
- Accuracy evaluated on the COCO dataset, following [YOLOv4 demo instructions](https://github.com/tenstorrent/tt-metal/tree/main/models/demos/yolov4#coco-2017-dataset).
- Include clear environment setup and run instructions.

### Stage 2 — Basic Optimizations

- Use optimal sharded/interleaved memory configs for convolutional and attention layers.
- Fuse simple ops where possible (e.g., Linear + Bias + Activation, or conv + activation).
- Store intermediates in L1 when beneficial.
- Follow recommended TTNN/tt-metal CNN + Transformer flows.
- Use TT fused ops like [relu with conv](https://github.com/tenstorrent/tt-metal/pull/29236).
- Profile encoder/decoder stages and eliminate redundant Tensor Manipulations (TMs).

### Stage 3 — Deeper Optimization

- Maximize core parallelism across encoder/decoder layers.
- Implement deeper TT-specific optimizations (e.g., fused QKV + SDPA, operator reordering to reduce TM overheads).
- Optimize hybrid CNN–Transformer fusion to minimize memory transfers.
- Document any advanced tuning or known issues.

### 🧭 Guidance & Starting Points

- Use the [TTNN model bring-up tech report](https://github.com/tenstorrent/tt-metal/blob/main/tech_reports/ttnn/TTNN-model-bringup.md) as your primary reference.
- Reference [Yolov4 implementation (PR 29157)](https://github.com/tenstorrent/tt-metal/pull/29157) for example end-to-end flows.
- [RT-DETR Paddle/PyTorch implementation](https://github.com/lyuwenyu/RT-DETR)
- Refer to [TT fused ops](https://github.com/tenstorrent/tt-metal/pull/29236) for opportunities to optimize.
- Target input resolutions: Start with 640×640 images (common config) and COCO-style evaluation; adjust as needed for TT hardware.
- Ask for help or file issues if ops are missing in TTNN.

### 🔎 Possible Approaches

- Port an existing PyTorch RT-DETR step-by-step (backbone → encoder → decoder → prediction heads).
- Validate intermediate tensors against CPU/PyTorch reference.
- Profile encoder attention and multi-scale fusion; apply fusion/reshape optimizations to reduce TM overheads.
- Add decoder-layer control flags to demonstrate speed vs. accuracy scaling.
- Use TTNN profiling tools to identify bottlenecks.
- Open a draft PR early for feedback on approach and performance metrics.

### 📊 Result submission guidelines notes

Beyond the model implementation itself. Contributors must submit the following material as a proof of work. However, feel free to open a PR at any time if you want us checking you are on the right track. Just understand that payout is only made after all 3 stages are completed.

- Functional model implementation
- Validation logs (output correctness)
- Performance report + header for final review

Links:

- [Link to perf sheet](https://github.com/tenstorrent/tt-metal/blob/main/tech_reports/ttnn/TTNN-model-bringup.md#41-performance-sheet)
- [Perf header](https://docs.tenstorrent.com/tt-metal/latest/ttnn/ttnn/profiling_ttnn_operations.html#perf-report-headers)

* * *

### 📚 Resources

- [TTNN model bring-up tech report](https://github.com/tenstorrent/tt-metal/blob/main/tech_reports/ttnn/TTNN-model-bringup.md)
- [CNN Bring-up & Optimization in TT-NN](https://github.com/tenstorrent/tt-metal/blob/main/tech_reports/CNNs/cnn_optimizations.md)
- [Yolov4 TTNN implementation PR](https://github.com/tenstorrent/tt-metal/pull/29157)
- [RT-DETR Paddle/PyTorch implementation](https://github.com/lyuwenyu/RT-DETR)
- [TT fused ops PR](https://github.com/tenstorrent/tt-metal/pull/29236)
- [Perf report header](https://docs.tenstorrent.com/tt-metal/latest/ttnn/ttnn/profiling_ttnn_operations.html#perf-report-headers)
