mtbc: maze I (white-red)
Mark T. B. Carroll ([personal profile] mtbc) wrote2021-08-07 06:11 am
Entry tags:

Writing software for GPUs

Using eight-bit microcomputers in my childhood, I became comfortable with programming at a low level, using assembler to manipulate the memory-mapped state of various microchips. In my working life, I have done some other programming with concurrent and distributed systems. Given that my current workplace runs many tens of thousands of graphics processing units (GPUs), I figured that I ought to learn how to program those. My initial steps have been interesting and fun.

In one of my work projects, I found that I could use and instrument OpenCL-based applications on compute nodes based on the AMD MI100 GPU. Using the Intel UHD Graphics 620 GPU on my work laptop, I have dipped my toes in the water with writing my own OpenCL-based code which appears to work and make sense. There is still plenty more for me to learn but it transpires that this is a domain in which I enjoy working. I wonder if there is a way to write kernels at a lower level than OpenCL C while remaining somewhat portable.

I can tell that my small project is engaging me because, after working on it a little over yesterday evening, still learning basic lessons like to use cl_int for ints that I am passing to my kernel, subsequently I thought of two changes that I want to make to my toy code and, after a night's sleep, I appear to have thought of six more. My brain appears to welcome this project, now I just have to find a GPU programming project at work. Next year, continuing the theme of accelerators, perhaps I could then tackle field-programmable gate arrays, of which we have fewer.

Incidentally, the Khronos Group's logo reminds me a little of Dreamwidth's though I suppose that Debian's is closer.
wpadmirer: (Default)

[personal profile] wpadmirer 2021-08-07 02:45 pm (UTC)(link)
It's amazing how your brain will work on things while you're asleep! It's cool that you've found something new you're enjoying so much!