TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Gpu.cpp: A lightweight library for portable low-level GPU computation

242 pointsby bovem10 months ago

15 comments

pavlov10 months ago
Lovely! I like how the API is in a single header file that you can read through and understand in one sitting.<p>I&#x27;ve worked with OpenGL and Direct3D and Metal in the past, but the pure compute side of GPUs is mostly foreign to me. Learning CUDA always felt like a big time investment when I never had an obvious need at hand.<p>So I&#x27;m definitely going to play with library and try to get up to speed. Thanks for publishing it.
评论 #40957838 未加载
0xf00ff00f10 months ago
This is cool, but they should have just used Vulkan. Dawn is a massive dependency (and a PITA to build, in my experience) to get what&#x27;s basically a wrapper around Vulkan. Vulkan has a reputation for being difficult to work with, but if you just want to use a compute queue it&#x27;s not that horrible. Also, since Vulkan uses SPIR-V, the user would have more choices for shading languages. Additionally, with RenderDoc you get source-level shader debugging.<p>Shameless plug: in case anyone wants to see how doing just compute with Vulkan looks like, I wrote a similar library to compete on SHAllenge [0], which was posted here on HN a few days ago. My library is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;0xf00ff00f&#x2F;vulkan-compute-playground&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;0xf00ff00f&#x2F;vulkan-compute-playground&#x2F;</a><p>[0] <a href="https:&#x2F;&#x2F;shallenge.quirino.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;shallenge.quirino.net&#x2F;</a>
评论 #40957730 未加载
评论 #40956928 未加载
austinvhuang10 months ago
Hi, author here! Agh I was intending for the project to fly under the radar for a few more days before making the announcement and blog post (please look&#x2F;upvote that when you see it haha :)<p>But since this is starting I&#x27;m happy to chat. Nice to see the interest here!
评论 #40957880 未加载
almostgotcaught10 months ago
TIL you can run the WebGPU runtime without a browser.
评论 #40955051 未加载
评论 #40957762 未加载
jph0010 months ago
We just published an article introducing gpu.cpp, what it&#x27;s for, and how it works:<p><a href="https:&#x2F;&#x2F;www.answer.ai&#x2F;posts&#x2F;2024-07-11--gpu-cpp.html" rel="nofollow">https:&#x2F;&#x2F;www.answer.ai&#x2F;posts&#x2F;2024-07-11--gpu-cpp.html</a>
评论 #40965478 未加载
soci10 months ago
I watched the video mentioned in the post [1], but now I’m more confused than before…<p>What are the benefits, if any, of using gpu.cpp instead of just webgpu.h (webgpu native) directly? Maybe each is tailored for different use cases?<p>[1] <a href="https:&#x2F;&#x2F;youtu.be&#x2F;qHrx41aOTUQ?si=CehJnYQWCg3XklHj" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;qHrx41aOTUQ?si=CehJnYQWCg3XklHj</a>
评论 #40962182 未加载
uLogMicheal10 months ago
This is awesome! Was looking at creating similar, inspired by the miniaudio approach. Will likely contribute a dart wrapper soon.
评论 #40957860 未加载
hpen10 months ago
Any performance metrics vs Vulkan, metal, etc?
评论 #40957959 未加载
评论 #40960804 未加载
评论 #40954305 未加载
captaincrowbar10 months ago
This looks useful but I&#x27;m worried about portability. Are there any plans for native Windows support?
评论 #40957808 未加载
Arech10 months ago
Very interesting... I wonder, how does code performance compares to raw Vulkan?
评论 #40960791 未加载
coffeeaddict110 months ago
Is this intended to integrate well in an existing WebGPU project?
评论 #40960997 未加载
apatheticonion10 months ago
Oh nice! Would love to see a Rust crate wrapping bindings for this
评论 #40960094 未加载
01HNNWZ0MV43FF10 months ago
&gt; The only library dependency of gpu.cpp is a WebGPU implementation.<p>Noo
评论 #40957632 未加载
评论 #40956704 未加载
kookamamie10 months ago
Portable, as in Windows native is not supported?
byefruit10 months ago
This looks great. Is there an equivalent project in rust?
评论 #40954647 未加载
评论 #40954310 未加载