Hello,
We at ISP RAS have plans to work in the near future on generating either
CUDA source or PTX from C programs (probably with simple OpenMP
directives). Of course, we would benefit from the OpenCL infrastructure
in GCC if one was available.
Mark Mitchell wrote:
We (CodeSourcery) have been talking to our commercial partners about
implementing OpenCL in GCC and trying to develop/assess the level of
interest. As others have stated, our theory of operation here would be
to have the compiler depend on a library API that could be implemented
for GPUs or for ordinary multi-core CPUs. (Just as the libgomp API
could be provided to the compiler without depending on POSIX threads.)
In the case of generating code for GPUs, I am wondering whether the
backend that produces device assembly for the kernel code will be (in
your theory) implemented inside GCC, or would that be a third-party
tool? Obviously, a library is not enough for a heterogeneous system, or
am I missing anything from your description? As I know, e.g. there is
no device-independent bytecode in the OpenCL standard which such a
backend could generate.
Andrey