How much, if any, does the choice of host language affect OpenCL performance?

171 views Asked by At

Does the choice of host language make a difference when using OpenCL? If so, are there any guidelines for how to choose the host language?

For example, I am going to create a framework for training big neural networks on big data sets, using OpenCL. I have a choice of which host language to use, say either C++ or C#. Assuming that I make the most effective use of OpenCL and that most of the computation is happening within the OpenCL kernels, will my choice of host language make any difference?

1

There are 1 answers

2
AudioBubble On

There is no performance difference between writting the program in C++ or C#, because the code you write is the same in both lanugages (The OpenCL code syntax). This code is then compiled at run time by your opencl runtime (To apply performance optimizations specific for your device). And then loaded to the device(GPU).