frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

Computer-Use-Linux

1•anotherCodder•1m ago•0 comments

Built a email agent for founders which never sleeps

1•maulik_builds•2m ago•0 comments

'Impossible' Black Holes: Scientists Know Why

https://www.wired.com/story/the-universe-is-full-of-impossible-black-holes-now-scientists-know-why/
1•Timofeibu•4m ago•0 comments

ShannonBase: The Lightweight Semantic Layer for Enterprise AI SQL

https://medium.com/@shannon.data.tech/shannonbase-the-lightweight-semantic-layer-for-enterprise-a...
1•shannon-data-ai•8m ago•1 comments

Captainys / Townsemu Releases v20260522

https://github.com/captainys/TOWNSEMU/releases/tag/v20260522
1•cyrc•10m ago•0 comments

Maybe human-coded software will be seen like we see Pyramids of Giza today

https://chaos.social/@doener/116624000858016044
2•doener•16m ago•0 comments

"Write as Little Code as Possible"

https://age-of-product.com/little-code-ai/
1•swolpers•21m ago•0 comments

New macOS Spreadsheet App (v1.2)

https://apps.apple.com/us/app/quicksheet-light-spreadsheet/id6748457063?mt=12
2•FileNotch•25m ago•0 comments

Language models are weird for the same reason human cultures are weird

https://davidoks.blog/p/language-models-are-weird-for-the
1•tie-in•26m ago•0 comments

Would people value credibility indicators in shortform educational/news content?

1•HelloWorldP•27m ago•0 comments

DSHR's talk at Stanford "Designing for Authenticity" class

https://blog.dshr.org/2026/05/talk-jonathan-dotans-class.html
1•basilesimon•28m ago•0 comments

OpenAI and Nvidia Are Using Google's SynthID to Watermark AI Content

https://firethering.com/openai-nvidia-using-google-synthid-ai-watermarking/
2•steveharing1•31m ago•0 comments

A Cattle Ranch Is Doing What the Ivy League Can't

https://www.nytimes.com/2026/05/20/opinion/deep-springs-college-ivy-league-education.html
1•mitchbob•32m ago•0 comments

The Enhanced Games: Like the Olympics, but steroids are allowed

https://www.bbc.com/news/articles/cedpz1zqp8po
1•only_in_america•33m ago•0 comments

Build-time sponsorship verification for OSS libraries installed via NuGet

https://github.com/SimonCropp/SponsorCheck
1•lowleveldesign•42m ago•0 comments

Inside the Motorola 68060 and Chip Design: Lead Designer Joe Circello

https://www.youtube.com/watch?v=1takr2k7Yfo
1•doener•47m ago•0 comments

Claude Got Fed Up

2•blokeofkent•49m ago•1 comments

Karen Hao: AI creating a DESPERATE BASE OF WORKERS with no full-time employment

https://www.youtube.com/watch?v=E4Zd9ZXjkao
4•chvid•50m ago•1 comments

SnapIndex turns browser screenshots into searchable notes

https://www.snapindex.tools/
4•walkingsardine•52m ago•1 comments

Mathematical Patterns in African American HAIRSTYLEs

https://math.buffalo.edu/mad/special/gilmer-gloria_HAIRSTYLES.html
2•marysminefnuf•56m ago•0 comments

A Place for Free Speach

https://openvoice.club
1•DevBookDigital•58m ago•1 comments

Structured LLM Learning Path, from Zero to AI Researcher, 8-Phase Curriculum

https://github.com/barvhaim/llm-learning-path
1•bignet•58m ago•0 comments

Apiffuf (ffuf for APIs) – fuzzer for API hostsnames and endpoints

https://github.com/jsmonhq/apiffuf
1•rashahacks•1h ago•0 comments

APKPure is distributing a malicious copy of Telegram

https://xcancel.com/EricParker/status/2058411298195661221
2•csmantle•1h ago•0 comments

From source code 2 LLM constraints:a semantic extractor for Python, SwiftUI, Lua

https://github.com/whitecell-dev/Semantic-Extractor/tree/main
1•MaykonMan•1h ago•0 comments

Greg Brockman: Inside the 72 Hours That Almost Killed OpenAI

https://fs.blog/knowledge-project-podcast/greg-brockman/
2•prakashqwerty•1h ago•0 comments

Computer Science Achievement and Writing Skills Predict Vibe Coding Proficiency

https://dl.acm.org/doi/10.1145/3772318.3791666
2•galaxyLogic•1h ago•1 comments

Tinkersynth

https://www.tinkersynth.com/
1•saikatsg•1h ago•0 comments

A maintainability ratchet for AI-assisted Python

https://kayhan.dev/posts/014-letting-agents-write-code-without-ratcheting-up-risk/
1•keynha•1h ago•0 comments

Why Your Docker Container Is 1.2GB When It Should Be 80MB

https://sandeepbansod.medium.com/why-your-docker-container-is-1-2gb-when-it-should-be-80mb-7b443a...
3•thunderbong•1h ago•2 comments