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.

Labs Suck

https://buttondown.com/TYFYFL/archive/labs-suck/
1•speckx•37s ago•0 comments

Four weeks of list prices from 10 research peptide stores

https://peptidebureau.com/peptide-price-and-law-report.html
1•peptidebureau•45s ago•0 comments

New Super Magnets Turbocharge the Large Hadron Collider

https://spectrum.ieee.org/large-hadron-collider-superconducting-magnets
1•rbanffy•52s ago•0 comments

Compromised GitHub accounts push CI secret stealer to repositories

https://www.aikido.dev/blog/compromised-github-accounts-push-ci-secret-stealer-to-tens-of-thousan...
1•jamilbk•1m ago•0 comments

Claude Code's API billing depends on how often the cache expires

1•MaxBozhenko•1m ago•0 comments

Show HN: Upstar, GitHub projects ranked by velocity in each topics

https://upstar.dev/
1•armelmatio•1m ago•0 comments

OPG set to revise timeline and cost of first SMR unit

https://www.world-nuclear-news.org/articles/opg-to-revise-timeline-and-cost-of-first-smr-unit
1•PaulHoule•2m ago•0 comments

Nvidia CEO Jensen Huang resigns after reports of extramarital relationships

https://www.nbcnews.com/tech/tech-news/nvidia-ceo-jensen-huang-resigns-reports-extramarital-relat...
3•sonabinu•3m ago•0 comments

Pixelate the World

https://googlemapsmania.blogspot.com/2026/10/pixelate-world.html
1•surprisetalk•3m ago•0 comments

Show HN: MergeMax, a monthly ranking of public merged PRs on GitHub

https://mergemax.dev
1•diancodes•6m ago•0 comments

Ask HN: Can I still earn money on ANT IPO?

1•roschdal•6m ago•0 comments

Nvidia CEO Jensen Huang resigns after reports of second affair deepened scandal

https://www.bbc.co.uk/news/live/c6zjry11v8w1t
9•cognoboffin•7m ago•0 comments

Skipping Cloud SDKs: How ScopeDB Accesses Object Storage with Apache OpenDAL

https://opendal.apache.org/blog/2026/11/11/scopedb-on-opendal/
3•tison•7m ago•0 comments

Jensen Huang resigns as Nvidia CEO immediately

https://www.reuters.com/live/nvidia-live-board-meets-fate-ceo-jensen-huang-after-affair-reports-2...
14•ksec•7m ago•2 comments

Jensen Huang Resigns as CEO, Colette Kress Named Interim

https://www.bloomberg.com/news/live-blog/2026-11-11/nvidia-turmoil-board-to-weigh-ceo-jensen-huan...
5•jbredeche•9m ago•0 comments

Jensen Huang resigns as chief executive after affair allegations

https://www.ft.com/content/b4a0f3d9-f075-47ea-9a85-77cdade9a06f
2•zomtorg•10m ago•0 comments

Jensen Huang resigning effective immediately

https://www.stocktitan.net/news/NVDA/nvidia-announces-ceo-03al5m45ne1p.html
10•chrisss395•11m ago•7 comments

NVIDIA Announces CEO Transition

https://nvidianews.nvidia.com/news/nvidia-announces-ceo-transition
147•lldb•11m ago•51 comments

Anduril says its first satellite can see adversaries maneuver in orbital night

https://arstechnica.com/space/2026/11/anduril-demos-night-vision-sensor-for-tracking-satellites-i...
1•Brajeshwar•13m ago•0 comments

Cameras in space could help spot invasive plants on Earth

https://www.economist.com/science-and-technology/2026/11/11/cameras-in-space-could-help-spot-inva...
1•Brajeshwar•13m ago•0 comments

Silicon Valley Podcast Hosts Try to Understand Why Regular People Are Mad

https://www.404media.co/silicon-valley-podcast-hosts-try-to-understand-why-regular-people-are-mad/
1•Brajeshwar•13m ago•1 comments

Independent Curl – Procedural GPU Patterns

https://catlikecoding.com/godot/procedural-gpu-patterns/11-independent-curl/
1•ibobev•13m ago•0 comments

The difference between undefined behavior and ill-formed C++ programs

https://devblogs.microsoft.com/oldnewthing/20240802-00/?p=110091/
2•ibobev•13m ago•0 comments

Trump proposed a 'secret weapon' to police colleges. It will soon become reality

https://text.npr.org/nx-s1-6027967
2•mooreds•14m ago•0 comments

Era – Super realistic synthetic companies

https://github.com/eon-io/era
1•dkgs•14m ago•0 comments

Indian Ocean Geoid Low

https://en.wikipedia.org/wiki/Indian_Ocean_Geoid_Low
2•orn688•14m ago•0 comments

Starshield speed restriced again, hampering efforts to intercept Russian drones

https://kyivindependent.com/starshield-speed-restrictions-return-hampering-efforts-to-intercept-r...
1•consumer451•14m ago•0 comments

Why Are We Betting on the End of the World Instead of Saving It?

https://worldsensorium.com/why-are-we-betting-on-the-end-of-the-world-instead-of-saving-it/
1•dnetesn•14m ago•0 comments

Show HN: An animated explainer of our BFT blockchain, driven by the live chain

https://explorer.janzeer.org/workflow
1•syriandeveloper•15m ago•0 comments

Wallat

https://wallat.id
1•workingdayllc•15m ago•0 comments