Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Curious party here, what kind of GPU's are you developing? What's your software dev stack? I'm curious how that works.
-
@NeatNerdPrime
It's a surprisingly mundane stack really.
I develop exclusively for 'consumer' cards (very high-end ones though think RTX 2080TI), on account of not being able to afford Quadro...
I use OpenCL to get the GPU to compute stuff. The way this works is that you write the GPU code in a C dialect and ship the source code with your application. OpenCL then figures out what machine language the GPU uses and compiles the code for it every time the programme starts(there are ways to have the GPU code precompiled but that's the easiest way).
I write the rest of the application in C++, as it is my prefered language and because it gives you controller over memory which makes getting all the data from your CPU to your GPU easier.
I then use super common libraries for UI stuff and whatnot, QT in my current project. -
@shoop
Hahaha.
Only in an annoying way, sometimes I set up a buffer where I can write data to from the GPU and then read it on the CPU. This works alright until you fuck up the buffer setup because you're annoyed and you get to debug THAT first. And also everything on a GPU is multithreaded so you get raise conditions in your debugging buffer.
Fun times. -
@Batburger How'd you find yourself getting into gpu programming? Seems like a niche category of programming.
-
Hazarth94765yI usually divide and conquer when debugging gpu code. You only leave the part of code that you know works, even if it does nothing, but at least it doesn't crash or introduce a problem, and then slowly add parts in predicting what should be the output and if it isn't I ask why
-
Parzi88335yYou have control over the GPU, correct?
For logging... just put strings of colored pixels on-screen. Just, like, one per log command would do if you don't have too many, or in a known order maybe? -
vicary4815yReminds me of the good old days of coding through hyperterminal, it runs so slow that you better off dry running with pen and paper beforehand.
Related Rants
Most of the code I write nowadays is for GPUs using a dialect of C. Anyways, due to the hardware of GPUs there is no convenient debugger and you can't just print to console neither.
Most bugs are solved staring at the code and using pen and paper.
I guess one could call that a quirk.
rant
wk194
opencl
gpu
debugger