Latimer
Reverse engineering my NVIDIA GPU and other adventures.
02/12/2026
This should be around a 25-30 minute read
St Jerome, the patron saint of translators and interesting desk decorations.
Kia ora Hello!
Back when I first got into computer preservation around 2021-22, I'd collect documents about computers made by companies that no longer exist or have mostly been forgotten. I looked at things like the Apollo Guidance Computer's architecture diagrams, where you could follow how the machine worked right down to its instructions. When I left the Army at the start of 2023, I swapped my old laptop for a desktop with an NVIDIA card in it, and out of habit I went looking for the same kind of documents for that. NVIDIA will happily tell you how to write programs for its cards, in a language of its own called CUDA, but the machine code underneath, the language the card itself actually runs, isn't written down anywhere public. So, being the nosy person I am, I went off and decided to look.
My first proper go at it was Booth (then BarraCUDA), my CUDA compiler. I had a few reasons for it, and like anything I do they've shifted around over time. I wanted to decide for myself how CUDA gets programmed (ballsy, I know). I wanted to do my own GPU work, and eventually support NVIDIA properly. And I'd got really into embedded programming, where a lot of safety critical industries can't use GPUs at all, because the toolchains are closed or far too big to audit. So I wanted something small (er) and auditable, and Booth is. It isn't large for a compiler, especially next to LLVM or the C++ compilers. That and I also wanted to figure out if I could build the damn thing after staring at various assembly languages for years. So from the grandiose to the absurd, which is typical depending on how you look at it.
In the beginning of computing there was the Apollo Guidance Computer. This has made a lot of people very angry and been widely regarded as a bad move.
When I released Booth nearly a year ago, I smashed into a great big GPU shaped wall really quick. A compiler for GPUs needs GPUs to test on, and cards cost money I'd rather spend on the finer things in life, like durries (that's a joke, Mum). So rather than turning my apartment into an AI data centre that would make Oracle blush, I tried to find an alternative. Luckily for me, George Hotz of tinygrad fame sent a message recommending tinygrad for testing. Which worked! For a while. But eventually my tests started failing for reasons outside my control. Moa, a Monte Carlo neutron transport code I used to check whether my compiler was generating mathematical nonsense, was throwing out physics breaking results. The emulator kept shifting under me, and I ended up having to basically put tinygrad in the freezer and pin it to an older version. That works to an extent, but this is another person's project. I couldn't update without risking breaking my compiler tests, I had no say in the direction of the project, and it has its own community with its own needs. Adding support for more AMD GPUs is a massive ask, let alone NVIDIA's undocumented and proprietary SASS.
So, to quote Napoleon Bonaparte of all people, "If you want a thing done well, do it yourself."
Introducing Latimer
The Holy Bible is one of the most translated books in the world. In fact, getting it into every language going has long been a core part of Christian missionary work. But what happens if the people you are translating for have no frame of reference for what you are trying to say? How on earth do you explain what the "lamb of God" is to someone who has never seen a sheep? The team translating the Gospel of John for the Nenets people, who live in the Russian Arctic, had this exact conundrum. The only sheep the Nenets came across were through trading with peoples from the south for their wool, and one of them could go most of their life without seeing one. So, after much deliberation, they ended up with "the young reindeer of God".
Travelling by reindeer near Arkhangelsk in the 1890s. Note the complete absence of sheep.
Like people, what makes sense to one computer will not make sense to another. If you took a program which was made to be run on an Intel chip but ran it on your local community mainframe it would throw up its metaphorical arms and go "well what's all this then" and promptly crash. There are a few ways to trick a program into running somewhere it wasn't made for. One is a piece of software known as a "binary translator", where you take a program, translate enough so it makes sense for the new computer and then run it. This is very important if you don't have the original source code which most people won't. Ever run a Windows program on a Linux box? That's Wine. Wanted to get an Intel application to work on your MacBook? That's Apple's own Rosetta. Wanted to test your code on a new computer architecture without owning the machine? You have QEMU for that, an emulator used by developers all around the world which will make your Intel chip think it's someone else. The wonderful world of Central Processing Units or CPUs has had this for years with numerous open source and proprietary programs making it so no one even has to think about it.
Graphics cards, or GPUs, never got any of this. A program written for a graphics card is written for one company's card, and it's stuck there twice over. The first problem is the language. Just like the Intel program on the mainframe, the compiled code is in that one card's own language and no other card can read a word of it. The second is everything the program leans on. A program built for an NVIDIA card doesn't do all of its own work, it calls on NVIDIA's own libraries, like cuBLAS for its maths, and those only exist for NVIDIA cards. So moving a program to another company's card means going back to the source code and rewriting big parts of it, and that's if you have the source code at all. Most people don't. Think of Photoshop, where all you ever get is the finished application. Now imagine being told that to use it on your MacBook you'd have to rewrite it all yourself, because there's no Rosetta to do it for you and not a drop of Wine either.
That would only be an annoyance if it was about Photoshop, but nearly all of the AI software in the world was written for NVIDIA's cards, and so was a good deal of the scientific software, the kind that models weather or physics. So the question of which card to buy stops being about which one is best or cheapest and becomes which one runs the software, and the answer is always the same company. AMD, Intel and others all make cards perfectly capable of doing the work, and they sit there unable to run programs that were never written for them, while everybody queues for the one company's cards and pays what it asks. It's the same great big GPU shaped wall I ran into with Booth, only this time a whole industry has run into it. On CPUs somebody would have written a Rosetta for it years ago, and for graphics cards nobody really had.
Latimer was a title given to people whose job it was to translate between various languages like Latin in the medieval world. It is also, funnily enough, the name of my binary translator and emulator which has managed to get programs intended for one GPU running on everything from an AMD GPU to a RISC-V chip and after a night with martinis, a mainframe.
Now getting there takes two tricks. The first is Rosetta's, quietly translating an Intel program so a MacBook can run it, and Latimer does that to the part of a program written for a graphics card, taking it exactly as it is, compiled binary and all, no source code required, and rewriting it for whatever chip happens to be in front of it. But a translated program is no use if it refuses to start, and a program built for an NVIDIA card will go looking for one before it does anything else. So, like QEMU convincing your Intel chip it's someone else, Latimer plays the card too. The program asks if there's an NVIDIA card about, Latimer says yes, the program asks for its NVIDIA libraries like cuBLAS, Latimer hands over its own, and the program carries on none the wiser with no graphics card in the machine at all. There was just one small problem with all of this. To translate a language you have to be able to read it first, and NVIDIA has never told anyone what theirs says.
Reverse engineering a magic rock
If you read my OCaml write-up, this will sound familiar. When I resurrected HALMAT there was no manual left to read, so I described what I thought the language looked like, fed it the real files, and let OCaml and Menhir tell me every time I'd got it wrong. I compared it to feeling your way around a dark room, which only works if something tells you when you've walked into a wall, and enough walls give you the shape of the room. A graphics card is the same dark room, except this time the thing telling me I'd hit a wall was the card itself. Hand it an instruction it doesn't like and it throws it straight back at you, hand it one it does and something somewhere changes, and all you have to do is notice what. Luckily for me, I wasn't the first person in the room.
Linux has its own open source driver for NVIDIA cards, written by people outside NVIDIA who'd spent years in the same dark room, and inside it is a compiler called NAK. A compiler has to write the card's language, so everything they'd worked out about it was sitting right there in the code for anyone to read, and most of what Latimer knows about NVIDIA's machine code started there. They were also kind enough to point me at sources I'd never have found on my own. Much later I came across SASS King, where Florian Mattana has been writing up the newest cards, the ones I don't own, and that filled in the various corners I couldn't have reached from my desk in Auckland. But they'd only mapped the parts of the room they needed. NAK needed the instructions a graphics driver uses, and I needed the ones an AI program uses (plus my various other contraptions), so sooner or later I was going to have to go and bump into the rest myself.
Now you might be wondering why I'd have to bump into anything, when the people who built the room are still around. With HALMAT the company was long gone, relegated to various archives, but NVIDIA is very much still here, so why not just ask them, or at least use the tools they hand out? And they do hand them out. NVIDIA's own software comes with tools that will take a program and show you exactly what the card is being told to do, which would have saved me months. The trouble is that the agreement you click through when you install it, the one nobody has ever read, says you can't use them to work out how any of it works. That line was added in 2022, and it made life very hard for ZLUDA, a project that lets programs made for NVIDIA cards run on other ones by a different route, working from the text version of a program and not the card's own code. Its author is still building it today, which I have a lot of respect for. I quite like not being sued, so I've never used any of them, and I even wrote a little guard that refuses to let my own tools start if it spots one of NVIDIA's on the machine. So it was going to be me, the card and the legendary Kiwi Classics playlist on Spotify against the dark room.
I didn't have to bump into all of it at once though, and that's down to Booth. Latimer was built to test my compiler, and since I'd written the compiler, the only programs Latimer had to read in the beginning were the ones Booth wrote, which is a far smaller language than everything a graphics card can do. And thank god for that, because the other way round is mad. Make a translator for other people's programs and everyone expects it to run all of them on day dot. Every program anybody has ever written for the card, using every instruction in whatever weird order they felt like at the time, and you won't know you've got one wrong until some poor bugger's program falls over. It's like being told to translate the whole library when you've only just learnt the alphabet, which is probably one of the reasons nobody's really made one of these before. I got to start with a few pages in my own handwriting.
That meant I could afford to make it strict in a way most translators can't be. Faced with an instruction they don't recognise, most of them have a guess and carry on, which is how you end up with a wrong answer and no idea where it came from. Latimer stops, the way a mainframe does, and hands you a number saying exactly what it didn't understand and where, from a laundry list I had to write out myself, 318 of them as of writing. It worked the other way round too, because whenever the two of them disagreed about an answer one of them had to be wrong, and the compiler has come out of that a good deal stronger than it went in. Booth even builds part of Latimer. When a program asks for NVIDIA's maths library, the one Latimer hands over is my own, written in OCaml and compiled by Booth. And every time Booth learnt to write something new, Latimer would refuse it and tell me why, and I'd know precisely which wall to go and find next.
The first walls I had to find by hand, and I want you to picture what that actually looks like. I'd write a tiny program that did one thing, like adding two numbers, ask the driver to turn it into the card's own code, and get back a row of numbers that looked like someone had fallen asleep on a calculator. Then I'd change the program very slightly, get a second row, and sit there playing the world's worst game of spot the difference, trying to work out which part meant add and which part meant these two. A grown man, squinting at two lines of gibberish, occasionally going "ooh" when a 4 turned into a 5 whilst listening to pure kiwiana. That works, and it's also about as quick as mapping a house by licking the wallpaper, so I did what I always do and wrote an OCaml program to do the boring part for me. It writes the tiny programs, hands them to the driver, flips one bit at a time and tells me which parts of the instruction moved. I called it the NVIDIA Extractor 3000, the first member of a family called the Nvidia mega guzzler 3000. Between the martinis earlier and a tool called a mega guzzler you'd be forgiven for thinking I have a problem, so for the record I barely drink. I just think a tool should sound like it's being sold on late night telly. The Extractor had one weakness though, which is that it could only tell me about instructions I already knew how to ask for.
So the next tool was me bringing a machine gun to a knife fight. A proper archaeologist goes at a dig with a little trowel and a toothbrush, and that was the Extractor, brushing the dirt off one instruction at a time. The NVIDIA Sifter 4000 is what happens when the archaeologist gets bored and hires a digger. Every instruction on the card starts with a number saying which one it is, and there's only room for 4096 of them, so you don't have to guess where to dig. You can just dig up the whole field. For each number the Sifter makes a tiny program with that mystery instruction in the middle, runs it, and has a look at what changed afterwards. Most of them blow up on the spot, so each one gets run in its own little box that fully expects to die. And once the dust settled there were 42 instructions that the card ran quite happily and that nobody, anywhere, has a name for. Forty two, so someone at NVIDIA might have a sense of humour. They'd been sitting in a card you can buy at any computer shop, like finding a room full of pots under your own kitchen floor. Some of them wrote a number down somewhere, some went rummaging for memory that wasn't there, and more than half did nothing I could see at all, which are the ones I trust the least. Two of them never came back, and froze the card for twenty seconds until it gave up on them. I'm still trying to work out what most of them are for, which is every archaeologist's dream really, a find nobody can read yet.
The Sifter in action.
What I hadn't thought about was that my graphics card was also busy being my graphics card. I'm used to tests that just run. Like the tests on any big piece of software, they grind through everything one at a time, and you go and do something else while you wait. So I went and did something else, which was the Sims 4, having completely forgotten what I'd left running in the background. The Sims talk in a made up language called Simlish. The people who made it tried Ukrainian, Navajo and Tagalog first, decided none of them sounded right, and let the actors make noises instead. The moment the game loaded the Simlish started screaming and the audio would cut out at the weirdest moments, because every instruction the card rejected was setting off errors in the driver, and by then there'd been a few thousand of them. Now you'd think I'd learn. A day or so later I forgot again and opened Anno 117, which is brand new and about as heavy on a graphics card as games get, and this time it wasn't just the sound. The whole thing fell over, game, screen and all, and my computer sat there like it wanted to know what the hell I'd just done to it. I have since learnt my lesson and I've had to put a Mk. 1 safeguard in place, a Post-it note on my computer.
By this point the tools had turned into a little family of their own (I didn't quite think I'd get this far and the names stuck), and none of them are actually part of the translator. You could delete Latimer tomorrow and they'd carry on poking at the card quite happily. So they got a home and a name of their own, Pythia, after the oracle of Delphi. Programmers love the word oracle. Anything you check your work against gets called one, as if it hands down the truth from on high. But if you know anything about the real Oracle, she gave vague and unclear advice and left you to figure out a whole lot yourself, which is a far better description of asking a graphics card what it means one bit at a time. Pythia was a piece of Latimer that broke off and became its own thing, and once that had happened once, it kept happening.
The Oracle once said the wisest man is the one who knows he knows nothing. By that measure I'm doing very well.
Subsystems
Now a sensible person would have stopped at a translator, but I'm less a sensible person and more a big greedy whale, whose answer to "would you like more fish?" is always, well, yes. Every time Latimer needed to do something new there was another fish swimming past, and I'd tell myself it was only the one, and a few weeks later it had grown into a whole thing with its own name. These are the ones that got big enough to be worth introducing.
Me, pictured, looking at another multi month long project that I'll name something ridiculous.
The first fish was a language, because by now Latimer could read four different kinds of card code and write for eight different kinds of machine. If you teach every one of those to talk to every other one directly you need thirty two translators, and every new one you add multiplies the pile instead of adding to it. So, like HALMAT on the Space Shuttle, everything goes through one language in the middle instead. Whatever comes in gets turned into it first, and whatever goes out is written from it, the same way sailors around the Mediterranean who shared no language got by on a common one they called the lingua franca. Mine is called Lingua, and the one rule it lives by is that it never finds out whose card the code came from or whose machine it's going to. If any part of Latimer tries to tell it, the whole thing refuses to build. Four readers and eight writers is twelve things to get right instead of thirty two, and adding a new machine means teaching it one language rather than four.
So far Latimer has been playing the card the way Wine plays Windows. It answers the program's questions itself, standing in for all of the card maker's own software, and the program never gets near any of it. QEMU goes a step deeper than that. As well as translating programs it can pretend to be an entire computer, chips and wires and all, so that a whole operating system starts up inside it without ever suspecting a thing. Palare is that trick for graphics cards, and it's a much bigger job.
A real card doesn't get asked polite questions. It gets poked directly by the driver, the piece of AMD's software that lives deep inside the operating system, which flips its switches, reads its dials, checks what's plugged into the slot and expects every one of them to respond exactly the way the real hardware would. Get one wrong and the driver decides the card is broken and gives up. So Palare has to be the card itself, switches, dials, slot and all, with AMD's real software sitting on top completely unchanged and perfectly happy with the answers it's getting. When that software finally sends some work down, Palare hands it to the translator, which runs it on whatever's actually in the machine. In my case that's an NVIDIA card, so AMD's own software spends its whole day convinced my NVIDIA chip is one of theirs. It's another wall in the dark room too, because running the real software against a card I built shows me everything it assumes that nobody wrote down. And it only works because AMD publishes how its cards and software talk to each other. NVIDIA doesn't, so Palare can't play one of theirs yet, not until I've read what the Linux driver people have worked out. The name is the old spelling of Polari, and I'll come back to why.
Laene exists because I wanted to play video games. A Post-it note isn't much of a long term plan though, and I wanted my graphics card back in the evenings, which meant getting my processor to take over some of the work while the card was busy with more important things, like messing with the Landgraab family. So Laene is the part that sets the table. I tell it which cards a program should find and what's really doing the work behind each one, so one pretend card might be backed by my processor and the one beside it by a real card, and the program never sees the difference. It also means I can lie on a much grander scale. Some programs are written for machines with eight graphics cards in them, the sort that cost more than my apartment, and they won't start until they've counted every one. Laene will happily tell them they've got eight, when what they've actually got is one card, one processor and me. Each pretend card still keeps its things to itself, so the program has to pass work between them properly, the same as it would with real ones, and if it gets that wrong I find out at my desk and not on somebody's very expensive machine.
Now I've made all this sound like a whale eating whatever swims past going "oh, delectable, give me more", but every one of these was for the same reason I started with, which is testing things properly without owning the hardware. Lingua is what makes one test mean the same thing on every machine. Laene is what lets my processor stand in for a card I don't have. And if I want to know whether something really works on an AMD card, the proper test is AMD's own software running it, and the only AMD cards I can get at are rented by the hour. Hot Aisle have been generous enough to keep giving me credits for theirs, and I still feel bad every time I run out and have to go back and ask for more, so I try to make every hour count. Palare means most of that testing can happen at my desk first, with AMD's software none the wiser and my poor NVIDIA card doing all the work. The rented card is saved for the moment that matters, when everything's ready and all that's left is to find out whether the whole thing actually works.
EUREKA
The capital of New New Zealand, a country I invented by typing in the wrong window.
Programmers have a tradition of getting the old game Doom to run on anything with a screen, calculators and fridges included, because if it runs Doom it really works. Getting an AI chatbot to run is pretty much the graphics card version of that. I'm not building Latimer for AI, but nothing else tests a translator like it does, because it leans on nearly everything the card can do, all at once, and one wrong instruction turns the answer to gibberish. So say hello to Qwen, an AI chatbot like ChatGPT, one small enough to run at home. The program running it is called Ollama, and this copy is fresh off the press, straight from the llama's mouth. I didn't build it and I haven't changed a line of it. It's the same one anyone can download, made for NVIDIA cards, compiled binary and all, no source code required. I pointed it at Latimer, and it asked whether there was an NVIDIA card about. Latimer said, well, of course there is, matey. And every piece of work it then sent to that card was translated to run on my computer's ordinary CPU instead, not a GPU. So I asked it the most pressing question of all. What is the capital of New Zealand, and who is the best rugby team? Nah, jokes. I only asked about the capital, because on a CPU a second question would have taken until Christmas. And 29 whole minutes later, it told me Wellington. Now, 29 minutes for one sentence isn't going to worry anybody at NVIDIA. And the extra "new" in the picture is me fumbling things up, trying to type just to see what was going on with my poor CPU in my program. But a program built for NVIDIA was sitting there talking to me with no graphics card involved at all.
A similar moment also came for me with the rented card that I'd been saving. On one of Hot Aisle's MI300Xs, which is one of AMD's enormous data centre cards, the same NVIDIA program did it again, this time with a real AMD card doing the work. I asked it the same question, what is the capital of New Zealand? And it answered, Wellington. Now because it was a massive GPU I could also ask it the more important questions, like who is the best rugby league team. It only answered with "Up the Wahs".
Etymology
Now you may have noticed that nothing in this project has a sensible name. Computers are my special interest, but they've never been the only one, and you can tell by what I call things. I name projects after birds, and after people I respect, and this one is named after a job, the latimer, whose whole living was knowing Latin and speaking to foreigners on your behalf, which is about as good a name as a binary translator could ask for.
Palare has a livelier family tree. It's the old spelling of Polari, a slang that grew up in Britain among actors, circus and fairground people, sailors and the Romani, picking up bits of Italian and Yiddish and the very same lingua franca those Mediterranean sailors spoke, until it was less a language than a suitcase full of everybody else's. By the early twentieth century its most devoted speakers were gay men, at a time when being one could get you arrested, and it let them talk about their lives across a crowded pub with nobody outside the circle any the wiser. I first called this part of Latimer Passing, because being taken for something you're not, so that nobody asks any questions, is exactly what it does, and it's what a lot of people have had to do just to get through the day. But passing can mean too many other things, so in the end it took the name of the language that let them do it. A pretend graphics card named after the slang of actors, sailors and queer Britain is, I'll admit, a truly eclectic choice, but I can't think of anyone who was better at being taken for something they weren't.
The Latimer logo.
The logo goes back further still, and it holds lines from two poems in two old languages. In Visigothic Spain, Isidore of Seville asked ubi sunt reges? Where are the kings? Centuries later an Anglo-Saxon poet whose name nobody kept asked the same question in a poem we call The Wanderer, which survives in a single manuscript, the Exeter Book, and is some of the best writing on grief I have ever read. It's about a man who has buried his lord and outlived everyone he loved, alone on a winter sea, dreaming he's back in the hall among his friends and waking to nothing but seabirds. Hwær cwom mearg? Hwær cwom mago? Where is the horse? Where is the young man? He couldn't just copy Isidore, because kings and emperors meant little to him, so he grieved in horses and friends and empty benches, the way the Nenets were given a young reindeer where shepherds had a lamb, and it still reaches us a thousand years on.
The first page of The Wanderer, in the Exeter Book.
One of Latimer's parts takes its name from the same poem. Laene is the Old English word læne, which means lent, and near the end the wanderer says her bið feoh læne, her bið freond læne. Here wealth is lent, here a friend is lent. It's a word that doesn't quite survive the trip into modern English, which is the trouble with translation all over again. When we lend something today we expect to get it back. In his world it ran the other way. Everything you had was lent to you, your gold and your hall and the people sitting beside you, and when it was taken back it was simply gone. For the part of a program that hands out graphics cards that aren't really there it seemed a fitting name, though I'll admit I had more than graphics cards in mind.
I lost a good dear friend in the middle of October, while I was still building this. Her name was Laura Noblejas, and I'd known her for years. When I was a volunteer with the fire service on Waiheke Island we would often help out various people in the community with whatever they needed. When Sue, Laura's partner and the deputy principal at my high school, had trouble getting a rainwater tank installed due to back to back treatments, they called us. So me and a few other lads pushed this great big tank up the hill, and right up the top, after we'd finished putting the thing down, Laura, laughing, handed me a crate of beer right in front of everyone, including her partner, and said "Here! Have this!" I was only 17 at the time, but I did get a Sprite out of it. Years later she was the person I told about everything I made, and it never mattered what it was. I could show her a notes app I'd thrown together with some free credits from OpenAI, the stupidest thing you've ever seen, and she'd say "oh my god, this is brilliant" and mean it. She was a bundle of joy, and she's a big part of why I started showing any of this to anyone. If you ever told her you wanted to do something or try something she'd always say something like "you never know unless you try" or "you never know what you're capable of!" Unintentionally spiritually Napoleon if you think about it. Near the end I went to see her in hospice straight off a night shift, looking like I'd been dragged through a hedge. She woke up for a moment, looked me up and down, and I swear the look said "oh my god, who's this, and what happened to you?" Then I saw her recognise me, and she went back to sleep. She was a friend I had for a moment in time, lent I guess, and I am so thankful I got to have her at all.
Where next
So, what now? Between Napoleon telling me to do it myself and Laura telling me I'd never know unless I tried, I've ended up with a translator that takes 29 minutes to tell me the capital of my own country. From what I can measure it also generates more code than it needs to and on my NVIDIA GPU it does the computer equivalent of "chucking all the clothes on the floor to sort out later". So the first job is making it fast. Right now Latimer only ever uses one of the many workers inside my processor, which is a bit like hiring a full kitchen and making one bloke do all the cooking, so that's the obvious place to start. After that it gets more interesting. There's a famous piece of research showing that a translated program can sometimes run faster than the original, because a translator gets to watch what the program actually does and tidy up after it, and I'd very much like Latimer to be one of those. I also want Palare to go all the way down, with every piece of AMD's software running happily on a machine with no AMD card in it, and there's a Tenstorrent card that's been waiting patiently for its turn. And somewhere in there I need to learn the Rust programming language (help me), so I can hand what I've found back to the NAK people whose map got me started without looking like a dunce.
Latimer is Booth's sister project, and for better and for worse the two of them need each other to work. It's extremely hard to test a program for a graphics card you don't physically have and can't borrow, so I made this for me, so I could test the compiler I've been really enjoying writing. It isn't grandiose and it isn't bigger than me, and I'll keep looking after it for as long as I want to and have the time for.
One of the joys of making computing my hobby, and historical preservation along with it, is that I've come to really appreciate how computers work, the people who designed them, and some of the truly genius things they came up with. My whole way into graphics cards was somebody, years ago, comparing them to an old mainframe. A mainframe is built to get through enormous amounts of work, whether that's thousands of transactions a second or one job run over millions of records overnight, and a graphics card is a different answer to much the same problem, because graphics is just linear algebra gone crazy, the same small sum done for every dot on the screen. And being able to build something and see it work brings me so much joy. I still don't know what I personally need a chatbot on my processor for, but getting Ollama to run was so much fun. I get to make things for myself, and I love making things for myself.
Aroha nui, and thank you for reading. So long, and thanks for all the fish.
Thanks
Thanks to the NAK people, who sent me links to sources and things they'd found, answered my questions, and properly tested whatever I sent their way. One of the changes I sent them worked perfectly well on one family of cards and turned out to be an illegal instruction on another, and at least one of those tests ended with somebody's game of Forza falling over, so my Sims weren't the only casualties.
Thanks to George Hotz. I'd have ended up building this regardless, but his message meant I could test on AMD's cards through tinygrad for a good while first, and poking around in tinygrad's pretend GPU is how I got used to the way one of these is laid out.
Thanks to Florian Mattana, whose SASS King covered the cards I'll never own, to Hot Aisle for keeping the MI300X hours coming, to Tenstorrent for sending a Blackhole, and to everyone who has emailed in about Booth.
And thank you to my friends, my family and my wonderful colleagues, who cared about me enough to listen to me rambling on about sweeping opcode lists, binary translation and all that other stuff.
Music I was listening to while writing this:
- All Good Things (Come To An End) by Nelly Furtado
- My Tears Are Becoming A Sea by M83
- Clair de Lune, played for an 80 year old elephant
In loving memory of Sue Lee and Laura Noblejas.
Links and further reading
If you want to use the program, it is located here.
- FINDINGS.md, everything probing the hardware turned up, including the 42.
- Booth, the sister project of Latimer.
- My OCaml write-up, where the dark room analogy comes from.
- HALMAT, the Space Shuttle's intermediate language.
- NAK, the compiler inside Mesa's open source NVIDIA driver.
- SASS King by Florian Mattana, and the write-ups behind it (part one, part two).
- ZLUDA, which runs programs made for NVIDIA cards on other ones, working from the text form of a program where Latimer works from the card's own code.
- tinygrad, whose pretend GPU I tested Booth on for a good while.
- SLATEC, the old Fortran maths library I check Latimer's own maths against.
- Hot Aisle, whose MI300X I have been testing on.
- Tenstorrent, who sent me a Blackhole.
- Dynamo: A Transparent Dynamic Optimization System, the paper on translated programs running faster than the originals.
- The Wanderer and the Exeter Book.
- The Institute for Bible Translation on its Nenets translations, and the translators' notes on the young reindeer.
Get in Touch
Painting at the top: Saint Jerome Writing, 1605 to 1606, by Caravaggio, in the Galleria Borghese, Rome. Public domain, via Wikimedia Commons.
Apollo Guidance Computer and its display and keyboard unit: public domain, via Wikimedia Commons. Its caption comes with apologies to Douglas Adams and The Restaurant at the End of the Universe, and so does my sign-off, which is from The Hitchhiker's Guide to the Galaxy.
Travelling by reindeer, Archangel, Russia, photochrom print, between 1890 and 1900, Detroit Publishing Co., from the Library of Congress. Public domain, via Wikimedia Commons.
Priestess of Delphi, 1891, by John Collier, in the Art Gallery of South Australia. Public domain, via Wikimedia Commons. Its caption owes a debt to Socrates, by way of Plato's Apology.
A whale, engraving, around 1793, from the Wellcome Collection, used under CC BY 4.0.
The first page of The Wanderer in the Exeter Book, tenth century, in facsimile from Bernard Muir's edition. Public domain, via Wikimedia Commons.
The Latimer logo is my own.
Durries = cigarettes.