John Carmack Profile picture
Apr 1 5 tweets 1 min read
When I let myself spend a day doing CUDA work, I'm usually quite happy afterwards. Optimization is a grand puzzle game with an objective score function! I have to make myself stop at a wise point, despite all the intriguing rabbit holes left to pursue. \
CUDA is not my go-to go-fast tool -- with a modern, big CPU, it is pretty great how much performance you can trivially get with #pragma omp parallel for. The last couple times I have done it, my first cut at a CUDA kernel was slower than the C++ running on 128 threads. \
After dialing everything in for occupancy and memory traffic it usually winds up 6x+ faster, unless it really leans on GPU features like tensor ops or texture filtering, which can go much higher. Of course, I only bother with functions I know will turn out well. Many won't. \
Little thing I just learned: I have had problems in the past where a kernel tightly optimized for release builds would fail to launch in debug mode. Using the __launch_bounds__ annotation fixed it for me today.
The secret to optimization is changing the problem to make it easier to optimize!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with John Carmack

John Carmack Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ID_AA_Carmack

Jan 18
Id Software very nearly got acquired by Activision, before winding up with Zenimax. Interesting that both roads would have led to Microsoft in the end. @BobbyKotick was always supportive, and it is quite an achievement to lead a company through that much growth over that long.
Ok, I had a sense that Bobby was not well liked, but I didn’t know he was at full un-person status. I last had dinner with him ten years ago, and the sum total of our interactions aren’t that large, but my first hand personal experience was of a shrewd businessman that led one \
of the most important gaming companies for decades, and just made a landmark exit. People that have worked more with him may have formed other opinions, and it might be true that he is a terrible person that should never be mentioned, but I don’t have a “chain of trust” between \
Read 5 tweets
Dec 21, 2021
The Internet Archive struggles mightily to save content when services shut down, but it is often a panicky reactive process. I wonder if there could be a world where the IA acts as a default host-of-record for startups, with a super-easy CDN relationship such that the content \
is archived-by-default in a heavily bandwidth restricted way, but your customers are served through conventional commercial means. I could imagine a CDN giving a nice rate for the "public good" of a continuously archived and mirrored service. I have a vague feeling that \
something like this could combine with a blockchain style technology to make internet applications that could outlive companies. A niche multiuser game that couldn't meet company revenue goals could still be "fed" by anyone that wanted to push resources at it, since the \
Read 4 tweets
Nov 5, 2021
Had a long talk with @ESYudkowsky about AI safety. The pessimists fear that we only have one shot at getting alignment right, and will probably blow it, but I think we will have ample experimental opportunities. \
Our core argument is the power provided by superhuman intelligence.

Being Really Smart isn't going to let you deploy nanotechnology weapons overnight, or immediately hack human psychology to the level of mind control. That may be possible over years, but not days or weeks. \
Technology development is almost never a pure product of intellect.

Intelligence can lead to power, but by itself it isn't power. Tens of thousands of years passed where humans were still getting regularly eaten by wild animals. \
Read 4 tweets
Sep 7, 2021
People like the idea of hard and fast rules, but putting +/-infinity as a factor in a policy decision is almost never the best plan. Hiring is an obvious example, with "requirements" that filter out large chunks of applicants that don't have some kind of back channel \
influence. Disqualifications are rarely explicitly stated, but they exist. If a company has a reasonable flow of applications, just tossing out all the ex-cons is an easy call. On the other hand, applicants often don't appreciate that interviewing prospects is a very non-trivial\
cost to an organization, and "interview everyone" is not viable for places in high demand. Given imperfect signals, a degree of random exploration is mathematically optimal, but "add up your stats and roll a D20 to see if you get a job interview" is unlikely to be very popular \
Read 4 tweets
Jul 2, 2021
A lot of indie game devs want to do everything themselves, either by leaning on the asset store, or by becoming a polymath coder/artist/modeler/sound designer. It isn't impossible, and everyone has their favorite example, but it definitely isn't the high-probability path to \
actually produce something successful. If it is a personal growth hobby, then fine, but if you want to compete in a very crowded market, expanding the team with complementary skill sets is usually critical. I think about this a lot as I sit here working on AI by myself.
To make this a little more actionable -- maybe the next development task you brace yourself for shouldn't be learning how to make hair in Blender, but rather scouting partners or contractors you can afford (do not value your time at zero!). There may be a middle ground for \
Read 4 tweets
May 19, 2021
Before the iPhone existed, I worked on a few games for what were called "feature phones": Doom RPG 1&2, Orcs&Elves 1&2, and Wolfenstein RPG.
Qualcomm's native-code BREW platform had better versions, but I haven't seen any emulators and archives for it, so they may be lost at \
this point. The J2ME (java mobile) versions are still floating around, and can be emulated.
My son wanted to get O&E2 running, so we set out on a little adventure.
Kemulator ran the game, but audio was glitchy and it hung after you died in game. Well, we are programmers, we \
should be able to fix it. Unlike most emulator projects, Kemulator turned out to be closed source abandonware, so we moved over to freej2me, which is a live github project.
The hang didn't happen, but audio was even worse. Missing sound effects was a simple bug fix -- \
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(