HN user

zzyxy

4 karma
Posts0
Comments3
View on HN
No posts found.

you need triple angle brackets when calling a GPU kernel. The compiler turns that into placing the kernel onto the GPU and running it.

It all boils down to calling CUDA runtime or driver APIs. Compiler just sprinkles fairly trivial amount of syntactic sugar, and under-the-hood glue code. One can launch GPU kernel from a pure C source file compiled with gcc.

The GPU kernel code itself needs to be compiled and for CUDA that is done with the proprietary nvcc, which is clang-based.

nvcc is not the only option. Clang itself can compile most of existing CUDA code just fine, and the rest usually needs minimal porting.

Also, nvcc is not based on clang. It may use it as the host compiler, but that's the extent of its involvement with clang. IIRC, their front-end used to be based on EDG.

HIP is better because it's an open-source llvm backend/frontend

CUDA and HIP share most of the front-end code in clang, so CUDA compilation with clang shares the same benefits. What's missing is PTX to SASS assembler, which creates the actual GPU binary, and that part is proprietary to NVIDIA.

Make it $200/month subscription which actually gives you access to O($1K) worth of codex compute. Even at the face value it is very generous, IMO.

Thank you for this description. It almost exactly matches my experience that I had trouble putting into words. I can "model" the things I'm asked to remember/visualize, but I do not really "see" it.

The closest physical world analogy is moving in a familiar room in the darkness -- you kind of know where the corners are, and where to find the light switch, so you can move around, and tell, if asked, what's where... But there's no seeing involved.

So, when asked to imagine something, for me the process is akin to drawing a blueprint, and then mentally modeling how that contraption could work in real life, without actually building it. Imagination is certainly involved, but it may not be the kind of imagining the requester assumed.