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.

Fixing analog audio on the $2.58 HDMI-to-VGA adapter

https://nyanpasu64.gitlab.io/blog/hdmi-vga-dac-audio/
1•zdw•24s ago•0 comments

After hooking China on coffee, Starbucks ramps up consumer strategy

https://www.scmp.com/business/china-business/article/3359294/after-hooking-china-coffee-starbucks...
1•keepamovin•1m ago•0 comments

The '1776 Diet': What Americans ate during the nation's founding

https://www.foxnews.com/health/1776-diet-what-americans-really-ate-during-nations-founding
1•keepamovin•1m ago•0 comments

A gender-swap EarthBound for my daughter (2025)

https://tommy.reddad.net/post/2025-12-04-coilsnake/
1•Sajarin•2m ago•0 comments

Show HN: Codex-review – a read-only cross-model review skill for Claude Code

https://github.com/shimo4228/codex-review
1•shimo4228•6m ago•0 comments

Beeg float library, a Rust port of Fabrice Bellard's libbf

https://github.com/lifthrasiir/libbeef
1•serialx•13m ago•0 comments

Cuba's Green Solution to the U.S. Oil Blockade: Solar-Powered Electric Tricycles [video]

https://www.youtube.com/watch?v=eeg0CthbzTE
1•thelastgallon•18m ago•0 comments

New California study finds highly educated workers most harmed by AI

https://www.sfgate.com/politics/article/california-ai-study-22321472.php
3•littlexsparkee•28m ago•0 comments

US and Chinese companies train almost all of the most-used AI models

https://ourworldindata.org/data-insights/us-and-chinese-companies-train-almost-all-of-the-worlds-...
3•TMWNN•33m ago•0 comments

Mouse: Precision Editing Tools for AI Coding Agents

https://hic-ai.com
4•handfuloflight•36m ago•0 comments

Meituan Trained a 1.6T-Parameter AI Model Without Nvidia GPUs

https://xyzlabs.substack.com/p/meituan-trained-a-16t-parameter-ai
2•mgh2•38m ago•1 comments

China's LongCat-2.0 Becomes the Biggest AI Model Without Nvidia Chips

https://tech.yahoo.com/ai/articles/china-longcat-2-0-becomes-134258951.html
2•mgh2•38m ago•1 comments

Shadcn/UI now defaults to Base UI instead of Radix

https://ui.shadcn.com/docs/changelog
14•dabinat•51m ago•0 comments

Binary Coverage the Wrong Way

https://redvice.org/2026/coverage-the-wrong-way/
3•matt_d•57m ago•0 comments

Oxc (popular front-end tooling) forked my parser but removed my copyright notice

https://github.com/oxc-project/oxc-css-parser/issues/92
3•gplane•1h ago•0 comments

Moby Dick Workout

https://www.hogbaysoftware.com/posts/moby-dick-workout/
7•helloplanets•1h ago•1 comments

My ASN Journey series (2024)

https://www.animmouse.com/p/my-asn-journey/
6•antonalekseev•1h ago•1 comments

The Electricity: Why Google may be trying to make intelligence disappear

https://manasbihani.substack.com/p/the-electricity
2•manasb25•1h ago•0 comments

Reading Minds with Ultrasound: Less-Invasive Technique for Brain's Intentions (2021)

https://www.caltech.edu/about/news/reading-minds-with-ultrasound-a-less-invasive-technique-to-dec...
3•mgh2•1h ago•0 comments

HarnessMonkey – claude mods to show hidden tokens & improve vibes!

https://github.com/hackerbara/harnessmonkey
2•hackerbara•1h ago•1 comments

RTS a TypeScript-to-Native Compiler/Runtime in Rust (Cranelift JIT and AOT)

https://github.com/UrubuCode/rts
2•azx0025•1h ago•0 comments

Show your hands honor for the power they bring you

https://aresluna.org/show-your-hands-honor/
7•aua•1h ago•0 comments

Show HN: Inches to CM converter with charts and screen size references

https://inches-to-cm.net
2•robot1996•1h ago•2 comments

Perchlorate

https://en.wikipedia.org/wiki/Perchlorate
5•soupspaces•1h ago•1 comments

Show HN: How do you guys keep your journey diaries?

https://journeydiaries.vercel.app/
2•dutay05•1h ago•2 comments

Drawbridge – Design Editor for Claude Code and Cursor

https://github.com/breschio/drawbridge
2•javatuts•1h ago•0 comments

Spotify deletes 500K Malcolm Todd streams for suspected prediction manipulation

https://mashable.com/tech/spotify-deletes-malcolm-todd-streams-manipulation-prediction-markets
2•gnabgib•1h ago•0 comments

President pardons 9 for Clean Air violations for 'fixing their car'

https://www.msn.com/en-us/news/crime/trump-pardons-9-for-clean-air-violations-for-fixing-their-ca...
34•OutOfHere•1h ago•3 comments

Writing Blogs or News Articles? Free and Fast Word Counter -Accurate and Private

https://fastwordcount.com/
3•rajkverma123•1h ago•0 comments

I Accidentally Started a Small Business Three Weeks Ago

https://extelligence.substack.com/p/i-accidentally-started-a-small-business
13•shpat•2h ago•2 comments