frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Zig and GPUs

https://alichraghi.github.io/blog/zig-gpu/
57•Cloudef•1y ago

Comments

LegNeato•1y ago
See also https://github.com/Rust-GPU/rust-gpu and https://github.com/rust-gpu/rust-cuda
ladyanita22•1y ago
Surprisingly, it seems this project just supports Spir-V and PTX, but not DXIL or AMDGCN.

I say surprisingly, because I'd expect Rust support to be more mature than Zig's.

lostmsu•1y ago
Microsoft indicated they are switching to SPIR-V from DXIL: https://devblogs.microsoft.com/directx/directx-adopting-spir...
skywal_l•1y ago
I am a complete noob in GPU but is AMDGCN the older generation with the new one being RDNA? If you generate a binary for AMDGCN, will it run on the newest cards?

Also, I though that these GPU ISAs were "proprietary". I wonder how reliable the binary generation can be.

AliChraghi•1y ago
AMD ISAs are changing for almost every generation so LLVM[1] continues to keep the architecture name "amdgcn" and handle the variation based on the model flag (e.g., -mcpu=gfx1030 for RDNA2, -mcpu=gfx1100 for RDNA3).

> I though that these GPU ISAs were "proprietary"

PTX spec[2] is publicly available but the actual hardware assembly (SASS) is not. Although i believe Nsight allows you to view it.

1. https://llvm.org/docs/AMDGPUUsage.html#processors

2. https://docs.nvidia.com/cuda/parallel-thread-execution

imtringued•1y ago
If LLVM can target AMD GPUs what exactly prevents AMD and ROCm from supporting all the damn GPUs?

At this point I'm convinced that the real problem with AMD GPUs isn't necessarily the compilers (although they do produce mediocre code) or even the hardware itself, but some crappy C++ driver code that can't handle running graphics and compute at the same time. The datacenter GPUs never had to run graphics in the first place, so they are safe.

slavik81•1y ago
In my experience, the compiler, compute drivers, and HIP runtime work fine for all modern AMD GPUs. The only parts of the stack that don't run on all GPUs are the math and AI libraries. And that is mostly because AMD isn't building and testing those libraries for unsupported GPUs. The actual work required to enable functional support was straightforward enough that I ported them myself when packaging the libraries for Debian. Though, I had a lot of help on the testing.

See the Debian Trixie Supported GPU list: https://salsa.debian.org/rocm-team/community/team-project/-/...

SomaticPirate•1y ago
While I admire the work of hobbyists it still looks like C/C++ will be the default until a GPU vender makes the decision to support these libraries.

From my understanding, Vulkan and OpenGL are nice but the true performance lies in the specific toolkits (ie CUDA, Metal).

Wrapping the vendor provided frameworks is liable to break and that isn't tenable for someone who wants to do this on a professional basis.

pjmlp•1y ago
They also miss that on CUDA's case it is an ecosystem.

Actually it is C, C++, Fortran, OpenACC and OpenMP, PTX support for Java, Haskell, Julia, C#, alongside the libraries, IDE tooling and GPU graphical debugging.

Likewise Metal is plain C++14 plus extensions.

On the graphics side, HLSL dominates, following by GLSL and now slang. There are then MSL, PSSL and whatever NVN uses.

By the way, at GTC NVIDIA announced going all in with Python JIT compilers for CUDA, with feature parity with existing C++ tooling. There is now a new IR for doing array programming, Tile IR.

dismalaf•1y ago
I don't quite get this comment.

This is supposed to be used in place of CUDA, HIP, Metal, Vulkan, OpenGL, etc... It's targeting the hardware directly so doesn't need to be supported as such.

The site also seems to clearly state it's a work in progress. It's just an interesting blog post...

slowmovintarget•1y ago
The Zig compiler can compile C, though.

How Has Roman Concrete Lasted for Millennia? 1,900-Year-Old Latrine Offers Clues

https://www.smithsonianmag.com/smart-news/how-has-roman-concrete-lasted-for-millennia-a-1900-year...
1•divbzero•49s ago•0 comments

Every junior portfolio I screen now is incredible, and it means nothing

https://old.reddit.com/r/cscareerquestions/comments/1uy5m4u/every_junior_portfolio_i_screen_now_i...
1•bundie•6m ago•0 comments

AI Assistant Needs a Back End. Put It at the Edge

https://lowlatencyclub.ai/blog/posts/edge-ai-assistant-backend-go
1•sona-coffee11•7m ago•0 comments

AI Censorship Tested Across India, China, US, and Europe

https://www.reddit.com/r/AIDiscussion/s/MxOxble1Kd
2•omrajguru•9m ago•0 comments

Things you didn't know about indexes

https://jon.chrt.dev/2026/04/15/things-you-didnt-know-about-indexes.html
1•thunderbong•11m ago•0 comments

All the Beautiful Art in This Video Game Was Hand-Drawn by One Person(2020)

https://www.vice.com/en/article/all-the-beautiful-art-in-this-video-game-was-hand-drawn-by-one-pe...
1•iamanatom•11m ago•0 comments

Superdesign Prompt Library

https://superdesign.dev/library
1•handfuloflight•16m ago•0 comments

NASA's Roman Telescope vs. Webb: the telescope that will map a billion galaxies

https://dotient.com/blog/nancy-grace-roman-space-telescope
2•localdeclan•20m ago•0 comments

Warren Buffett Initiates Berkshire Hathaway's Investment in Alphabet

https://www.cnbc.com/2026/07/15/warren-buffett-tells-cnbc-he-initiated-berkshire-hathaways-invest...
2•mgh2•20m ago•0 comments

What We Talk About When We Talk About Bruce Lee

https://decodingvibes.com/blog/what-we-talk-about-when-we-talk-about-bruce-lee/
1•altmanaltman•20m ago•0 comments

Netflix plateauing engagement, stock drops after Q3 revenue falls short

https://finance.yahoo.com/markets/stocks/article/netflix-stock-drops-after-q3-revenue-falls-short...
1•mgh2•24m ago•1 comments

How to report copying review data under Copyright to google

https://www.google.com/
1•nsinghal12•30m ago•0 comments

AI's real bottleneck is data delivery

https://techcrunch.com/sponsor/f5/your-gpus-arent-the-problem-ais-real-bottleneck-is-data-delivery/
2•adithyaharish•32m ago•0 comments

Gradle Technologies is now Develocity

https://develocity.ai/blog/gradle-technologies-is-now-develocity/
1•mccullal8•37m ago•0 comments

Streaming Encryption (2014)

https://www.imperialviolet.org/2014/06/27/streamingencryption.html
1•nivethan•39m ago•0 comments

Asbestos is a tool, just like any other

https://www.osnews.com/story/145530/asbestos-is-a-tool-just-like-any-other/
2•amcclure•39m ago•0 comments

Samsung is testing a network permission toggle feature

https://www.androidauthority.com/samsung-one-ui-9-concentration-feature-3666807/
2•vilasa•42m ago•0 comments

Router ARP/NAT contradict after reload. Client ghost or firmware bug?

2•asdem•43m ago•0 comments

Preempt AI v2 – AI is powerful. Make sure it's safe too

https://www.getpreempt.com/
1•karthikravva•46m ago•0 comments

Barefoot shoes are trendy after years of mockery. Do they work?

https://slate.com/life/2026/07/barefoot-shoes-minimalist-toe-running-sneakers-xero-vibram.html
5•littlexsparkee•49m ago•0 comments

Show HN: PocketVeto is a Bluetooth-only AI agent remote control

https://github.com/pocket-veto/pocket-veto
1•pocket-veto•49m ago•0 comments

OpenAI Staffers Are Funding a Rival Super Pac to Take on Their Boss

https://www.wired.com/story/openai-employees-donations-guardrails-alliance-leading-the-future/
5•1vuio0pswjnm7•50m ago•0 comments

Meta data centre in Alberta to start operating before neighbouring power plant

https://www.cbc.ca/news/canada/edmonton/meta-data-centre-alberta-greenlight-power-plant-9.7266096
3•1vuio0pswjnm7•52m ago•0 comments

Meta axes feature allowing tagging Instagram users to generate AI images of them

https://www.cbc.ca/news/business/meta-instagram-change-ai-settings-9.7265448
2•1vuio0pswjnm7•53m ago•0 comments

Show HN: Human0 – A template to run an autonomous, self-improving code loop

https://github.com/human0-ai/template
1•moshest•54m ago•0 comments

Databricks Set to Hit $188B Valuation with New Investment from Coatue

https://www.wsj.com/tech/ai/databricks-set-to-hit-188-billion-valuation-with-new-investment-from-...
2•jgalt212•55m ago•1 comments

Taliban 'National Keyboard' App Risks User Surveillance

https://www.afintl.com/en/202605276608
3•alephnerd•55m ago•1 comments

Code Ownership and Software Quality: A Replication Study (2015)

https://www.microsoft.com/en-us/research/publication/code-ownership-and-software-quality-a-replic...
2•LAC-Tech•56m ago•1 comments

FCC Officials Took $$$ Gifts from Paramount as Company Needed Approval for Deals

https://www.propublica.org/article/paramount-mergers-fcc-kennedy-center-gala
3•WarOnPrivacy•56m ago•0 comments

Chaldean Mass (Old) [video]

https://www.youtube.com/watch?v=HIZDK1PsJpY
1•marysminefnuf•58m ago•0 comments