【发布时间】:2015-11-05 02:33:44
【问题描述】:
我尝试像这样在 GPU 代码(OpenCL/C++ 内核)中执行系统命令
system("ngspice");
但我收到此错误消息:CL_INVALID_BINARY。
我发现了一些问题,说它不允许在内核中调用外部函数!
打开: OpenCL - is it possible to invoke another function from within a kernel?
CUDA: CUDA External calls not supported
如果我没记错的话,那就是 OPENCL/CUDA 的限制之一:
OpenCL:https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/restrictions.html
CUDA:http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#functions
我说的对吗?这种限制背后的原因是什么?
【问题讨论】: