Answer the question
In order to leave comments, you need to log in
CPU+GPU. Where to begin?
Hey!
I was interested in the topic of writing hybrid software that uses the capabilities of the CPU + GPU. There is a mathematical problem that needs to be calculated, for example, factorization. Vidyuha from ATI. Googling, I found articles on Habré on OpenCL with examples in C.
Questions:
1) is it possible to write under OpenCL in other languages, such as python? How effective will it be (development speed + final performance)
2) What are the alternatives to OpenCL? How much easier or more difficult are they? GLSL - alternative to OpenCL?
Answer the question
In order to leave comments, you need to log in
The first step is to separate the host code from the kernel code. The kernel is generally written ONLY in C, or rather in its dialect for openCL. For Nvidia, you can write in a kind of assembler. The host code just pulls the opencl functions and can be on anything, there is a binding for python. I don’t see the point in this, because opencl is a C code.
On the second question: there is CUDA. There is an FPGA with a custom design.
In any case, development for parallel computing should start with a parallel algorithm. Some tasks are not parallel.
Actually, the main thing is the use of the GPU - you can’t get anywhere from the CPU anyway. According to CUDA materials, just the sea. Including developer conferences hosted by Nvidia. According to OpenCL, there is an order of magnitude less information.
GPU programming is pretty close to hardware - that's why C/C++. I wanted to understand OpenCL - but as a result I spat and took up Kuda.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question