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.

Billion-query-per-second lookup tables in C++

https://lemire.me/blog/2026/10/26/billion-query-per-second-lookup-tables-in-c/
1•foltik•36s ago•0 comments

A little directory of small, weird websites

https://culdesac.site/
1•henrychannel•1m ago•0 comments

VibeScout

https://play.google.com/store/apps/details?id=com.kennethwahl.vibescout&hl=en_US
1•bustapheliac•2m ago•0 comments

Millions Use Antidepressants. We Still Don't Understand How They Work

https://www.nytimes.com/2026/10/27/science/how-antidepressants-ssri-work.html
1•gumby•4m ago•0 comments

Workshop on Modular forms around string theory (2013)

https://www.fields.utoronto.ca/programs/scientific/13-14/calabi-yau/modular/index.html
1•gone35•4m ago•0 comments

Google can now use your Gmail data for ads: How to turn it off

https://proton.me/blog/gmail-ads
4•devonnull•10m ago•0 comments

Women, Work and Caregiving Through the Arc of Family Life

https://www.pewresearch.org/social-trends/2026/10/22/women-work-and-caregiving-through-the-arc-of...
1•gmays•13m ago•0 comments

Starship Telemetry

https://telemetry.starshipspaceprogram.com/
1•delichon•16m ago•0 comments

Stealing a Trick from Nuclear Physics to Solve a Puzzle

https://cezarcocu.com/blog/stealing-a-physics-trick/
1•ggamecrazy•16m ago•0 comments

Show HN: A calculator for gas costs and road trip expenses

https://gettripcost.com/
1•richardharmer•19m ago•0 comments

Building Slack at Salesforce. Part teo

https://buildingslack.com/salesforce-part-two/
2•sanj•20m ago•0 comments

Building Slack at Salesforce. Part one

https://buildingslack.com/salesforce-part-one/
1•sanj•20m ago•0 comments

America Needs Explosives for Its Drones. Odin Energetics Is Making Them

https://www.wsj.com/politics/national-security/america-needs-explosives-for-its-drones-this-start...
1•JumpCrisscross•23m ago•0 comments

Microsoft offers voluntary buyouts as AI leads to efficiency push

https://www.cnbc.com/2026/10/26/microsoft-msft-voluntary-buyouts.html
2•gmays•23m ago•1 comments

Rest of World faces prospect of shutting down

https://www.semafor.com/article/10/25/2026/rest-of-world-faces-prospect-of-shutting-down
1•HotGarbage•25m ago•0 comments

Tiny model, full provenance – Apache Sourcelume

https://rai.apache.org/blog/tiny-model-full-provenance.html
1•qainsights•28m ago•0 comments

A hand-picked gallery of AI-generated motion graphics and their prompts

https://motioncrackers.com
1•Adam-Hincu•29m ago•0 comments

Show HN: Misery in America

https://sightspinner.ai/blog/misery-in-america-2026-10-28.html
1•sightspinner•31m ago•1 comments

Show HN: I built Trvlrr, home for all your travels

https://trvlrr.app/
1•sanjaybhagia•33m ago•0 comments

Amazon defines the role of the developer in the age of AI

https://www.aboutamazon.com/news/company-news/amazon-software-engineer-role-guideline-ai
4•emot•40m ago•0 comments

Shitty Screenshare

https://shittyscreenshare.com/
1•birdculture•42m ago•0 comments

Can Gambia vs. Myanmar Help Establish Genocidal Intent in Russia's Ukraine War?

https://www.justsecurity.org/161466/icj-myanmar-genocidal-intent-russias-war-ukraine/
1•beansovertoast•43m ago•0 comments

Show HN: A visual explainer tracing an LLM API request to the GPU and back

https://github.com/sujee/visual-stories/tree/main/projects/tracing-llm-api-request
1•sujee_dev•44m ago•0 comments

Plex "laid off the player team" what is the industry doing to developers?

https://samueleast.co.uk/playground/laid-off-from-plex-60-days-in
2•healsdata•48m ago•0 comments

New AI-powered mosquito trap could help curb dengue outbreaks

https://www.usf.edu/news/2026/new-ai-powered-mosquito-trap-could-help-curb-dengue-outbreaks.aspx
2•gmays•48m ago•0 comments

AI Phone

https://github.com/oxnw/ai-phone
1•handfuloflight•48m ago•0 comments

Cue – A daily notes and to-do app for Mac and iPhone

https://github.com/zlwaterfield/cue
1•zlwaterfield•50m ago•0 comments

A New Dwarf Planet (Probably) Spotted Beyond Pluto

https://www.nytimes.com/2026/10/27/science/space/new-dwarf-planet-beyond-pluto.html
2•mrjaeger•57m ago•1 comments

Toad Venom Nose Spray Quickly Eases Depression for Weeks in Clinical Trial

https://www.sciencealert.com/scientists-tested-a-toad-venom-psychedelic-on-treatment-resistant-de...
2•gmays•58m ago•1 comments

New Agentic security tool detects shuts down hackers on autopilot

https://argusone.website
13•wearehumxn•1h ago•2 comments