Erik Noreke:明日的技术与教育工具.pdf
《Erik Noreke:明日的技术与教育工具.pdf》由会员分享,可在线阅读,更多相关《Erik Noreke:明日的技术与教育工具.pdf(30页珍藏版)》请在三一文库上搜索。
1、 Copyright Khronos Group, 2013 - Page 1 Technology (0); dstdstid += id += srcsrcid;id; 系统共享系统共享 - 可以直接使用任何分配在主机上的 指针 - 无需OpenCL APIs配置SVM缓冲 - 主机和OpenCL设备都可以使用C11原 子和同步功能更新数据 - 可选功能 Copyright Khronos Group, 2013 - Page 23 Dynamic Parallelism 动态并行动态并行 In OpenCL 1.2 only the host can enqueue kernels It
2、erative algorithm example - kernel A queues kernel B - kernel B decides to queue kernel A again Requires host - device interaction and for the host to wait for kernels to finish execution - Can use callbacks to avoid waiting for kernels to finish but still overhead A very simple but extremely common
3、 dynamic parallelism example Kernel A Kernel B done Example 在在OpenCL 1.2中只有主机可以排中只有主机可以排 列核列核 Iterative algorithm 示例示例 - 核A排列核B - 核B决定再次排列核A 要求主机要求主机- -设备互动,主机等待核设备互动,主机等待核 完成执行完成执行 - 可以使用回调以避免等待核完成 执行,但是还是会有负荷 一个非常简单但是很普遍的动态并一个非常简单但是很普遍的动态并 行实例行实例 Copyright Khronos Group, 2013 - Page 24 Dynamic Par
4、allelism 动态并动态并行行 Allow a device to queue kernels to itself - Allow a work-item(s) to queue kernels Use similar approach to how host queues commands - Queues and Events - Functions that queue kernels and other commands - Event and Profiling functions 允许设备给自己排列核允许设备给自己排列核 - 允许一个工作条目排列核 使用和主机排列命令相似的方法
5、使用和主机排列命令相似的方法 - 队列和事件 - 排列核和其他命令的功能 - 事件和模式函数 Copyright Khronos Group, 2013 - Page 25 在在OpenCL 1.2中中,功能参数就是一个某类功能参数就是一个某类 必须声明的内存区域所指的地址空间的指必须声明的内存区域所指的地址空间的指 针针 许多实例中,开发者想要在不同的地址空许多实例中,开发者想要在不同的地址空 间里使用相同的代码但是不同的指针间里使用相同的代码但是不同的指针 上述实例中在上述实例中在OpenCLOpenCL 1.2 1.2 不支持不支持 导致开发者不得不复制代码导致开发者不得不复制代码 Ge
6、neric Address Space 通用地址空间通用地址空间 In OpenCL 1.2, function arguments that are a pointer to a type must declare the address space of the memory region pointed to Many examples where developers want to use the same code but with pointers to different address spaces Above example is not supported in Open
7、CL 1.2 Results in developers having to duplicate code v voidoid my_funcmy_func (global (global intint * *ptrptr, ), ) foo(foo(ptrptr, ); , ); v voidoid my_funcmy_func (local (local intint * *ptrptr, ), ) foo(foo(ptrptr, ); , ); Copyright Khronos Group, 2013 - Page 26 Generic Address Space 通用地址空间通用地址
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Erik Noreke:明日的技术与教育工具 Noreke 明日 技术 教育 工具
链接地址:https://www.31doc.com/p-3330159.html