<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6" -->

---
title: I Put My Rust Code on a GPU. The Profiler Told Me to Stop.
description: A developer writes a GPU color-conversion kernel in Rust using CubeCL, benchmarks it honestly, and discovers the kernel runs in 0.01ms while PCIe data transfer...
canonical: https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Put My Rust Code on a GPU. The Profiler Told Me to Stop. | daily.dev
og:description: A developer writes a GPU color-conversion kernel in Rust using CubeCL, benchmarks it honestly, and discovers the kernel runs in 0.01ms while PCIe data transfer...
og:url: https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6
og:image: https://api.daily.dev/og/posts/6E3tfKiH6.png
og:image:alt: I Put My Rust Code on a GPU. The Profiler Told Me to Stop.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Put My Rust Code on a GPU. The Profiler Told Me to Stop.

**[Medium](https://daily.dev/sources/medium_js)** · 9 min read · 0 upvotes · 0 comments

## Summary

A developer writes a GPU color-conversion kernel in Rust using CubeCL, benchmarks it honestly, and discovers the kernel runs in 0.01ms while PCIe data transfer takes hundreds of milliseconds. The GPU is transfer-bound, not compute-bound, making kernel optimization pointless. Meanwhile, a CPU-SIMD path with rayon achieves 111 MP/s versus the GPU's ~35 MP/s ceiling. Key lessons: instrument upload/compute/readback phases before optimizing kernels, GPUs only win when compute dwarfs transfer, and negative results are worth documenting.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://vipavani.medium.com/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop-8ce5236f6f59>

## Similar posts on daily.dev

- [Offloading Rust To GPUs Proves Capable Of High Performance With Memory Safety](https://daily.dev/posts/offloading-rust-to-gpus-proves-capable-of-high-performance-with-memory-safety-6ojskq9d9) · Phoronix · 0 upvotes · 0 comments
- [Why I Ported a JavaScript Library to Rust \(and Where It Backfired\)](https://daily.dev/posts/why-i-ported-a-javascript-library-to-rust-and-where-it-backfired--pwo9vkil6) · Medium · 2 upvotes · 0 comments
- [Introducing CUDA Rust: Two Tracks for Writing GPU Kernels](https://daily.dev/posts/introducing-cuda-rust-two-tracks-for-writing-gpu-kernels-a7096aegg) · NVIDIA Developer · 49 upvotes · 4 comments
- [Rust threads on the GPU](https://daily.dev/posts/rust-threads-on-the-gpu-x6lzacsrq) · Hacker News · 3 upvotes · 1 comments

---

Tags: [#gpu](https://daily.dev/tags/gpu), [#performance](https://daily.dev/tags/performance), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Put My Rust Code on a GPU. The Profiler Told Me to Stop.","url":"https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6"},"datePublished":"2026-07-26T19:30:42.949Z","dateModified":"2026-10-15T02:19:48.826Z","description":"A developer writes a GPU color-conversion kernel in Rust using CubeCL, benchmarks it honestly, and discovers the kernel runs in 0.01ms while PCIe data transfer...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8d71e8682d7bdc6e371d776b566cd0ad?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8d71e8682d7bdc6e371d776b566cd0ad?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-put-my-rust-code-on-a-gpu-the-profiler-told-me-to-stop--6e3tfkih6","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"gpu,performance,rust","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"I Put My Rust Code on a GPU. The Profiler Told Me to Stop."}]}
```

