Wikiprompt

One-Shot GPU Code Optimization with Benchmark Plan

From Wikiprompt, the free prompt encyclopedia

Yun-Ta Tsai
Contributed byYun-Ta TsaiTwitter

Jun 14, 2026

One-Shot GPU Code Optimization with Benchmark Plan A coding prompt that asks the model to port CPU code to the GPU and verify correctness against a golden image (PSNR > 40dB) while benchmarking throughput.

Prompt Content

I want you to optimize it entirely on GPU to speed it up. Measure two metrics: the result must compare with the golden image (CPU) and be nearly identical (PSNR > 40dB), with fast pixels per second. Make a plan to a) write GPU equivalent code, b) write a benchmark suite to measure PSNR and pixels p...

Sign in to see the full prompt

Sign In to Continue

Usage

This prompt is designed for use with coding. Copy the prompt content above and paste it into your preferred AI tool.

For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.

References

Categories:coding| twitter| grok| code-optimization