🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

how can the GPU be programmed?

Started by
6 comments, last by Tom Sloper 1 year, 1 month ago

hey

just to start I don't have any experience in GPU programming.

is there a simple way to program the GPU, I know that there are thousands of cores in a GPU so can I create a program to tell an individual core to do a simple calculation without any complicated programming, so that I can have all the cores doing small and simple calculations to be used elsewhere.

and is there a way to do this without an API, I know that Nvidia GPUs are programmed in CUDA so will my code still work without CUDA?

I know that it is probably much harder to do this, this way, but this seems like how it would work.

anything will be much appreciated, thank you.

Advertisement

I have no real experience in GPU programming, I just read about it and did some experiments.

I think you may want to start with reading about the processor and memory architecture of GPUs in general and your system. I think that should have the answer to most of your questions. Similarly, most likely there is also documentation about why the API is what it is. I have been reading mostly about OpenCL, but that's mostly the same thing as CUDA afaik except you're not locking yourself in to a single manufacturer. I found the API quite reasonable and it looked simple enough to program at the time.

From what I can remember, GPUs are SIMD processors (but check that!!). SIMD means there is 1 program running at all processors (or some subset?? read the documentation of your system!!) but every processor has its own data. Roughly speaking, one algorithm being executed, each processors handles a different pixel. Obviously this is why these things are so freaking fast in 3D transformations and video. They run algorithms in a massively parallel way.

OP replied to his own comment with a spam link. I guess a mod deleted it without deleting the thread and banning the user. This lead to Alberth wasting his time with a well thought out reply.

Anyway, the whole post is a direct copy from Reddit from months ago. That should have been obvious with the user coming back with spam.

Get with the program mods. I'm not doing your job (by reporting) anymore.

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

How did the OP earn the “author” tag?

the forum software has some bugs. sometimes flagging a spammer and unhiding thread/posts confuses it.
in this case, i wanted to keep the discussion open because of alberth's insightful comment.

reporting posts is still the best way to get a moderator's attention. if you wish to stop doing that, that's fine too.


that aside, let's keep the thread on-topic.

alvaro said:

How did the OP earn the “author” tag?

The person who starts a thread is the “author” of that thread.

-- Tom Sloper -- sloperama.com

This topic is closed to new replies.

Advertisement