OpenCL 中内核参数数量的限制

发布于 2024-08-25 18:46:14 字数 94 浏览 3 评论 0原文

我想知道 OpenCL 中设置为内核函数的参数数量是否有限制。我在设置参数时收到 INVALID_ARG_INDEX 错误。我在内核函数中设置 9 个参数。请在这方面帮助我。

I wanted to know if there is any limit on the number of arguments that are set to kernel function in OpenCL. I am getting the error as INVALID_ARG_INDEX while setting arguments. I am setting 9 arguments in the kernel function. Please help me in this regard.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

落墨 2024-09-01 18:46:14

您可以尝试调用以下函数: www.khronos .org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html

唯一的参数限制似乎令人担忧:
-CL_DEVICE_MAX_CONSTANT_ARGS(指向 __constant 内存空间的指针的参数)
-CL_DEVICE_MAX_READ_IMAGE_ARGS
-CL_DEVICE_MAX_WRITE_IMAGE_ARGS

最大读取图像参数计数应该不是问题,但是最大常量参数计数和最大写入图像参数计数在所有设备上应至少为 8。例如,我可能会在只接受 8 个的设备上传递 9 个写入图像......

You might try calling the following function: www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html

The only argument limits seem to concern:
-CL_DEVICE_MAX_CONSTANT_ARGS (arguments which are pointers to the __constant memory space)
-CL_DEVICE_MAX_READ_IMAGE_ARGS
-CL_DEVICE_MAX_WRITE_IMAGE_ARGS

Max read image arguments count should not be a problem, however max constant arguments count and max write image arguments count should be at least 8 on all devices. I might be that you are passing 9 write images on a device that only accepts 8, for example...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文