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.

MCP-safeguard: open-source security scanner for MCP servers

https://github.com/SyedAnas01/mcp-safeguard
1•Anas1371•2m ago•0 comments

Slow Surveys Are Dead: Terapage CEO on Why Experts Are Moving to Synthetic Data

https://zenodo.org/records/20315637
1•anasteciadunu•3m ago•0 comments

Ask HN: What would you expect from an app launcher as a developer?

1•icauroboros•4m ago•1 comments

Django 6.1 alpha 1 released

https://www.djangoproject.com/weblog/2026/may/20/django-61-alpha-1-released/
1•collinmanderson•5m ago•1 comments

Introducing RoughDraft – Easier collaboration with your agent

https://www.roughdraft.md/
1•rmason•6m ago•0 comments

Waw an Namus: Libya's Black Oasis [video]

https://www.youtube.com/watch?v=2iH5J2jz-ZY
1•vinnyglennon•6m ago•0 comments

TargetBridge: Use an iMac as Display for a Modern Mac

https://github.com/swellweb/targetBridge
1•ThomasWaldmann•11m ago•2 comments

16 days, 4 channels, no AWS Bedrock quota fix

https://ziva.sh/blogs/no-aws-bedrock-quota-fix
2•OsrsNeedsf2P•12m ago•1 comments

Dear Google Cloud: Your Deprecation Policy Is Killing You (2020)

https://steve-yegge.medium.com/dear-google-cloud-your-deprecation-policy-is-killing-you-ee7525dc05dc
2•gwerbret•14m ago•0 comments

UK radio station apologises for accidentally announcing king's death

https://www.theguardian.com/tv-and-radio/2026/may/20/uk-radio-station-apologises-for-accidentally...
2•vinni2•15m ago•1 comments

OpenAI co-founder Andrej Karpathy joins Anthropic

https://techcrunch.com/2026/05/19/openai-co-founder-andrej-karpathy-joins-anthropics-pre-training...
1•nelsonmarcos•18m ago•0 comments

RegCalc – browser calculator for MCU register math (UART, PLL, timers)

https://regcalc.vercel.app/
1•jedinaj•19m ago•0 comments

AI should feel like a keyboard shortcut, not a website

https://wheelly.ai/
1•vasekj•22m ago•0 comments

Not alive, but not dead: disembodied human brains used for drug testing

https://www.science.org/content/article/not-alive-not-dead-disembodied-human-brains-used-drug-tes...
3•Timofeibu•22m ago•1 comments

San Francisco turns to AI to save whales from ship strikes as deaths soar

https://www.theguardian.com/environment/2026/may/20/san-francisco-bay-ai-whales
3•jethronethro•23m ago•0 comments

Show HN: I built Istanbul live transit map

https://tarif.ist/
2•berkaycubuk•25m ago•0 comments

AI atlas reveals hidden whole-body-damage caused by obesity

https://medicalxpress.com/news/2026-05-ai-atlas-reveals-hidden-body.html
1•SVI•26m ago•0 comments

Beam on Mobile: Mob

https://genericjam.com/blog/mob-intro
2•minton•27m ago•0 comments

Private, advance operational testing under select regional franchise environment

https://app.qwoted.com/press_releases/new-frameworks-target-cloud-latency-as-mid-market-testing-b...
2•krish678•27m ago•0 comments

Why execution observability matters for EVM systems

https://blog.bridgexapi.io/why-execution-observability-becomes-critical-after-a-transaction-succeeds
2•Bridgexapi•27m ago•0 comments

Gemini 3.5 deleted 28,745 lines, broke production, and wrote a fake post-mortem

https://www.reddit.com/r/Bard/s/ZVAxv5ezdP
1•Michelangelo11•28m ago•0 comments

OpenSSF's CRob: 'The Runway Is Rapidly Running Out' on EU CRA Readiness

https://devops.com/openssfs-crob-the-runway-is-rapidly-running-out-on-eu-cra-readiness/
1•CrankyBear•29m ago•0 comments

Fork your dependencies

https://twitter.com/mitchellh/status/2057171518027887035
3•tosh•29m ago•0 comments

Training SID-1 to beat GPT-5 at search with 1k+ QPS RL

https://turbopuffer.com/blog/reinforcement-learning-sid-ai
5•maxrumpf•29m ago•0 comments

Why a healthy breath is a piece of engineering we don't appreciate

https://shiihaa.app/blog/it-breathes-i-breathe/
1•shiihaa•30m ago•0 comments

Hot-Potato Routing

https://www.rand.org/pubs/research_memoranda/RM3103.html
2•ustad•30m ago•0 comments

DiffsHub, from Pierre

https://diffshub.com/
1•bpierre•32m ago•0 comments

Los Angeles Tried to Tax Mansions. Apartment Construction Tanked

https://www.wsj.com/economy/housing/los-angeles-tried-to-tax-mansions-apartment-construction-tank...
4•JumpCrisscross•33m ago•0 comments

Stack Overflow: When We Stop Asking

https://css-tricks.com/stack-overflow-when-we-stop-asking/
2•soheilpro•37m ago•0 comments

A Guide to Keyboard Customization

https://aresluna.org/key-in-sight/
1•ramimac•39m ago•0 comments