How are the CUDA architecture diagrams created?

I’ve found various CUDA architecture diagrams to illustrate the programming model in tutorials and articles such as the attached image. I want to customize such a diagram to illustrate the software architecture of a particular program. How are these diagrams created?