5 ms·
Things have gotten even faster since then. * Target: 64-bit space (2^64). * GPUs are more flexible and faster. A Vega64 (a few years old now) has 4096 shaders
by dragontamer 6y ago
Things have gotten even faster since then.
* Target: 64-bit space (2^64).
* GPUs are more flexible and faster. A Vega64 (a few years old now) has 4096 shaders ("CudaThreads") at 1.6 GHz. It can search the entire 32-bit floating point (or integer) space in less than a second. 1.6 GHz x 4096 shaders == 2^42.5 bitspace per second.
* People exhaustively searching a space are relatively patient: and willing to wait months for the results. 60 seconds x 60 minutes x 24 hours x 30 days == 2^21.3
1.6 GHz x 4096 shaders x 60 seconds x 60 minutes x 24 hours x 30 days is roughly equal to 2^63.8. We've done it: a month of GPU effort is all you need to exhaustively search the 64-bit space
-------
We've entered a world (~3 years ago), where it is reasonable to brute force the 64-bit space, so long as you're willing to wait about a month for the results.
If you're not willing to wait a month, then use 2 GPUs, or 4 GPUs, or a cluster of GPUs like the DGX A100 (or multiple clusters).
- Keyframe 6y agoSounds like a small and relatively cheap farm could do it in hours or minutes even.
- dragontamer 6y agoHmmm... assuming 4-GPUs per node, and 1200W per node, you'll need 216kW to generate the result in a day. But that also assumes that the operation you're testing is 1-clock tick, which is only true for the most trivial of calculations. Still, 216kWs per day per "test-case clock ticks" shows us that the 2^64 exhaustive bitspace is within a reasonable organization's grasp.
- dan-robertson 6y agoI think your units are wrong. You want 216kW days, not 216kW per day. 216kW days is 18.6Gj.
- dragontamer 6y agoHmm, "216kW days per test-case clock ticks" does sound more correct from a unit perspective.
- antoinealb 6y agoNote that the article is specifically talking about testing accelerated code. This is usually using machine-specific features, meaning it won't run on a graphic card. I am also not sure about how fast you are if you need to transfer data out of the GPU, or to add conditional branching to the shader code (it used to be that branches were super slow in GPUs, not sure where they are now). I could see it working for some other problems though.
- dragontamer 6y ago> meaning it won't run on a graphic card. GPUs implement the ceil and round functions. Heck, GPUs implement popcount, bit-reverse, and a whole slew of instructions that CPUs don't. (Mainly bitreverse and bpermute. Intel x86 only has permute (aka pshufb), but not the backwards version. BSwap can't emulate bitreverse) > (it used to be that branches were super slow in GPUs, not sure where they are now). Branches are fine. Its divergent branches (in both CPUs and GPUs) that are slow. A uniform branch will be branch-predicted on a CPU, while a uniform branch on a GPU will have all 64-threads (AMD GCN) or 32-threads (NVidia or RDNA) follow the instruction pointer. There's no slowdown with uniform branches, either on CPUs or GPUs. Both CPUs and GPUs do poorly on divergent branches, but GPUs do MUCH worse than CPUs.
- daveFNbuck 6y agoThe article was about testing a specific implementation of floor, ceil, and round using CPU instructions. You can run floor, ceil, and round on the GPU, but that won't tell you whether your new implementation using CPU instructions is correct.
- dragontamer 6y agoI thought the post was about how the 32-bit space could be exhausted in minutes with common hardware in the year 2014. Which means that any problem I have which is in the 32-bit space is a candidate for brute force. Given the advances in computers over the past few years: exhausting the 64-bit (or 2x 32-bit) space is "reasonable" for the year 2020. At least, reasonable for people who are willing to wait a month (on one GPU), or willing to buy a cluster of GPUs.
- OscarCunningham 6y agoYou could also use this to verify 32-bit functions with two arguments.