<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kyon on Medium]]></title>
        <description><![CDATA[Stories by kyon on Medium]]></description>
        <link>https://medium.com/@kynkynkyn?source=rss-bffa19536e08------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*G2Q-cdTz2FBhSagCYqqFMg.jpeg</url>
            <title>Stories by kyon on Medium</title>
            <link>https://medium.com/@kynkynkyn?source=rss-bffa19536e08------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:16:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kynkynkyn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Finding One Pose in a Crowd — Detection and Matching, Split, at 0.16 ms/person]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/finding-one-pose-in-a-crowd-detection-and-matching-split-at-0-16-ms-person-9f485d2126e1?source=rss-bffa19536e08------2"><img src="https://cdn-images-1.medium.com/max/1920/1*QmKvzBQxjcijdf1pvsxxog.png" width="1920"></a></p><p class="medium-feed-snippet">Out of a crowd of people moving around, light up only the ones holding a specific pose (say, a tai chi stance), in green, in real time.</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/finding-one-pose-in-a-crowd-detection-and-matching-split-at-0-16-ms-person-9f485d2126e1?source=rss-bffa19536e08------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/finding-one-pose-in-a-crowd-detection-and-matching-split-at-0-16-ms-person-9f485d2126e1?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f485d2126e1</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[pose-estimation]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[tensorrt]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 07:46:51 GMT</pubDate>
            <atom:updated>2026-06-29T04:27:49.713Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Auto-Labeling Unknown Objects: A Vision Model Pipeline for What Models Can’t See]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/auto-labeling-unknown-objects-a-vision-model-pipeline-for-what-models-cant-see-390b2cc1ea39?source=rss-bffa19536e08------2"><img src="https://cdn-images-1.medium.com/max/2600/1*fpv_gRVMTFIwUtQG6FZgNg.png" width="11680"></a></p><p class="medium-feed-snippet">SAM3 + Grounding DINO + VLM: run several strategies in parallel and keep the best one for your object.</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/auto-labeling-unknown-objects-a-vision-model-pipeline-for-what-models-cant-see-390b2cc1ea39?source=rss-bffa19536e08------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/auto-labeling-unknown-objects-a-vision-model-pipeline-for-what-models-cant-see-390b2cc1ea39?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/390b2cc1ea39</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 12:02:28 GMT</pubDate>
            <atom:updated>2026-06-05T05:19:04.519Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SLAM3R × TensorRT: I Hit 37 FPS. The 3D Was Garbage.]]></title>
            <link>https://medium.com/@kynkynkyn/slam3r-tensorrt-37-fps-achieved-but-the-3d-was-broken-f11908a85800?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/f11908a85800</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[tensorrt]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 14:22:21 GMT</pubDate>
            <atom:updated>2026-06-03T09:30:51.510Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIiJ2Zce1uAWhmyDz2L9tw.png" /></figure><p><strong><em>I pushed a CVPR 2025 model from 3 FPS to 37 FPS with TensorRT, popped the champagne, and then actually looked at the output the next morning.</em></strong></p><p>A single smartphone camera turns the space in front of you into a 3D model in real time. Not science fiction, just 2025 tech. <a href="https://github.com/PKU-VCL-3DV/SLAM3R">SLAM3R</a> (Peking University + Meta, <a href="https://cvpr.thecvf.com/Conferences/2025">CVPR 2025</a> Highlight) generates 3D point maps straight from monocular RGB video, with no camera intrinsics or extrinsics required. You give it raw RGB and it reconstructs the scene.</p><p>If VGGT, which I covered in my <a href="https://medium.com/p/cb6e96e14018">previous post</a>, is the best at “photos → 3D,” then SLAM3R is the best at “video → real-time 3D.”</p><p>Out of the box it runs at 3 FPS. Feed it a video and you get a slideshow.</p><p>So I figured TensorRT could probably get it to 30. That was the whole reason I started. The result was 37.4 FPS, a 12x speedup, comfortably past target. If I’d stopped there, this would be a success story.</p><p>I didn’t stop there. The next morning I opened the output point cloud and saw an unrecognizable blob of color, nothing like the room I’d recorded. What 37.4 FPS had been churning out wasn’t 3D. It was high-speed garbage.</p><p>This article is about what happened after that.</p><h3>How SLAM3R Works: Building 3D in Two Stages</h3><p>SLAM3R runs in two stages, and the jigsaw-puzzle framing is the one that stuck with me.</p><p>I2P (Image-to-Points) figures out what’s on each piece. It looks at the last few frames and estimates the local 3D geometry: this is roughly the shape and color of one puzzle piece, worked out without seeing the whole picture yet.</p><p>L2W (Local-to-World) snaps the pieces into place. It takes each fragment I2P produced and fits it into the accumulated global 3D space (world coordinates), placing each piece where it belongs on the board.</p><p>The two stages run in a sliding window, frame by frame. Every new frame goes through “figure out the piece, then snap it in,” and the full scene gradually takes shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sroMKIG4l9YHPYExzxEmSg.png" /></figure><p><em>(Image generated with AI.)</em></p><pre>VGGT vs SLAM3R — Different Design Philosophies  <br><br>                    VGGT                    SLAM3R  <br>─────────────────────────────────────────────────────────  <br>Input               Photo set (unordered)   Video (temporal)  <br>Processing          Batch all-at-once       Sliding window sequential  <br>Architecture        Global Self-Attention   I2P (local) + L2W (global)  <br>Lineage             Oxford VGG + Meta       DUSt3R lineage → Video SLAM</pre><h3>Running It: 3 FPS</h3><p>Environment</p><pre>GPU     : NVIDIA GeForce RTX 5090 (Blackwell, 32GB GDDR7)  <br>PyTorch : 2.12.0.dev (nightly) + CUDA 12.8  <br>TensorRT: 10.14.1  <br>OS      : Windows 11 → WSL2 Ubuntu 24.04</pre><p>One note before anything else: the RTX 5090 (sm_120) doesn’t work with stable PyTorch. Nightly + cu128 is mandatory. I lost some time to this before accepting it.</p><p>Baseline (Library footage, 82 frames)</p><pre>Stage                Time        Speed  <br>──────────────────────────────────────────  <br>Image encoding       2.5s        33 img/s  <br>I2P (local 3D)       2.7s        30 img/s  <br>L2W (global align)   3.0s        21-26 img/s  <br>Total                ~9s  <br>Output               3,515,833 points</pre><p>Fast enough for offline processing. Then you plug in a webcam and reality hits. I built a pipeline that streams webcam frames from Windows over TCP into WSL2, where SLAM3R receives them and runs inference.</p><pre>Inference accounts for 85% of total time. 3-6 FPS.  <br>Camera and networking are fine. Inference is the bottleneck.</pre><h3>torch.compile: Tried It, Failed</h3><p>I started with the laziest option.</p><pre>Configuration               Median (ms)    Speedup  <br>─────────────────────────────────────────────────────  <br>Eager (baseline)            21.3           1.00x  <br>compile (default)           47.1           0.45x  ← slower  <br>compile (enc_blocks only)   24.9           0.86x  <br>compile (heads only)        63.8           0.33x  <br>compile (reduce-overhead)   CRASH</pre><p>Every mode was slower or crashed. torch.compile works for some models and not others, and SLAM3R is firmly the latter. Three reasons:</p><ol><li>Frequent graph breaks. Data-dependent ops like Tensor.item() fragment the graph.</li><li>CuRoPE recompilation. Stride changes in custom CUDA kernels triggered 8 recompilations.</li><li>CUDAGraph incompatibility. In-place caching crashes reduce-overhead mode.</li></ol><p>So much for the silver bullet. On the wrong model it actively hurts. TensorRT was the only path left.</p><h3>Profiler: Know What You’re Fighting</h3><p>Before going to TRT I profiled the internals with torch.profiler.</p><pre>Operation           Self CUDA    Share  <br>──────────────────────────────────────────  <br>GEMM (Linear)       19.4ms       66.9%  ← dominant  <br>BMM (Attention)     2.4ms        8.1%  <br>LayerNorm           2.2ms        7.5%  <br>copy_ + clone       3.3ms        11.4%  <br>CuRoPE              1.3ms        4.4%  <br>softmax             0.5ms        1.6%</pre><p>The number that mattered: CUDA compute takes 9.7ms, but wall-clock time is 21ms. The 11ms gap is CPU → GPU kernel launch overhead.</p><p>Picture a kitchen where the chef can cook the dish in 10 minutes, but the waiter insists on carrying each ingredient over one at a time, 876 round trips between kitchen and dining room. The meal takes 21 minutes. TRT’s biggest win here isn’t “FP16 is faster.” It’s consolidating 876 separate kernel launches into a single fused execution. One order ticket instead of 876 sticky notes, and the overhead disappears.</p><h3>TensorRT Conversion: 73 Locations to Rewrite</h3><p><a href="https://medium.com/p/cb6e96e14018">VGGT’s TRT conversion</a> was relatively painless. Zero custom CUDA kernels.</p><p>SLAM3R is a different animal. Its CuRoPE (Rotary Position Embedding) custom CUDA kernels are scattered across 73 locations, and ONNX can’t trace CUDA kernels. All 73 have to be rewritten in pure PyTorch before the export will even start.</p><p>CuRoPE is only 4.4% of compute in the profiler, so this felt like a lot of work for a rounding error. But it’s all-or-nothing: leave even one location unconverted and the entire ONNX export refuses to run. After replacing all 73, max_diff was 0.004. No issues.</p><h3>“Too Dynamic for TRT”? Not Really.</h3><p>SLAM3R’s decoder processes a variable number of views. This looked like the biggest barrier to conversion, the kind of thing people wave off as “too dynamic for TRT.”</p><p>Reading the code carefully turned up the key detail:</p><blockquote>The decoder doesn’t run one attention over concatenated K/V from all views. It runs cross-attention independently per source view, then aggregates with max-pool.</blockquote><p>That changes everything. Concatenating K/V from all views would mean the tensor shape changes with view count, which TRT hates. But per-view independent processing means each view is the same size, and the view count folds neatly into the batch dimension. That’s exactly the pattern TRT handles best.</p><h3>Four TRT Engines</h3><pre>I2P Pipeline (per frame):  <br>┌─────────────────────┐    ┌──────────────────────┐    ┌────────────┐  <br>│ Encoder (ViT)       │ →  │ Decoder (12 blocks)  │ →  │ LinearHead │  <br>│ TRT FP16, 3.3ms     │    │ TRT FP16, dynamic    │    │ TRT, 0.05ms│  <br>│ Fixed (1,3,224,224)  │    │ N_src=1..15          │    │            │  <br>└─────────────────────┘    └──────────────────────┘    └────────────┘</pre><pre>Component             TRT FP16    Eager    Speedup  <br>──────────────────────────────────────────────────  <br>Encoder (12 blocks)   3.3ms       21ms     6.4x  <br>Decoder (dynamic N=5) 5.0ms       50ms     10x  <br>LinearHead (×2)       0.05ms      0.7ms    14x</pre><p>I2P end-to-end with 2 views came in at 10.1ms, down from 66ms eager. Roughly 6.5x.</p><h3>The Road to 30 FPS: The Bottleneck Was Outside the Model</h3><p>I2P conversion done, integrated into the full pipeline. Result: 5.3 FPS. After all that TRT work, 5.3 FPS. I profiled the details and didn’t like what I found.</p><pre>Stage             Time      Share  <br>─────────────────────────────────────────────  <br>corr_score        6.9ms      5%  <br>I2P (TRT)         10.3ms     8%  <br>L2W (TRT)         12.0ms     9%  <br>_collect_points   24.4ms    18%  ← numpy concat  <br>render            21.3ms    16%  ← point cloud drawing  <br>Python overhead   60.1ms    45%  ← dict ops, tensor moves  <br>─────────────────────────────────────────────  <br>Total             135ms     = 7.4 FPS</pre><p>Model inference (I2P + L2W + corr = 29ms) was only 21% of the total. The other 79% was Python. I’d dropped a race engine into a car with flat tires and the parking brake still on.</p><h3>Five Optimizations</h3><ol><li>_collect_points incremental update (24ms → 0.3ms). Every frame was running numpy concatenate over the entire accumulated point cloud. Switched to incremental updates: append the new points instead of rebuilding the whole thing.</li><li>Async rendering (21ms → 0ms on the critical path). Point cloud rendering moved to a separate thread. Costs one frame of latency, which no one can perceive.</li><li>corr_score TRT conversion (7ms → 0.9ms). Frame-selection scoring also converted to TRT FP16.</li><li>fast_preprocess (~8ms). Consolidated PIL-based image preprocessing into OpenCV only. (This one comes back to bite me later. Hold that thought.)</li><li>enc_norm caching (~7ms). Skipped the redundant LayerNorm recomputation entirely.</li></ol><h3>37.4 FPS</h3><pre>Phase              FPS        Main improvement  <br>──────────────────────────────────────────────────────────  <br>Eager baseline     3.0        —  <br>All TRT (I2P+L2W)  5.3        Model → TensorRT FP16  <br>+ TRT pre-norm enc  6.9        Eliminate duplicate encoding  <br>+ collect + corr    9.3 sync   Incremental update + corr TRT  <br>+ async render      11.3 async Rendering off critical path  <br>+ Python OH fixes   20.2 sync  fast_preprocess + enc_norm cache  <br>                    37.4 async + .cpu() removal + batch enc_norm</pre><p>3 FPS to 37.4. About 12.5x. Past the 30 FPS target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kM7qIfxLSK6FqKV-Mi15ww.png" /></figure><p><em>(Image generated with AI.)</em></p><p>On paper everything looked perfect. The FPS log traced a clean upward curve. I’d pivoted off a failed torch.compile attempt, gone to TRT, wrung out every drop of Python overhead, and landed well past target. Technically bulletproof, I thought.</p><h3>…But</h3><p>The next morning I opened the output point cloud in Open3D. No shelves, no walls. A blob of colored noise. I couldn’t even tell what had supposedly been reconstructed. What 37.4 FPS had been producing was high-speed garbage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MqP15_W9Dls8ou35F2i2gw.png" /></figure><p>Here’s the trap: speed benchmarks have no way to check correctness. High FPS looks like success. Nobody had checked the quality of the actual 3D. It’s flooring it at 120 on the highway while the GPS happily says you’ll arrive in five minutes, except you’re pointed the wrong way. Every metric says you’re winning. You’re not.</p><p>What followed was a bug hunt across 6 sessions and dozens of hours.</p><h3>Bug #1: The .clone() Problem</h3><p>Symptom: every view’s point cloud came out identical to the last view’s. Process 10 frames, get the same 3D ten times.</p><p>The cause is that PyTorch and TRT have different rules for where results live. PyTorch creates a new tensor on every compute, so output_a and output_b are separate objects holding separate contents. TRT fixes the output buffer and overwrites the same memory every time.</p><p>Whiteboard versus notebook. PyTorch writes each result on a fresh notebook page; page 1 survives after you write page 2. TRT writes everything on the same whiteboard, erasing and overwriting each time, so anyone still looking at the “old” result is now looking at the new one.</p><p>My code was doing pts3d_world = model(input). In PyTorch that&#39;s a new tensor each call. With TRT it&#39;s a pointer to the same buffer, and the next inference overwrites the last result.</p><pre># Before: save TRT&#39;s pointer directly → overwritten by next inference  <br>pts3d = trt_head(decoder_output)  <br><br># After: .clone() makes an independent copy → survives overwrite  <br>pts3d = trt_head(decoder_output).clone()</pre><p>One .clone(). The nasty part is that this bug produces zero error messages. FPS is normal, output shape is normal. The only way to catch &quot;all frames have identical 3D&quot; is to actually visualize the cloud. If you need what&#39;s on the whiteboard, copy it down before someone wipes it.</p><h3>Bug #2: Myelin, the API That Lies About Success</h3><p>Symptom: around frame 50, the CUDA context suddenly dies. CUDA error 700, and every GPU op fails from there on.</p><p>A kernel called __myl_Cast inside Myelin (TRT&#39;s layer-fusion engine) crashes on the Blackwell GPU (sm_120) + TRT 10.14.1 combo. FP16 or FP32, doesn&#39;t matter.</p><p>The real problem is that execute_async_v3 returns True. The API reports success while CUDA memory is silently corrupting underneath. Everything looks fine for 50 frames, and then frame 51 takes the whole context down with it.</p><p>Workaround: rename the corr_score engine to .bak and fall back to eager. Costs about 10ms per frame.</p><pre># Shelve the TRT engine → fall back to eager execution  <br>mv corr_score_fp16.engine corr_score_fp16.engine.bak</pre><p>Lesson I’d rather not have learned: bleeding-edge GPU times bleeding-edge TRT does not equal stable. The API’s “success” can’t be trusted, and 50 good frames guarantee nothing about frame 51.</p><h3>Bug #3: .contiguous()</h3><p>This is the one.</p><p>Symptom: even after fixing #1 and #2, the point cloud was still broken. So I started isolating it, decomposing the pipeline and swapping individual components (Encoder, Decoder, Heads) between eager and TRT to find where quality collapsed.</p><pre>Stage                  cosine similarity    Status  <br>──────────────────────────────────────────────────  <br>Encoder (eager vs TRT)    0.197             destroyed  <br>Decoder (eager in → TRT)  1.000             fine  <br>Heads (eager in → TRT)    1.000             fine</pre><p>The Encoder. Decoder and Heads were fine. Only the Encoder sat at 0.197 cosine similarity, which is essentially random.</p><p>Then it got genuinely strange. For accuracy verification I’d been comparing ONNX output against TRT output:</p><pre>Input          ONNX vs TRT cosine    Interpretation  <br>──────────────────────────────────────────────  <br>Zero tensor    1.000                 perfect match  <br>Random input   1.000                 perfect match  <br>Real image     0.197                 destroyed</pre><p>Zero input and random input match perfectly. It only breaks on real images. This is about as dangerous as a pattern gets, because TRT accuracy checks routinely use zero or random inputs. Do that here and the bug is invisible.</p><p>The cause turned out to be memory layout. PyTorch tensors carry strides, which describe how data is laid out in memory. My preprocessing used fast_preprocess_frame (the OpenCV consolidation from earlier), which reads with OpenCV then does numpy → torch.from_numpy → permute. And permute doesn&#39;t move data. It leaves the bytes where they are and only updates the strides, the &quot;read it this way&quot; metadata.</p><p>PyTorch reads strides and follows them, so it gets the right values regardless of layout. TRT doesn’t read strides. It pulls bytes straight from data_ptr(), the starting address, and ignores the layout metadata entirely.</p><p>The spreadsheet version: you drag columns into a new order, and your app tracks the mapping and shows everything correctly. Export the raw bytes and hand them to a program that reads top to bottom without the column map, and it reads Name where Age should be, Salary where Name should be. The data is all there. It’s being read in the wrong order. That’s exactly what permute did to TRT, and 0.197 cosine similarity is what scrambled data looks like.</p><pre># Before: pass the non-contiguous tensor after permute directly  <br>def __call__(self, **inputs):  <br>    for name, tensor in inputs.items():  <br>        ptr = tensor.data_ptr()  # ← reads memory directly, ignoring strides  <br>        ...  </pre><pre># After: .contiguous() physically rearranges the data  <br>def __call__(self, **inputs):  <br>    for name, tensor in inputs.items():  <br>        tensor = tensor.contiguous()  # ← data now matches logical order  <br>        ptr = tensor.data_ptr()  <br>        ...</pre><p>One .contiguous(). Cosine similarity went 0.197 → 1.000. I opened the point cloud and the library shelves were crisply reconstructed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIiJ2Zce1uAWhmyDz2L9tw.png" /></figure><p>Three things conspired to make this one so hard to find. TRT raises no errors and silently returns “results” on invalid input. Zero and random inputs don’t reproduce it, so standard accuracy verification sails right past. And the output shape, dtype, and FPS are all normal, so the metrics never flinch. The bug was sitting in the blind spot of the verification method itself.</p><h3>Final Results</h3><p>After all three fixes:</p><pre>Configuration                           FPS        Quality  <br>──────────────────────────────────────────────────────────  <br>Official recon.py --online (eager)      4.8        ★★★  <br>Pipeline implementation (eager)         9.0        ★★★★  <br>TRT FP16 before fix                     37.4       ★☆☆ (destroyed)  <br>TRT FP16 after fix                      14.4       ★★★★</pre><p>37.4 down to 14.4. The number got smaller, and “destroyed” became “normal.”</p><p>Point counts: eager 2,652,062, TRT after fix 2,649,694. A 0.1% difference. So 14.4 FPS is a 3x speedup over the official eager’s 4.8, with quality intact. The 12x was a mirage. The 3x is real.</p><h3>Looking Back</h3><p>TensorRT makes things fast. No argument there. It just doesn’t promise they’ll be correct.</p><p>All three bugs shared one trait: they were completely silent. No errors, normal FPS, normal output shapes. If I’d never bothered to open the point cloud, I’d have shipped a post called “37.4 FPS!” and never known anything was wrong.</p><p>The .contiguous() one stays with me. It doesn&#39;t show up with synthetic inputs, only with real images, which means the standard TRT validation playbook (feed in zeros, compare outputs) would have handed it a clean bill of health. The only thing that caught it was looking at the result with my own eyes.</p><p>Speed is easy to measure. Quality is easy to measure. Whether you can trust those measurements is the harder question. I ended up with 14.4 FPS instead of 37.4. Smaller number, but one I can stand behind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIiJ2Zce1uAWhmyDz2L9tw.png" /></figure><h3>Links</h3><ul><li><a href="https://github.com/PKU-VCL-3DV/SLAM3R">SLAM3R GitHub</a></li><li><a href="https://arxiv.org/abs/2412.09401">Paper (arXiv:2412.09401)</a></li><li><a href="https://cvpr.thecvf.com/Conferences/2025">CVPR 2025 Highlights</a></li><li><a href="https://medium.com/p/cb6e96e14018">Previous post: VGGT TensorRT Optimization</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f11908a85800" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VGGT: 5 Images → 3D in 62ms — TensorRT Optimization for CVPR 2025 Best Paper]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pub.towardsai.net/vggt-5-images-3d-in-62ms-tensorrt-optimization-for-cvpr-2025-best-paper-cb6e96e14018?source=rss-bffa19536e08------2"><img src="https://cdn-images-1.medium.com/max/2122/1*WrRe6mLNWqdOKKNQxuE6bQ.png" width="2122"></a></p><p class="medium-feed-snippet">A hands-on benchmark, a COLMAP comparison, and a full TensorRT FP16 conversion of a 1.26B-parameter 3D reconstruction Transformer.</p><p class="medium-feed-link"><a href="https://pub.towardsai.net/vggt-5-images-3d-in-62ms-tensorrt-optimization-for-cvpr-2025-best-paper-cb6e96e14018?source=rss-bffa19536e08------2">Continue reading on Towards AI »</a></p></div>]]></description>
            <link>https://pub.towardsai.net/vggt-5-images-3d-in-62ms-tensorrt-optimization-for-cvpr-2025-best-paper-cb6e96e14018?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb6e96e14018</guid>
            <category><![CDATA[tensorrt]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 08:13:21 GMT</pubDate>
            <atom:updated>2026-06-06T08:04:09.738Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why I Kept Everything Inside CUDA: Trial and Error with NVIDIA Warp and TouchDesigner Integration]]></title>
            <link>https://medium.com/@kynkynkyn/why-i-kept-everything-inside-cuda-trial-and-error-with-nvidia-warp-and-touchdesigner-integration-83dec4ab991e?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/83dec4ab991e</guid>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[cuda]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[nvidia]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Mon, 16 Mar 2026 17:23:25 GMT</pubDate>
            <atom:updated>2026-06-03T10:13:14.232Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Two GPU worlds, two failed attempts at connecting them. In the end, keeping them apart worked better than integrating them.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8OTcTX62oeJ1wvAnK0BoGw.png" /></figure><p>I wanted to do what Houdini does, but in real time, in TouchDesigner.</p><p>The plan: run a 100-million-particle physics simulation in Warp, send the results to TouchDesigner, and let artists freely tweak materials and effects. That was the workflow I was after.</p><p>I tried two approaches. Both failed. What I ended up with was a design where simulation and rendering both happen inside CUDA, and TouchDesigner only receives the finished video.</p><h3>The Goal: Render 100M Particles in TouchDesigner</h3><p>In the previous two articles, I ran a Warp-based particle simulation on an RTX 5090 and optimized it up to 682 FPS.</p><p>The natural next step was sending Warp’s results to TouchDesigner and using TD’s rich effects and material system for the visual side.</p><p>The ideal workflow I had in mind:</p><pre>Warp (physics only) → position data → TD (rendering + visuals)</pre><p>Warp computes 100 million particle positions fast on the GPU, sends that position data to TD, and TD draws everything via GLSL instancing. Artists tweak materials and lighting intuitively in TD. If it worked, I’d have Houdini-POPs-scale particles running in real time.</p><h3>Two Approaches to TD Integration, and Why Both Failed</h3><h4>Position texture: Spout works, but TD can’t draw it</h4><p>First, I tried sending particle position data as a texture via Spout. Warp generates an RGBA32F texture where each pixel stores a particle’s position and velocity.</p><pre># Each texture pixel = 1 particle  <br># R = position.x (-1.0 ~ 1.0)  <br># G = position.y (-1.0 ~ 1.0)  <br># B = velocity.x  <br># A = velocity.y</pre><pre># Texture size → particle count  <br># 1024² = ~1 million particles  <br># 4096² = ~16.8 million particles</pre><p>On the TD side, the plan was to receive the texture via Spout In TOP, read position data in a GLSL MAT vertex shader, and draw points using Geometry COMP instancing.</p><p>Texture generation and Spout sending on the Warp side worked fine, and TD could receive the texture through Spout In TOP. But past that point, building the actual drawing pipeline with GLSL MAT and Geometry COMP, I couldn’t get it to work. TouchDesigner’s instancing is designed for thousands to tens of thousands of objects, not for drawing a million particles as points. No matter how fast Warp generates position data, TD’s rendering becomes the bottleneck.</p><h4>TouchPy: can’t replace internal processing</h4><p>Next I tried <a href="https://github.com/IntentDev/touchpy">TouchPy</a>, a library that lets you drive TouchDesigner’s headless engine (TouchEngine) from Python. You can load .tox files and manipulate inputs and outputs externally.</p><p>The original idea:</p><pre>Python process  <br>├── TouchPy (.tox = effects &amp; UI)  <br>└── Warp (particle computation)  <br>    → Replace TouchPy&#39;s internal TOPs/POPs with large-scale particle rendering</pre><p>Poking at TouchPy’s API, I picked up a few things. It uses a callback-based API where start() runs as a blocking call, and input/output operators require a fixed naming format like topIn1 / topOut1 (in1 or intop1 won&#39;t be recognized).</p><p>But then the real problem surfaced. TouchPy can load and run a .tox, and it can send inputs and receive outputs, but it cannot replace operators inside the .tox from outside. It runs a .tox as a black box: you feed data in and get results out, but you can’t swap the processing happening inside for Warp. For what I wanted, replacing 100-million-particle simulation and rendering with an external engine, TouchPy’s architecture just didn’t fit.</p><p>At that point I stepped back from the integration approach and rethought the design from scratch.</p><h3>Why “Integration” Was the Wrong Approach</h3><p>There was a root cause common to both attempts. Warp lives in the CUDA world; TouchDesigner lives in the Vulkan/DirectX world. These are fundamentally different GPU pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMXq3PyEGxOnZiW9Dcuj8g.png" /></figure><p><em>(Image generated with AI.)</em></p><p>The moment you try to pass data computed on CUDA over to TD, you need a CUDA-to-graphics-API conversion, which is inherently expensive. And when TD tries to draw that data via instancing, it hits its own scale limits. The whole point of Warp is full GPU utilization, but the moment you try to integrate with TD, you’re spending resources on format conversion and data transfer instead of particle computation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vwDsZxoaO0P8p66bst7uQ.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>The Solution: Render Everything in CUDA</h3><p>So I flipped the architecture. Do the rendering in Warp too.</p><pre>Separated architecture:  <br><br>Warp (CUDA world = 100% GPU)  <br>├── Physics simulation  <br>├── Rendering (direct pixel writing)  <br>└── Spout output (as video)<br><br>TouchDesigner / External tools  <br>├── Parameter control (OSC)  <br>└── Video input (Spout In)</pre><p>The key idea: send TD a finished frame, not raw data. The connection between Warp and TD is just two channels, video (Spout) and parameters (OSC). Warp handles everything from particle computation to pixel writing at 100% GPU, and TD barely touches GPU resources at all.</p><h3>How CUDA Rendering Works</h3><p>Inside a Warp kernel, each particle’s position is converted to screen coordinates and pixels are written directly to a framebuffer. No graphics API involved; computation and drawing are unified in CUDA memory. The completed framebuffer goes to Spout via OpenGL interop, a GPU-to-GPU transfer, so it never becomes CPU-bound.</p><h3>Discovering the Particle Convergence Problem</h3><p>Once the separated architecture was running, an unexpected issue showed up. When particles get pulled toward an attractor and cluster in one spot, FPS drops hard.</p><pre>Right after reset (particles spread out): 85-95 FPS  <br>After some time (particles converged):    48-52 FPS  → ~2x performance gap</pre><p>The cause is GPU memory access patterns. When 100 million particles are scattered across the screen, each one writes to a different pixel address, which is the ideal case for parallel processing. But when particles cluster, huge numbers of threads try to write to the same pixel address. That triggers GPU memory bank conflicts, effectively serializing what should be parallel writes.</p><h3>Fixing It with Curl Noise Turbulence</h3><p>To stop the convergence, I added curl noise-based turbulence. Curl noise generates a divergence-free vector field; adding it to particle velocities produces a flowing motion that keeps particles spread out.</p><pre># Curl noise = (-∂N/∂y, ∂N/∂x)  <br># → Divergence-free = particles don&#39;t get sucked in one direction  <br># → Creates a constantly circulating flow that prevents convergenc</pre><pre>noise_x = wp.noise(state, wp.vec2(pos[1] * scale, time))  <br>noise_y = wp.noise(state, wp.vec2(pos[0] * scale, time + 100.0))  <br>curl = wp.vec2(-noise_y, noise_x) * turbulence_strength  <br>vel = vel + curl * dt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8Ha_gYCCZpvALbJNhSmeg.png" /></figure><p><em>(Image generated with AI.)</em></p><p>With turbulence added, the FPS floor went from 41 to 72. Stable.</p><h3>OSC Parameter Control</h3><p>All simulation parameters, turbulence strength included, are controllable over OSC. Latency is about 1ms, more than enough for real-time control.</p><pre># Warp side: receiving via python-osc  <br>from pythonosc import dispatcher, osc_server</pre><pre>def handle_gravity(addr, value):  <br>    params[&quot;gravity_y&quot;] = valuedispatcher.map(&quot;/warp/gravity_y&quot;, handle_gravity)  <br>dispatcher.map(&quot;/warp/attractor_strength&quot;, handle_attractor)  <br>dispatcher.map(&quot;/warp/turbulence_strength&quot;, handle_turbulence)  <br># ... other parameters</pre><p>The parameters I exposed:</p><pre>Physics: gravity_x/y, attractor_x/y/strength, vortex_strength, damping  <br>Turbulence: turbulence_strength/scale/speed  <br>Appearance: color_r/g/b, color_mode, particle_brightness  <br>Control: reset</pre><p>The OSC sender can be anything: TouchDesigner, Max/MSP, a Python script. As long as the protocol matches, Warp doesn’t care where the messages come from.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQX1058vePxU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQX1058vePxU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQX1058vePxU%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9bf28336b9dbcfc5f4babb7cff3af3b/href">https://medium.com/media/c9bf28336b9dbcfc5f4babb7cff3af3b/href</a></iframe><h3>The Final System</h3><pre>100M particles @ 4K @ 72-87 FPS  <br>  ├── Warp: physics + rendering + Spout output  <br>  ├── External tools: OSC send + video receive  <br>  └── Connections: Spout (video) + OSC (parameters)</pre><p>Final performance:</p><pre>Configuration                          Particles    FPS  <br>─────────────────────────────────────────────────────────  <br>Warp, GPU compute only                 3.5B         26  <br>Warp, rendering + Spout @ 4K           150M         64 (60 FPS cap)  <br>Warp + OSC control (final)             100M         72-87  <br>TD instancing (reference)              ~1M          crash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZreFsaQl629wwpcJjM_hQ.png" /></figure><p><em>(Image generated with AI.)</em></p><p>TD’s instancing tops out around 1 million particles. The separated architecture handles 100 times that count with stable performance.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTeKHFguaaeM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTeKHFguaaeM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTeKHFguaaeM%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9f0a3930e038c74e0d0288aea71ceb1/href">https://medium.com/media/d9f0a3930e038c74e0d0288aea71ceb1/href</a></iframe><h3>What I Learned About System Design</h3><p>To use a tool’s strengths, separate responsibilities. Warp’s strength is massive parallel computation via CUDA; TouchDesigner’s is node-based real-time UI and effects. Coupling them tightly dilutes both.</p><p>Fewer connection points is better. The final architecture has two: video (Spout) and parameters (OSC). That’s the minimum possible. Fewer integration points mean easier debugging and the freedom to optimize each component on its own.</p><p>Know the boundary between verified and unverified. With the position texture approach, I confirmed Spout transfer worked but couldn’t get TD’s drawing pipeline running. With TouchPy, I confirmed .tox loading and I/O but found internal replacement impossible. Being honest about what you’ve actually verified versus what’s still unknown makes the next design decision better.</p><p>And integration isn’t always the answer. There are plenty of reasons you’d want to connect Houdini and TouchDesigner. But given the constraints here, fully separating responsibilities and connecting through minimal interfaces produced a more scalable and robust system than deeply integrating two tools would have.</p><h3>Closing Thoughts</h3><p>Across these three articles, I’ve documented the whole process of GPU particle simulation with NVIDIA Warp: running 100 million particles in pure Python, optimizing up to 682 FPS, and landing on an architecture that keeps everything from simulation to rendering inside CUDA. Warp is still a young framework with thin documentation, but being able to reach CUDA’s power from Python is genuinely useful.</p><p>All the code was tested on an RTX 5090, but Warp runs on other NVIDIA GPUs too. With adjusted particle counts, the same architecture works on an RTX 3090 or 4090.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9zDbq09CIldYJDthULPByg.png" /></figure><h3>References</h3><ul><li><a href="https://github.com/NVIDIA/warp">NVIDIA Warp — GitHub</a></li><li><a href="https://nvidia.github.io/warp/">NVIDIA Warp — Documentation</a></li><li><a href="https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/">NVIDIA GeForce RTX 5090 Specifications</a></li><li><a href="https://github.com/IntentDev/touchpy">TouchPy — GitHub</a></li><li><a href="https://pypi.org/project/python-osc/">python-osc — PyPI</a></li></ul><p><strong>Full series</strong>:</p><ol><li><a href="https://medium.com/@kynkynkyn/nvidia-warp-how-i-simulated-100-million-particles-at-87-fps-in-pure-python-ac97d52f7dbb">NVIDIA Warp: How I Simulated 100 Million Particles at 87 FPS in Pure Python</a></li><li><a href="https://medium.com/@kynkynkyn/from-38-fps-to-682-fps-pushing-nvidia-warp-to-its-limits-on-rtx-5090-d63816aa3cb5">From 38 FPS to 682 FPS: Pushing NVIDIA Warp to Its Limits on RTX 5090</a></li><li>Why I Kept Everything Inside CUDA: Trial and Error with NVIDIA Warp and TouchDesigner Integration (this article)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83dec4ab991e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From 38 FPS to 682 FPS: Pushing NVIDIA Warp to Its Limits on RTX 5090]]></title>
            <link>https://medium.com/@kynkynkyn/from-38-fps-to-682-fps-pushing-nvidia-warp-to-its-limits-on-rtx-5090-d63816aa3cb5?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/d63816aa3cb5</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[cuda]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 10:25:20 GMT</pubDate>
            <atom:updated>2026-06-03T10:15:57.685Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Killing one CPU round-trip, going zero-copy, then hitting the memory bandwidth wall. That’s where the real GPU bottleneck turned out to live.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FD2ZSNLNRCv7IPrNrqjXvg.png" /></figure><p>In the previous article I got 100 million particles running in pure Python with NVIDIA Warp. GPU compute alone hit 87 FPS, but adding video output dropped it to 38.9 FPS, and that’s where I left off.</p><p>This time I’ll walk through the whole optimization path from that 38.9 FPS to a final 682 FPS (10M particles @ 1080p). I’ll also cover what happened when I scaled up to 3.5 billion particles and found out what the RTX 5090’s real bottleneck actually is.</p><h3>The Bottleneck</h3><p>Here’s the pipeline from last time.</p><pre>Warp (GPU, float32)  <br>  → image.numpy()    [GPU→CPU: 8MB/frame]  <br>  → astype(uint8)    [CPU type conversion]  <br>  → np.flipud()      [CPU Y-flip]  <br>  → sendImage()      [CPU→GPU: Spout re-upload]</pre><p>Profiling showed that over 80% of frame time was going to the GPU→CPU→GPU round-trip transfer. The GPU’s compute wasn’t being used at all.</p><p>From here I went through three stages.</p><h3>Optimization 1: Eliminating CPU Processing</h3><p>First, I moved the wasteful CPU-side work into the GPU kernel.</p><p>Before:</p><pre># Type conversion and Y-flip on CPU  <br>image_float = image.numpy()              # GPU→CPU  <br>image_uint8 = (image_float * 255).astype(np.uint8)  # Type conversion  <br>image_flipped = np.flipud(image_uint8)   # Y-flip  <br>sender.sendImage(image_flipped, ...)     # CPU→GPU re-upload</pre><p>After:</p><pre>@wp.kernel  <br>def render_particles_uint8(  <br>    positions: wp.array(dtype=wp.vec3),  <br>    image: wp.array(dtype=wp.uint8, ndim=3),  # uint8 from the start  <br>    width: int,  <br>    height: int,  <br>):  <br>    tid = wp.tid()  <br>    pos = positions[tid]</pre><pre>px = int((pos[0] * 0.5 + 0.5) * float(width))  <br>py = int((0.5 - pos[1] * 0.5) * float(height))  # Y-flip happens here    if px &gt;= 0 and px &lt; width and py &gt;= 0 and py &lt; height:  <br>    # Write directly as uint8 on GPU  <br>    image[py, px, 0] = wp.uint8(200)  <br>    image[py, px, 1] = wp.uint8(220)  <br>    image[py, px, 2] = wp.uint8(255)  <br>    image[py, px, 3] = wp.uint8(255)</pre><p>Two changes. I switched the image buffer from float32 to uint8 to drop the type conversion, and I folded the Y-flip into the rendering kernel&#39;s coordinate math (0.5 - pos[1] * 0.5). That alone made the Python-side astype() and np.flipud() unnecessary.</p><p>At 200K particles, this took 38.9 FPS to 174.7, about 4.5x. The GPU→CPU transfer via image.numpy() was still in there; just removing the CPU-side conversions bought that much.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ak7J5ONY4jl71K-khzbuw.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>Optimization 2: Zero-Copy Transfer</h3><p>Next target: the GPU→CPU transfer itself.</p><p>The only reason image data had to come back to CPU was that Spout’s sendImage() wanted it in CPU memory. So the fix is simple in principle: hand the GPU data straight to Spout.</p><p>Warp has wp.RegisteredGLBuffer for this. It registers an OpenGL PBO (Pixel Buffer Object) with CUDA, so the two can share it directly in GPU memory.</p><p>Before, via CPU:</p><pre>Warp (CUDA) → image.numpy() → CPU → PBO → Texture → Spout  <br>                  ↑ Bottleneck</pre><p>After, zero-copy:</p><pre>Warp (CUDA) → RegisteredGLBuffer → Texture → Spout  <br>                  ↑ Stays entirely within GPU VRAM</pre><p>The implementation:</p><pre>import OpenGL.GL as gl</pre><pre># Create OpenGL PBO  <br>pbo_id = gl.glGenBuffers(1)  <br>gl.glBindBuffer(gl.GL_PIXEL_UNPACK_BUFFER, pbo_id)  <br>gl.glBufferData(gl.GL_PIXEL_UNPACK_BUFFER, buffer_size, None, gl.GL_DYNAMIC_DRAW)# Register PBO with CUDA (the core of zero-copy)  <br>cuda_gl_buffer = wp.RegisteredGLBuffer(int(pbo_id), device=&quot;cuda:0&quot;)</pre><p>Frame loop:</p><pre># 1. Map PBO to CUDA (now Warp can write directly to it on GPU)  <br>image_gpu = cuda_gl_buffer.map(dtype=wp.uint8, shape=(buffer_size,))</pre><pre># 2. Write directly to PBO with Warp kernel  <br>wp.launch(clear_image, dim=width * height, inputs=[image_gpu, width])  <br>wp.launch(render_particles, dim=N, inputs=[positions, image_gpu, width, height])  <br>wp.synchronize()# 3. Unmap → transfer from PBO to texture (within GPU, ultra fast)  <br>cuda_gl_buffer.unmap()  <br>gl.glBindBuffer(gl.GL_PIXEL_UNPACK_BUFFER, pbo_id)  <br>gl.glTexSubImage2D(gl.GL_TEXTURE_2D, 0, 0, 0, width, height,  <br>                   gl.GL_RGBA, gl.GL_UNSIGNED_BYTE, None)# 4. Send via Spout (directly sharing GPU texture)  <br>sender.sendTexture(texture_id, gl.GL_TEXTURE_2D, width, height, False, 0)</pre><p>The point is that data never touches CPU memory. CUDA writes it, OpenGL reads it inside the GPU, Spout shares it between GPUs. Zero PCIe traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVxoE6devjko4IVYK55zsg.png" /></figure><p><em>(Image generated with AI.)</em></p><p>The benchmark here switches to 10 million particles (the 200K case was already past the rendering ceiling). At 10M, this took 224 FPS to 682, about 2.8x. The transfer bottleneck was gone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LFaO1c7b0sPah6eOm5KVeA.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>Optimization 3: FP16 and Kernel Fusion</h3><p>With the transfer problem solved, I turned to the GPU computation itself.</p><h4>FP16 half precision</h4><p>I changed particle positions and velocities from wp.vec3 (float32, 12 bytes/particle) to wp.vec2h (float16, 4 bytes/particle). It&#39;s 2D physics, so there&#39;s no Z to carry, and at this scale half precision makes no visible difference.</p><pre># Before: 12 bytes/particle  <br>positions: wp.array(dtype=wp.vec3)     # float32 × 3 = 12B</pre><pre># After: 4 bytes/particle  <br>positions: wp.array(dtype=wp.vec2h)    # float16 × 2 = 4B</pre><p>Inside the kernel, values get promoted to FP32 for the math, then written back as FP16.</p><pre>@wp.kernel  <br>def update_particles_fp16(  <br>    positions: wp.array(dtype=wp.vec2h),  <br>    velocities: wp.array(dtype=wp.vec2h),  <br>    dt: float,  <br>):  <br>    tid = wp.tid()</pre><pre># Promote FP16 → FP32 for computation  <br>pos = wp.vec2(wp.float32(positions[tid][0]),  <br>              wp.float32(positions[tid][1]))  <br>vel = wp.vec2(wp.float32(velocities[tid][0]),  <br>              wp.float32(velocities[tid][1]))</pre><pre># ...physics computation (at FP32 precision)...</pre><pre># Convert FP32 → FP16 and store  <br>positions[tid] = wp.vec2h(wp.float16(pos[0]), wp.float16(pos[1]))  <br>velocities[tid] = wp.vec2h(wp.float16(vel[0]), wp.float16(vel[1]))</pre><p>This halves memory bandwidth consumption, which translates straight into speed in a bandwidth-bound scenario. Gain: about 31–36%.</p><h4>Kernel fusion</h4><p>In the original code, physics update and rendering were separate kernels.</p><pre># Before: 2 kernels = position data read twice  <br>wp.launch(update_particles, ...)   # positions read ①  <br>wp.launch(render_particles, ...)   # positions read ② (redundant)</pre><p>I merged them into one kernel so position data is read once.</p><pre># After: 1 kernel = position data read once  <br>@wp.kernel  <br>def update_and_render(positions, velocities, image, ...):  <br>    tid = wp.tid()  <br>    pos = positions[tid]  # Read once  <br>    vel = velocities[tid]</pre><pre># Physics update  <br>pos = pos + vel * dt  <br>positions[tid] = pos    # Render immediately (no re-read)  <br>px = int((pos[0] * 0.5 + 0.5) * float(width))  <br>...</pre><p>Gain: about 29–31%.</p><h4>Combined effect (1080p)</h4><pre>Particles   Original    Vec2+Fused    FP16        Fastest  <br>──────────────────────────────────────────────────────────  <br>10M         878 FPS     1,044 FPS     1,151 FPS   1,899 FPS  <br>50M         172 FPS     220 FPS       227 FPS     262 FPS  <br>100M         86 FPS     111 FPS       114 FPS     132 FPS</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TzrWV_LvahJX_ahy1i77uA.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>Pushing to 3.5 Billion Particles</h3><p>With everything applied, I pushed the RTX 5090 as far as it would go.</p><p>GPU compute only: 3.5 billion particles at 26 FPS, VRAM at 29.9 GB of 32 GB, nearly maxed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hMqKxdbbdtGzOVY4UVLjKQ.png" /></figure><p><em>(Image generated with AI.)</em></p><p>Push to 4 billion and FPS drops to 7.6. Data starts spilling from VRAM into system memory and hits the PCIe bandwidth limit. The VRAM wall is sharp: cross it and performance falls to under a third.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DdjUNuwWtZ6PBi_fLwq2MA.png" /></figure><p><em>(Image generated with AI.)</em></p><p>Rendering + Spout Output @ 4K</p><p>Here are the practical numbers when actually outputting video:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1uy83u0U1WLiit57-JqxEw.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>The Real Bottleneck: Memory Bandwidth</h3><p>Working through all this, I pinned down the actual bottleneck of the RTX 5090.</p><p>As a compute-reduction test, I removed sqrt() from the physics kernel.</p><pre># Standard version: uses sqrt  <br>dist = wp.sqrt(dx * dx + dy * dy)</pre><pre># Optimized version: sqrt removed  <br>dist_sq = dx * dx + dy * dy  # Use squared distance instead</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VNhUvj-apK_EtdP8zV_PoA.png" /></figure><p><em>(Image generated with AI.)</em></p><p>No change. Removing sqrt made it no faster at all.</p><p>Which means the compute units are sitting idle. The bottleneck isn’t compute, it’s memory bandwidth: how fast data can be read from and written to VRAM.</p><p>The theory backs it up.</p><pre>One frame at 3.5 billion particles:  <br>  Read:  3.5B × 8 bytes = 28 GB  <br>  Write: 3.5B × 8 bytes = 28 GB  <br>  Total: 56 GB/frame</pre><pre>RTX 5090 memory bandwidth: 1,792 GB/sTheoretical max FPS = 1,792 ÷ 56 = 32 FPS  <br>Measured: 26 FPS (81% of theoretical)</pre><p>The measured 26 FPS is 81% of the theoretical ceiling. Memory bandwidth is nearly saturated.</p><p>What this means in practice: compute optimizations like algorithmic tweaks or removing operations are basically pointless here, the only lever that helps is shrinking data size (FP16), and doubling the particles halves the FPS almost exactly, which is the perfect linear scaling you’d expect. Get the direction wrong and you burn time for nothing. In a bandwidth-bound regime the answer isn’t “compute faster,” it’s “make the data smaller.”</p><h3>The Full Optimization Picture</h3><p>The whole journey in one place:</p><pre>Phase 1: Eliminating CPU Processing  <br>  Direct uint8 writing + Y-flip inside the kernel  <br>  → 38.9 FPS → 174.7 FPS (4.5x, at 200K particles)</pre><pre>Phase 2: Zero-Copy Transfer  <br>  wp.RegisteredGLBuffer (CUDA-OpenGL Interop)  <br>  → 224 FPS → 682 FPS (2.8x, at 10M particles)</pre><pre>Phase 3: GPU Compute Optimization  <br>  FP16 (wp.vec2h) + Kernel Fusion  <br>  → +31-36% improvement</pre><pre>Bottleneck Identified:  <br>  RTX 5090 memory bandwidth 1,792 GB/s is the ceiling  <br>  → Compute optimization has no effect (0% from sqrt removal)  <br>  → Only data size reduction works</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RHUsPmXCQgZIxvSjbF-idA.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>Practical Guidelines</h3><p>For anyone building a particle system with Warp, a few reference points.</p><p>The RTX 5090 (32GB VRAM, 1,792 GB/s) reference numbers are in the figure above. The effect of resolution is smaller than you’d think: 1080p to 4K costs only about 20% FPS, minor next to the impact of particle count. I’ve also confirmed it runs at 8K and 12K.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTPnf1RlfBsr7FBwku8J0w.png" /></figure><p><em>(Image generated with AI.)</em></p><h3>What’s Next</h3><p>At this point I’ve wrung about everything out of Warp on its own. 100 million particles at 4K, 72–87 FPS, with Spout output. The pipeline works.</p><p>So what happens when you actually wire this into TouchDesigner?</p><p>The plan was to take Warp’s particles into TouchDesigner’s instancing, assign materials, apply post-effects. It failed. Why it failed, and how that failure led to the final architecture, is the next article.</p><h3>References</h3><ul><li><a href="https://github.com/NVIDIA/warp">NVIDIA Warp — GitHub</a></li><li><a href="https://nvidia.github.io/warp/">NVIDIA Warp — Documentation</a></li><li><a href="https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/">NVIDIA GeForce RTX 5090 Specifications</a></li></ul><p><strong>Next article</strong>: Why I Kept Everything Inside CUDA: Trial and Error with NVIDIA Warp and TouchDesigner Integration</p><p><strong>Full series</strong>:</p><ol><li><a href="https://medium.com/@kynkynkyn/nvidia-warp-how-i-simulated-100-million-particles-at-87-fps-in-pure-python-ac97d52f7dbb">NVIDIA Warp: How I Simulated 100 Million Particles at 87 FPS in Pure Python</a></li><li>From 38 FPS to 682 FPS: Pushing NVIDIA Warp to Its Limits on RTX 5090 (this article)</li><li><a href="https://medium.com/@kynkynkyn/why-i-kept-everything-inside-cuda-trial-and-error-with-nvidia-warp-and-touchdesigner-integration-83dec4ab991e">Why I Kept Everything Inside CUDA: Trial and Error with NVIDIA Warp and TouchDesigner Integration</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d63816aa3cb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NVIDIA Warp: How I Simulated 100 Million Particles at 87 FPS in Pure Python]]></title>
            <link>https://medium.com/@kynkynkyn/nvidia-warp-how-i-simulated-100-million-particles-at-87-fps-in-pure-python-ac97d52f7dbb?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac97d52f7dbb</guid>
            <category><![CDATA[cuda]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[creative-coding]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 10:25:15 GMT</pubDate>
            <atom:updated>2026-06-03T10:14:32.285Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>One Python decorator, one GPU, zero C++. That was enough to put 100 million particles on screen.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-RgtF26cwAmyUU__nPqGCQ.png" /></figure><p>I want to write CUDA. I don’t want to write C++.</p><p>I wanted the GPU’s parallel compute for a massive particle simulation, but not the CUDA C++ learning curve, the compile-deploy cycle, or the debugging that comes with it. Not for creative coding, anyway.</p><p>That’s when I found NVIDIA Warp. You put a single Python decorator on a function and it runs as a CUDA kernel on the GPU.</p><p>The result was 100 million particles at 87 FPS on an RTX 5090, in pure Python.</p><p>This article covers setting up the environment and getting the first particles moving. Optimization is in <a href="https://www.notion.so/NVIDIA-Warp-How-I-Simulated-100-Million-Particles-at-87-FPS-in-Pure-Python-324ae49b9d8480fe9ddcce15866e7b88?pvs=21">Part 2</a>, and the TouchDesigner integration story is in <a href="https://www.notion.so/NVIDIA-Warp-How-I-Simulated-100-Million-Particles-at-87-FPS-in-Pure-Python-324ae49b9d8480fe9ddcce15866e7b88?pvs=21">Part 3</a>.</p><h3>What is Warp?</h3><p><a href="https://nvidia.github.io/warp/">NVIDIA Warp</a> is a framework for writing high-performance GPU code in Python, open-sourced in 2022.</p><p>The mechanism is simple: functions decorated with @wp.kernel get JIT-compiled into optimized CUDA/C++ at runtime. The API looks NumPy-like, but underneath it runs at near-native CUDA speeds.</p><pre>import warp as wp</pre><pre>@wp.kernel  <br>def add_vectors(  <br>    a: wp.array(dtype=wp.vec3),  <br>    b: wp.array(dtype=wp.vec3),  <br>    c: wp.array(dtype=wp.vec3),  <br>):  <br>    tid = wp.tid()  <br>    c[tid] = a[tid] + b[tid]</pre><p>That’s the whole thing. Each array element gets assigned to a GPU thread and runs in parallel. Plain Python syntax, CUDA kernels running behind it.</p><p>What sets Warp apart from CuPy or Numba is the focus on physics simulation and rendering. It ships with built-in vector types (wp.vec3), matrix types, and spatial queries, so you can write particle systems and collision detection directly.</p><h3>Setting Up</h3><p>The environment I’m working with:</p><pre>OS:    Windows 11  <br>GPU:   NVIDIA GeForce RTX 5090 (32GB VRAM, Blackwell)  <br>CUDA:  13.0  <br>Python: 3.11.0 (pyenv-win)  <br>Package manager: uv</pre><p>The RTX 5090 is Blackwell (sm_120) and requires CUDA 13. Warp 1.10+ bundles CUDA 13, so a standard install just works.</p><pre>uv venv  <br>uv pip install warp-lang numpy glfw PyOpenGL SpoutGL</pre><p>Verification:</p><pre>import warp as wp  <br>wp.init()  <br>print(wp.get_devices())  <br># [Device(&#39;cuda:0&#39;) - &#39;NVIDIA GeForce RTX 5090&#39; (sm_120, mempool enabled)]</pre><p>If you see sm_120, you’re good, and all 32GB of VRAM is available.</p><pre>Warp 1.10.1 initialized:  <br>   CUDA Toolkit 13.0, Driver 13.0  <br>   Devices:  <br>     &quot;cpu&quot;      : &quot;Intel64 Family 6 Model 198 Stepping 2, GenuineIntel&quot;  <br>     &quot;cuda:0&quot;   : &quot;NVIDIA GeForce RTX 5090&quot; (32 GiB, sm_120, mempool enabled)</pre><h3>My First Particle Kernel</h3><p>Start with 100K particles. Three things to do: initialize, update physics, loop.</p><h4>Initialization Kernel</h4><pre>@wp.kernel  <br>def init_particles(  <br>    positions: wp.array(dtype=wp.vec3),  <br>    velocities: wp.array(dtype=wp.vec3),  <br>    seed: int,  <br>):  <br>    tid = wp.tid()  <br>    state = wp.rand_init(seed, tid)</pre><pre>x = wp.randf(state) * 2.0 - 1.0  <br>y = wp.randf(state) * 2.0 - 1.0  <br>z = 0.0  <br>positions[tid] = wp.vec3(x, y, z)</pre><pre>vx = (wp.randf(state) - 0.5) * 0.1  <br>vy = (wp.randf(state) - 0.5) * 0.1  <br>velocities[tid] = wp.vec3(vx, vy, 0.0)</pre><p>Each thread gets its own random seed and initializes position and velocity. wp.tid() returns the thread ID, equivalent to CUDA&#39;s threadIdx.x + blockIdx.x * blockDim.x, except Warp handles the block size optimization for you.</p><h4>Physics Update Kernel</h4><pre>@wp.kernel  <br>def update_particles(  <br>    positions: wp.array(dtype=wp.vec3),  <br>    velocities: wp.array(dtype=wp.vec3),  <br>    dt: float,  <br>):  <br>    tid = wp.tid()  <br>    pos = positions[tid]  <br>    vel = velocities[tid]</pre><pre># Gravity  <br>vel = vel + wp.vec3(0.0, -2.0, 0.0) * dt    # Vortex effect toward center  <br>dx = -pos[0]  <br>dy = -pos[1]  <br>vel = vel + wp.vec3(-dy, dx, 0.0) * 2.0 * dt    # Damping  <br>vel = vel * 0.999</pre><pre># Position update  <br>pos = pos + vel * dt</pre><pre># Boundary (clamp to -1 ~ 1)  <br>pos = wp.vec3(  <br>    wp.clamp(pos[0], -1.0, 1.0),  <br>    wp.clamp(pos[1], -1.0, 1.0),  <br>    0.0,  <br>)</pre><pre>positions[tid] = pos  <br>velocities[tid] = vel</pre><p>Gravity, a vortex effect, velocity damping. Basic physics. Each particle is computed independently (O(N)), which fits GPU parallelism well.</p><h4>The Loop</h4><pre>N = 100_000  # 100K particles  <br>positions = wp.zeros(N, dtype=wp.vec3, device=&quot;cuda:0&quot;)  <br>velocities = wp.zeros(N, dtype=wp.vec3, device=&quot;cuda:0&quot;)</pre><pre>wp.launch(init_particles, dim=N, inputs=[positions, velocities, 42])for frame in range(1000):  <br>    wp.launch(update_particles, dim=N, inputs=[positions, velocities, 1.0/60.0])</pre><p>The dim=N in wp.launch() sets the thread count. For 100K particles, 100K threads run at once.</p><p>The first wp.launch() triggers JIT compilation, so there&#39;s a brief wait. After that it&#39;s cached and runs instantly.</p><h3>1 Million Particles: 6,936 FPS</h3><p>I bumped the count to 1 million and benchmarked.</p><pre>N = 1_000_000  <br># ... same code, just change N</pre><p>1 million particles at 6,936 FPS. All numbers below are GPU compute only (kernel execution), with no rendering and no video output. Resolution doesn’t matter here; this is pure particle physics update throughput.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dB6YaIDg4cT8f1E4TtI4XA.png" /></figure><p><em>(Image generated with AI.)</em></p><p>The relationship between particle count and performance is essentially linear: double the particles, halve the FPS. That points to the computation being memory bandwidth-bound, which I’ll get into in <a href="https://www.notion.so/NVIDIA-Warp-How-I-Simulated-100-Million-Particles-at-87-FPS-in-Pure-Python-324ae49b9d8480fe9ddcce15866e7b88?pvs=21">Part 2</a>.</p><p>The thing worth noting: I scaled up without touching a single line of Python, just the value of N. Warp handles the CUDA block size math and memory management behind the scenes.</p><h3>Rendering and Spout Output</h3><p>Computation alone doesn’t make visuals. I needed to turn particle positions into pixels, build an image, and send it to external tools like TouchDesigner over Spout.</p><h4>Rendering Kernel</h4><pre>@wp.kernel  <br>def render_particles(  <br>    positions: wp.array(dtype=wp.vec3),  <br>    image: wp.array(dtype=wp.uint8, ndim=3),  <br>    width: int,  <br>    height: int,  <br>):  <br>    tid = wp.tid()  <br>    pos = positions[tid]</pre><pre># Normalized coords (-1~1) → pixel coords  <br>px = int((pos[0] * 0.5 + 0.5) * float(width))  <br>py = int((0.5 - pos[1] * 0.5) * float(height))  # Flip Y    if px &gt;= 0 and px &lt; width and py &gt;= 0 and py &lt; height:  <br>    image[py, px, 0] = wp.uint8(200)  # R  <br>    image[py, px, 1] = wp.uint8(220)  # G  <br>    image[py, px, 2] = wp.uint8(255)  # B  <br>    image[py, px, 3] = wp.uint8(255)  # A</pre><p>Each particle computes its own pixel position and writes directly to the image buffer. It’s writing to GPU memory, so there’s no CPU transfer happening yet.</p><h4>Spout Sender</h4><p><a href="https://spout.zeal.co/">Spout</a> is a Windows protocol for sharing GPU textures. TouchDesigner, vvvv gamma, OBS, and others can receive from it.</p><pre>import SpoutGL</pre><pre>sender = SpoutGL.SpoutSender()  <br>sender.setSenderName(&quot;WarpParticles&quot;)# Inside the frame loop  <br>image_np = image.numpy()  # GPU → CPU transfer  <br>sender.sendImage(image_np, width, height, SpoutGL.GL_RGBA, False, 0)</pre><p>Add a “Spout In TOP” in TouchDesigner, set the sender name to “WarpParticles”, and the video from Warp shows up in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzXOsCOyL2vs8zB-rOnyfA.png" /></figure><h3>The First Bottleneck</h3><p>This is where I hit a wall.</p><p>Benchmarking with Spout output included, I got 38.9 FPS at 200K particles. GPU compute alone was thousands of FPS, and the moment I added Spout it collapsed.</p><p>The culprit was image.numpy().</p><pre># This one line is the problem  <br>image_np = image.numpy()  # GPU → CPU: transfers every frame</pre><p>Every frame, the entire RGBA image gets copied from GPU to CPU. That’s about 8MB at 1080p, roughly 33MB at 4K. PCIe transfer is orders of magnitude slower than GPU internal memory bandwidth (1,792 GB/s).</p><p>On top of that, handing the CPU-side data to sendImage triggers a CPU→GPU re-upload for Spout. So it&#39;s a pointless GPU→CPU→GPU round trip.</p><pre>[Bottleneck]  <br>GPU (CUDA) ──8MB/frame──→ CPU (numpy) ──8MB/frame──→ GPU (Spout)  <br>           PCIe ~64GB/s                 PCIe ~64GB/s</pre><pre>↑ This round trip eats ~80% of frame time</pre><p>It’s the classic problem for any pipeline that computes on the GPU and outputs video.</p><h3>Where Things Stand</h3><p>For GPU compute only, I confirmed 100 million particles at 87 FPS. Pushed to the limit, the RTX 5090 scales to 3.5 billion particles.</p><p>But the moment I tried to output video externally, the GPU→CPU transfer became the bottleneck and dropped performance to 38.9 FPS.</p><p>How I fixed that transfer bottleneck, and the full optimization path to 682 FPS, is the next article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aBTK5S7XDbex97D5u6Hg3Q.png" /></figure><h3>References</h3><ul><li><a href="https://github.com/NVIDIA/warp">NVIDIA Warp — GitHub</a></li><li><a href="https://nvidia.github.io/warp/">NVIDIA Warp — Documentation</a></li><li><a href="https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/">NVIDIA GeForce RTX 5090 Specifications</a></li></ul><p><strong>Next article</strong>: <a href="https://medium.com/@kynkynkyn/from-38-fps-to-682-fps-pushing-nvidia-warp-to-its-limits-on-rtx-5090-d63816aa3cb5">From 38 FPS to 682 FPS: Pushing NVIDIA Warp to Its Limits on RTX 5090</a></p><p><strong>Full series</strong>:</p><ol><li>NVIDIA Warp: How I Simulated 100 Million Particles at 87 FPS in Pure Python(this article)</li><li><a href="https://medium.com/@kynkynkyn/from-38-fps-to-682-fps-pushing-nvidia-warp-to-its-limits-on-rtx-5090-d63816aa3cb5">From 38 FPS to 682 FPS: Pushing NVIDIA Warp to Its Limits on RTX 5090</a></li><li><a href="https://medium.com/@kynkynkyn/why-i-kept-everything-inside-cuda-trial-and-error-with-nvidia-warp-and-touchdesigner-integration-83dec4ab991e">Why I Kept Everything Inside CUDA: Trial and Error with NVIDIA Warp and TouchDesigner Integration</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac97d52f7dbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Accelerate SAM3 with TensorRT for Real-Time Inference]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kynkynkyn/how-to-accelerate-sam3-with-tensorrt-for-real-time-inference-d014ef504383?source=rss-bffa19536e08------2"><img src="https://cdn-images-1.medium.com/max/1910/1*etd8UDtlMdlYHm392DwteA.jpeg" width="1910"></a></p><p class="medium-feed-snippet">A practical guide to optimizing Meta&#x2019;s Segment Anything Model 3 for production-grade applications on RTX 5090</p><p class="medium-feed-link"><a href="https://medium.com/@kynkynkyn/how-to-accelerate-sam3-with-tensorrt-for-real-time-inference-d014ef504383?source=rss-bffa19536e08------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kynkynkyn/how-to-accelerate-sam3-with-tensorrt-for-real-time-inference-d014ef504383?source=rss-bffa19536e08------2</link>
            <guid isPermaLink="false">https://medium.com/p/d014ef504383</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[tensorrt]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[realtime]]></category>
            <dc:creator><![CDATA[kyon]]></dc:creator>
            <pubDate>Tue, 23 Dec 2025 06:39:32 GMT</pubDate>
            <atom:updated>2026-06-03T08:56:52.783Z</atom:updated>
        </item>
    </channel>
</rss>