A
A
AUN2015-04-22 17:16:53
GPGPU
AUN, 2015-04-22 17:16:53

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

3 answer(s)
V
Vladimir Martyanov, 2015-04-22
@AUN

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.

D
Dum_spiro_spero, 2015-04-23
@Dum_spiro_spero

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.

D
Don Kaban, 2015-04-23
@donkaban

1. mathema.tician.de/software/pyopencl
2. GLSL is a shader programming language, if you don't want to render, but return results, then you shouldn't. Alternatives - CUDA (with ATI - not at once).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question