Live data from Hacker News

A CPU that runs entirely on GPU

github.com

11–20 of 144 posts

Re: A CPU that runs entirely on GPU

#15

"Multiplication is 12x faster than addition..." Wow. That's cool but what happens to the regular CPU?

This CPU simulator does not attempt to achieve the maximum speed that could be obtained when simulating a CPU on a GPU.

For that a completely different approach would be needed, e.g. by implementing something akin to qemu, where each CPU instruction would be translated into a graphic shader program. On many older GPUs, it is impossible or difficult to launch a graphic program from inside a graphic program (instead of from the CPU), but where this is possible one could obtain a CPU emulation that would be many orders of magnitude faster than what is demonstrated here.

Instead of going for speed, the project demonstrates a simpler self-contained implementation based on the same kind of neural networks used for ML/AI, which might work even on an NPU, not only on a GPU.

Because it uses inappropriate hardware execution units, the speed is modest and the speed ratios between different kinds of instructions are weird, but nonetheless this is an impressive achievement, i.e. simulating the complete Aarch64 ISA with such means.

Re: A CPU that runs entirely on GPU

#17
Ya know just today I was thinking around a way to compile a neural network down to assembly. Matching and replacing neural network structures with their closest machine code equivalent.

This is way cooler though! Instead of efficiently running a neural network on a CPU, I can inefficiently run my CPU on neural network! With the work being done to make more powerful GPUs and ASICs I bet in a few years I'll be able to run a 486 at 100MHz(!!) with power consumption just under a megawatt! The mind boggles at the sort of computations this will unlock!

Few more years and I'll even be able to realise the dream of self-hosting ChatGPT on my own neural network simulated CPU!

Re: A CPU that runs entirely on GPU

#18
post #8

Earlier quoted context omitted.

Just want to point out this comment is highly ironic. This is all a computer does :P We need llms to be able to tap that not add the same functionality a layer above and MUCH less efficiently.

> We need llms to be able to tap that not add the same functionality a layer above and MUCH less efficiently. Agents, tool-integrated reasoning, even chain of thought (limited, for some math) can address this.

You're both completely missing the point. It's important that an LLM be able to perform exact arithmetic reliably without a tool call. Of course the underlying hardware does so extremely rapidly, that's not the point.

Re: A CPU that runs entirely on GPU

#20

"Multiplication is 12x faster than addition..." Wow. That's cool but what happens to the regular CPU?

This CPU simulator does not attempt to achieve the maximum speed that could be obtained when simulating a CPU on a GPU. For that a completely different approach would be needed, e.g. by implementing something akin to qemu, where each CPU instruction would be translated into a graphic shader program. On many older GPUs, it is impossible or difficult to launch a graphic program from inside a graphic program (instead of…

[flagged]
Post reply on HN