Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just had to check the dates. I remember the exact moment I realized everyone had a secret super computer in their gaming rig that no one was really putting to work. It was a year before your prometheus example.

I saw this video, while I was in college playing around with XNA, python and pygame. https://youtu.be/ACHJ2rGyP10?t=30

It's pretty mundane now, but at the time I was gobsmacked. Watching that performance and comparing it to the measely entity counts I could run realtime in C# or my python pandemic simulator I was writing made me FANATICLY BELIEVE that for many problems I had been taught to use the wrong tool. Shader programs had been misadvertized and their true power obfuscated under a veil of painting pretty pictures etc etc.

I became something of a GPU evangelist in that moment, and for years when someone would say such and such problem was computationally intractable on current hardware, I'd go into a whole schpeel, pull out some previous "impossible" things it allowed and usually they would run away, even though I would call for them to come back.

Despite that, HLSL/GLSL became my behind the counter deep stock black magic for solving all sorts of problems, plenty of which that had no pretty pictures show up on screen. If I could encode your problem as a series of textures smaller than 4096x4096 (this is most problems), I could make your function with minutes of execution time finish 60 times a second.

It allowed for some clutch performance improvements in a stuffy .net application that looked to my coworkers like space magic. Because it was space magic. To this day I have unused fingers when I count all the times I've multithread on the cpu. What a half measure! What a loathsome simulacrum of the massive power of the GPU! Why debase yourself? Oh it's running on a pizzabox somewhere that doesn't have a GPU, I suppose that's a reason.

These days GPU compute is a more standard tool for people, with more direct ways to use it. I'm not mad that it's no longer a secret weapon. It's cool to see what things people are doing with it, like this! This is incredible! I selfishly wish nvidia permissively licensed their future tech like this so we could get to the next phase faster. Oh well.

I agree with you strongly and believe that we haven't even scratched the surface.

Thanks for making me remember all that.

I still try to figure out weird/hard things made easy/possible by GPUs. Within the year I've coerced a gpu to do millions of string operations inside a fragment shader. That was weird and I think it made the GTX1080 uncomfortable, but it did it a few hundred times a second.

Admittedly it's a lot more pretty picture drawing these days. I still try to reach a little and put the massive power we have to work whenever I can.

https://www.reddit.com/r/Unity3D/comments/updci7/i_made_this...



Please show me the light, any more examples of how to use the GPU for more generic problems? I'd love to play around with it.

THanks!


This is a very platform specific question.

https://web.dev/gpu-compute/ This gets into it for web development. I've never used this though.

https://web-dev.imgix.net/image/vvhSqZboQoZZN9wBvoXq72wzGAf1... Just _behold_ that graph. Imagine where it goes even further to the right. Magnificent.

I LOVE gpu.js. https://gpu.rocks/

You have python in your name, I found this! https://developer.nvidia.com/how-to-cuda-python

Another good source for modern tutorials would be Unity compute shader tutorials. With hand wringing, anything you do in one of those .computes can be done from any other launch point.


Out of curiosity, what kind of problems did you solve on the GPU?


They've all kind of blurred together. Anything that was effectively just map/filter/reduce operations but were too slow. I've done it on a C#.net ERP frontend, a local search function in a wargaming app, a real time web application written in node.js (gpu.js is awesome)

I used this technique to write a performant electron application that served as a driver for a PoE+ lidar. That's just what comes to mind right now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: